Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix mathjax helper in material-theme
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Sep 18, 2016
1 parent 70c6c50 commit acc99af
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions v7/material-theme/templates/post_helper.tmpl
Expand Up @@ -86,8 +86,31 @@

{% macro mathjax_script(post) %}
{% if post.is_mathjax %}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});</script>
<script src="/assets/js/mathjax.js"></script>
{% if use_katex %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/contrib/auto-render.min.js"></script>
{% if katex_auto_render %}
<script>
renderMathInElement(document.body,
{
{{ katex_auto_render }}
}
);
</script>
{% else %}
<script>
renderMathInElement(document.body);
</script>
{% endif %}
{% else %}
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
{% if mathjax_config %}
{{ mathjax_config }}
{% else %}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});
</script>
{% endif %}
{% endif %}
{% endif %}
{% endmacro %}

0 comments on commit acc99af

Please sign in to comment.