[IPython-dev] mathjax not rendering in notebook

Matthew Brett matthew.brett at gmail.com
Fri Aug 10 19:21:09 EDT 2012


Hi,

I've run into some puzzling trouble using mathjax in the notebook.

Here's some mathjax markdown text:

$$
\begin{array}{c}
y_1 \cr
y_2 \mathtt{t}_i \cr
y_{3}
\end{array}
$$

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

The same text in an html page works OK:

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"
charset="utf-8"></script>
</head>
<body>
$$
\begin{array}{c}
y_1 \cr
y_2 \mathtt{t}_i \cr
y_{3}
\end{array}
$$
</body>
</html>

I also found that I could not use `\\` in the notebook markdown for
newline and had to use `\cr`.  Again, this was fine in the raw html
mathjax.  Is there anything I can do to debug?

Cheers,

Matthew



More information about the IPython-dev mailing list