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

Problem when parsing left curly brace inside MathJax equation #2049

Open
timdams opened this Issue May 17, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@timdams

timdams commented May 17, 2018

Current behavior:

When starting "gitbook serve" MathJax formulas where a left curly brace { is immediately followed by a second one generate an error:
-template render error" occurs, stating "expected a variable end".

For example, this formula:
$$ dB=10\mathrm{log}\left(\frac{{P}_{2}}{{P}_{1}}\right)$$

The only way to solve this at the moment is remove the curly brace pairs that give the error, even though the above formula is perfectly legal (tested with https://arachnoid.com/latex/) :

$$ dB=10\mathrm{log}\left(\frac{P_{2}}{P_{1}}\right)$$

Another way to solve this is by placing a space in between both left curly braces.
$$ dB=10\mathrm{log}\left(\frac{ {P}_{2}}{ {P}_{1}}\right)$$

I think this is related to #1198; however adding the {% raw %} {% endraw %} tags will stop MathJax from recognizing the text as formulas, as far as I understand what is happening.

@timdams timdams changed the title from Problem when parsing left curly brace inside MathML/MathJax equation to Problem when parsing left curly brace inside MathJax equation May 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment