You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By escaping some of the underscores, the expression is rendered properly. What is really odd is that it is enough to escape only one or two underscores, but not all.
This was first raised in this issue, if it is of any relevance: #1275 In the link in #1275, there seems to be a fix via some configuration of MathJax.
As it turns out, this problem is not limited to markdown. The following also produces faulty results:
ipython notebook --profile=sympy
In [1]: eps = Symbol('\epsilon')
In [2]: eps
works (I can't write the output here, because it is a Greek letter:), but
In [1]: alpha = Symbol('\alpha')
In [2]: alpha
Out [3]: lpha
However,
In [1]: alpha = Symbol('\\alpha')
In [2]: alpha
prints a Greek alpha. Now, the question is whether this is really a parsing issue in the front end. It seems that some backslashes disappear, but then I don't see why this never happens in a standard python statement. I have never had problems with something like this
No @v923z , that last one is a different story: you need to either escape your backslashes, or use python raw strings. If you want to produce the latex command for the greek letter alpha in a python string, the two valid ways of spelling that are r'\alpha' or '\\alpha', that's it.
The bug is on the javascript handling of markdown, your last point is a misunderstanding of how python handles backslashes in strings.
Right now, a markdown cell with continuation equations must be written as:
where the
\\
eq. continuation markers require a third\
. The normal latex code should be:with only two
\\
at the end. This form works OK inLatex()
calls, so the issue seems specific to our parsing/escaping of markdown cells.The text was updated successfully, but these errors were encountered: