I found out that material-theme has problems with matjax.

Mathjax renders fine on the main page:

http://i.imgur.com/U7OOhFs.png

<http://i.imgur.com/U7OOhFs.png>


but, when I enter to the actual post, mathjax stops working.

http://i.imgur.com/yWYTsgu.png

<http://i.imgur.com/yWYTsgu.png>


and it happens only with the material-theme theme


Now, I did a quick poke


templates/post.tmpl calls {{ helper.mathjax_script(post) }}  from   
post_helper.tmpl

and there the math-related part is


{% 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>

    {% endif %}

{% endmacro %}

while
templates/index.tmpl calls {{ helper.mathjax_script(posts) }} from... a non 
existing helper_index.tmpl ???
( top says 
{% import 'index_helper.tmpl' as helper with context %}
but there is no index_htlper.tmpl)


yet index renders mathjax and posts not...



for comparison, zen-jinja (which renders find mathjax on index and post 
pages) 
has
{% import 'arusahni_helper.tmpl' as arusahni with context %}
{% import 'post_helper.tmpl' as helper with context %}
(....)
 {{ helper.mathjax_script(post) }}
but post_helper.tmpl does not exist! yet arusahni_helper defines

{{ mathjax_config }}
    {% if use_cdn %}
        <!--[if lt IE 9]><script 
src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    {% else %}
        <!--[if lt IE 9]><script 
src="/assets/js/html5.js"></script><![endif]-->
    {% endif %}



So I'm confused.

1) why on material-theme  mathjax does not work on posts
2) why mathjax works when it is not defined and not the other way
(and less pressing but still intriguing)
3) why can zen-jinja can all a function from the wrong file?

thank you

-- 
You received this message because you are subscribed to the Google Groups 
"nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nikola-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to