datitran/jupyter2slides

Latex rendering not working

marpat opened this issue · 6 comments

Tried one cell as Markdown type and cannot get the Latex rendered. Works with RISE. How to fix it?

example:

Testing Mathjax

$\large{C_x = x^2 + \frac{a^3}{2b - c}}$

For some reason, the author removed initialization of MathJax library from the template.

In my case, adding

{{ mathjax() }}

to static/jupyter_template.tpl file after <!--[if lt IE 9]> ... <![endif]--> part helps.

In general, the jupyter2slides project looks like a collection of hacks over nbconvert utility and not all of the hacks working properly.

Hi karelin,
thanks for the tipp, after adding the

{{ mathjax() }}

I got doubled tex-output in html, the first one is in the right Position, and the second one is in the next line. I think it's still a little bit Buggy for html Output with Latex formula.

If you use this template, it works:
https://github.com/jupyter/nbconvert/blob/master/nbconvert/templates/html/slides_reveal.tpl

instead of the original
jupyter_template.tpl

replace the lines below to keep the same theme:

Also having this problem.

Hi karelin,
thanks for the tipp, after adding the

{{ mathjax() }}

I got doubled tex-output in html, the first one is in the right Position, and the second one is in the next line. I think it's still a little bit Buggy for html Output with Latex formula.

I remove the following few lines from jupyter_template.tpl and the double rendering went away:

    var update = function(event){
      if(MathJax.Hub.getAllJax(Reveal.getCurrentSlide())){
        MathJax.Hub.Rerender(Reveal.getCurrentSlide());
      }
    };