# Problem when parsing left curly brace inside MathJax equation #2049

Open
opened this Issue May 17, 2018 · 0 comments

 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.