[IPython-dev] mathjax not rendering in notebook
Matthias BUSSONNIER
bussonniermatthias@gmail....
Mon Aug 13 14:37:23 CDT 2012
> Thanks - yes - the pointer to the Chrome developer panel got me a
> little further.
>
> I think what is happening is that some other script (?markdown) is
> getting to the TeX before it gets to mathjax.
>
> Specifically, if I put the mal-functioning TeX into a cell:
>
> $$
> \begin{array}{c}
> y_1 \cr
> y_2 \mathtt{t}_i \cr
> y_{3}
> \end{array}
> $$
>
> and put a breakpoint on the line:
>
> MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
>
> in cell.js, the html in the cell before rendering is this:
>
> <p>$$
> \begin{array}{c}
> y_1 \cr
> y_2 \mathtt{t}<em>i \cr
> y</em>{3}
> \end{array}
> $$</p>
>
> Notice the stray <em> .. </em> tags. If I do a tiny edit to the
> malfunctioning TeX so that it renders correctly (removing the {} round
> the last '3'):
Ah ! Yes, that should be markdown `_smth_` is the way to emphases stuff.
What you can do is already recap this on the opened issues about this.
https://github.com/ipython/ipython/issues/2289
If I was looking at where markdown is processed I would look in IPython/frontend/html/notebook/static/js/textcell.js
But I don't know this file very much.
Thanks !
--
Matthias
> $$
> \begin{array}{c}
> y_1 \cr
> y_2 \mathtt{t}_i \cr
> y_3
> \end{array}
> $$
>
> then the html before MathJax gets it is:
>
> <p>$$
> \begin{array}{c}
> y_1 \cr
> y_2 \mathtt{t}_i \cr
> y_3
> \end{array}
> $$</p>
>
> So I think something in the notebook is inserting the <em> .. </em>
> tags into the TeX, and this is busting the rendering. I've attached
> a fuller output of the html before and after rendering.
>
> What could be doing this? Is there a way of stopping this
> preprocessing of TeX? Could this also explain the need for three `\`
> for end-of-line instead of two?
>
> Cheers,
>
> Matthew
> <mathjax_io_dumps.txt>_______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
More information about the IPython-dev
mailing list