Skip to content
Permalink
Browse files

Fix #1984 -- fix mathjax support

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Aug 31, 2015
1 parent 73c8f50 commit 86aa454e1c3e0c7624480d318d629ce152bbbd48
@@ -1392,8 +1392,8 @@ Math
----

Nikola supports math input via MathJax. It is activated via the math roles and
directives of reStructuredText and the usual LaTeX delimiters (``\(inline\)``
and ``\[display\]``) for other input formats.
directives of reStructuredText and the usual LaTeX delimiters
(backslash-parentheses, backslash-brackets) for other input formats.

To use mathematics in a post, you must add the ``mathjax`` tag.

@@ -1419,7 +1419,8 @@ like this:
</script>
"""

Inline mathematics are produced using the reST `math` **role** or the ``\(…\)`` delimiters:
Inline mathematics are produced using the reST `math` **role** or the LaTeX
backslash-parentheses delimiters:

Euler’s formula: :math:`e^{ix} = \cos x + i\sin x`

@@ -1435,7 +1436,8 @@ In other input formats:

Euler’s formula: \(e^{ix} = \cos x + i\sin x\)

Display mathematics are produced using the reST `math` **directive** or the ``\[…\]`` delimiters:
Display mathematics are produced using the reST `math` **directive** or the
LaTeX backslash-brackets delimiters:

.. math::

@@ -20,8 +20,11 @@

{% macro mathjax_script(posts) %}
{% if posts|selectattr("is_mathjax")|list %}
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});</script>
<script src="/assets/js/mathjax.js"></script>
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});
</script>
{% endif %}
{% endmacro %}
@@ -86,8 +86,11 @@

{% macro mathjax_script(post) %}
{% if post.is_mathjax %}
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});</script>
<script src="/assets/js/mathjax.js"></script>
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});
</script>
{% endif %}
{% endmacro %}

This file was deleted.

@@ -20,8 +20,11 @@

<%def name="mathjax_script(posts)">
%if any(post.is_mathjax for post in posts):
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});</script>
<script src="/assets/js/mathjax.js"></script>
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});
</script>
%endif
</%def>
@@ -86,8 +86,11 @@

<%def name="mathjax_script(post)">
%if post.is_mathjax:
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});</script>
<script src="/assets/js/mathjax.js"></script>
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});
</script>
%endif
</%def>

0 comments on commit 86aa454

Please sign in to comment.
You can’t perform that action at this time.