New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect mathjax rendering of certain arrays of equations #2289
Comments
Preliminary word on the mailing list is that this is getting pre-processed by markdown (or similar) which adds some stray |
(copied from http://mail.scipy.org/pipermail/ipython-dev/2012-August/010042.html) 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:
and put a breakpoint on the line:
in cell.js, the html in the cell before rendering is this:
Notice the stray
then the html before MathJax gets it is:
So I think something in the notebook is inserting the What could be doing this? Is there a way of stopping this preprocessing of TeX? Could this also explain the need for three |
Some other mis-rendered examples boil down to:
|
Great! (not great that we misrender, but great that at least we're getting |
Similarly, this doesn't work right: $$\begin{eqnarray}
x' &=& &x \sin\phi &+& z \cos\phi \\
z' &=& - &x \cos\phi &+& z \sin\phi \\
\end{eqnarray}$$ Replacing the double backslashes with I think the problem is in |
Yes, I think the problem is mainly that markdown is totally unaware of MathJax (if I remember correctly), which then runs on the HTML markdown generates. So it's probably not in a code block or anything. Essentially what we want is for the markdown parser to be aware of the mathjax blocks, and leave them totally untouched, as it should already be doing with |
Another example reported in #2325 that falls victim to markdown parsing inside mathjax: $\mathbf{A}_{i}B_{j}$ The workaround being to add spaces so it doesn't match the regex: $\mathbf{A}_{i}B _{j}$ which is still valid, if slightly weird latex. Or escape underscores: $\mathbf{A}\_{i}B\_{j}$ which will get the right value in MathJax, but cannot be copied/pasted into regular latex without removing the escapes. |
I'm on the latest Ipython (0.13.2) and I have the same problem as pointed out by antoni #2289 (comment) few message above. The problem is that the two Could this be a regression? |
@mattions, Fix has been merge for 1.0, not in 0.13.2 , there will most probably don't b any 0.13.3 as 1.0 is due soon. |
Addresses the javascript errors resulting in a blank notebook pointed out in ipython#2349 as well as significant performance degradations that were introduced by that merge. It also disables equation numbering/references, fixes broken offline access and re-typesets individual Notebook Cells instead of the entire document on edit. Closes ipython#2289.
As reported on the list, certain equations are being incorrectly rendered. Consider:
it simply produces a line of plain text with all of the above. As it turns out, removing the
mathtt
call or the_i
subscript or making the z subscript be a single character (sayz_3
) produces correct rendering. But somehow, themathtt
call in combination with the others makes it simply not work.The text was updated successfully, but these errors were encountered: