Skip to content
Permalink
Browse files

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 acc99af992e49aa63bbb0372d91874c8375f08bb
Showing with 26 additions and 3 deletions.
  1. +26 −3 v7/material-theme/templates/post_helper.tmpl
@@ -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.
You can’t perform that action at this time.