Open artdavis opened 8 years ago
@artdavis Thanks for the report and including a workaround that may help others.
This issue may be related to nbconvert issue 271
I test it and it fail in plain notebook.
I think it is related with sympy/printing/preview.py
. Before the equation being passed to mathjax, sympy call the good old latex command for "preview" (useless but it does). And latex fail about double superscript, e.g. $a'^2$ is interpreted as $a^'^2$ which fail on latex.
It is related with issue 271 because nbconvert use latex for rendering too.
The confusing point is mathjax allowing things like $a^'^2$ despite latex does not.
@parleur Thanks for testing and confirming the relationship to issue 271. You're doing good work on other PRs in the project too. :smile:
When using a sympy symbol with a prime and a subscript, Latex rendering of the equation sometimes breaks. For instance:
Workaround is to define
avar = sym.symbols("{a'}_1")
instead. But it was very difficult tracking this down as the source of the rendering problem.System info