[IPython-dev] mathjax not rendering in notebook
Matthew Brett
matthew.brett@gmail....
Mon Aug 13 01:28:07 CDT 2012
Hi,
On Sat, Aug 11, 2012 at 12:04 PM, Matthias BUSSONNIER
<bussonniermatthias@gmail.com> wrote:
>
> 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@gmail.com> wrote:
>>> On Fri, Aug 10, 2012 at 4:21 PM, Matthew Brett <matthew.brett@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
> IPython/frontend/html/notebook/static/js
> 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.
I'm afraid I am not sure what you mean by the sentence above, is there
any chance you could unpack it a little? Sorry, I am completely
unfamiliar with the notebook internals, but I'm happy to give it a go
if someone can give me a few lines of orientation,
Best,
Matthew
More information about the IPython-dev
mailing list