adamzap/landslide

math_output do not work

Closed this issue · 6 comments

I tried to enable MathJax with -m option for .rst slides but this simply didn't work. I have docutils 0.12. Others with the same problem?

Marek

Run landslide -m on an .rst file containing this:

MathJax Test
============

\\[ \\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\]

It works for me. Does it work for you?

Doesn't work. I tried also with with math role:

:math:\left( \sum_{k=1}^n a_k b_k \right)^2

but without success. Can i get any debugging informations from landslide?

That's odd.

You can try the -b flag, but I'm not sure that it will help.

The best thing to do is probably to look at the generated HTML file and debug from there.

Reopen this ticket if you're still having problems

Just as a reference for future people who look at this issue.

The author might have used a custom theme or an old version of a theme that did not have this in its base.html:

      <script type="text/javascript" src="{{ js.path_url }}"></script>
      {% endif %}
    {% endfor %}
    {% if math_output %}
      <script type="text/x-mathjax-config">
        MathJax.Hub.Config({
          tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }
        });
      </script>
      <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    {% endif %}
    <!-- /Javascripts -->
</head>
<body>

Happened to me.


Offtopic: While I'm at it, a few minor points the authors might consider:

  • It should not be too hard enabling math output for markdown as well (with the right mathjax config that sets the right delimeters for math input - at least in latex format)
  • A dark theme included in the package would be nice
  • A mechanism to register themes or create theme plugin packages could be good. I helped myself with this: https://github.com/con-f-use/landslide-jcgb/blob/master/install.py

Thanks for the feedback!