[IPython-dev] mathjax not rendering in notebook

Matthias BUSSONNIER bussonniermatthias at gmail.com
Sat Aug 11 15:04:22 EDT 2012

Le 11 août 2012 à 20:53, Matthew Brett a écrit :

> Yo,
> On Fri, Aug 10, 2012 at 8:06 PM, Fernando Perez <fperez.net at gmail.com> wrote:
>> On Fri, Aug 10, 2012 at 4:21 PM, Matthew Brett <matthew.brett at gmail.com> wrote:
>>> In the notebook this renders as "$$ \begin{array}{c} y_{11} \cr y_{12}
>>> \mathtt{t}i \cr y{13} \end{array} $$" - i.e. somehow rejected by
>>> mathjax.   The following make it render correctly:
>>> 1) y_3 instead of y_{3}
>>> 2) removing _i of \mathtt{t}_i
>> It seems the thing that confuses it most is the mathtt call.  If I
>> remove it altogether (and using \\\ for line separators), then I can
>> use y_{3, 4} and t_{i, j} no problem.  Or, if there are no complex
>> subscripts, the mathtt call by itself is OK.  But there's something
>> very brittle inside that is messing up mathjax's processing of this.
>> Filed it here, b/c I'm out of ideas:
>> https://github.com/ipython/ipython/issues/2289
> As a matter of interest, and from great ignorance, where in ipython
> would I look for explanations of different behavior of mathjax in a
> markdown cell in the notebook to mathjax in a standalone html page
> like the one above?  Is there a good track to follow for debugging?

a quick grep in the source tell me that the 2 places that triggers mathjax rendering are
cell.js:            MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
outputarea.js:            MathJax.Hub.Queue(["Typeset",MathJax.Hub]);

You could try to deactivate auto rendering and do it manually to check the source before/after rendering if you see an error in what is published.


More information about the IPython-dev mailing list