Refuses to render sometimes with valid LaTeX
dbanet opened this issue · comments
Looks like it's an issue with subscripts after parentheses? Came across the exact same issue. Only works with the first one in a section, any subsequent breaks it.
Seems to be caused by Markdown converting the underscores into <em> tags, since the closing parenthesis is seen as a word boundary.
Not sure of an easy way to fix this.
The underscores should be escaped with a backslash so that Markdown does not convert them to <em>
tags.
Example: http://mathb.in/51078
$$
(Foo)\_{a} \\
(Foo)\_{a}
$$
But then they're literally underscores instead of being rendered as
subscripts
On Jan 28, 2016 12:36 PM, "Susam Pal" notifications@github.com wrote:
The underscores should be escaped with a backslash so that Markdown does
not convert them to tags.Example: http://mathb.in/51078
$$
(Foo){a}
(Foo){a}
$$—
Reply to this email directly or view it on GitHub
#8 (comment).
I overlooked the fact that the subscripts were not rendered. My bad. Thanks for explaining the issue.
Part of the problem is caused by this line in the JavaScript code (
Line 229 in 0433c40
By the way, with a quick test on http://math.stackexchange.com/questions/ask, I see that the code at http://mathb.in/51078 that is breaking on MathB.in seems to be rendering fine on Math StackExchange. I'll have to see how they are doing this right.
It will take me a while to get back to this project. So in the meantime, any pull requests are very welcome.
I wonder if this is related:
Doesn't work:
\[
\dot{\varepsilon}_{13} n_{3}
\]
Works:
\[
\dot\varepsilon_{13} n_{3}
\]
Works:
\[
\dot{\varepsilon}_{13} n_3
\]
It appears that }_something_{
will render something
as italic instead of picking up subscripts in math mode.