There is a particular Mathjax expression which chokes when I build Github Pages using Mathjax
Use the expression $g^{\frac {p-1} {{p_i}^{n_i}}\$
in a github page where you import Mathjax. The page errors out while building.
This is the build error I get.
github-pages 227 | Error: Liquid syntax error (line 3): Variable '{{p_i}' was not properly terminated with regexp: /\}\}/
I use Jekyll Now
I opened an issue with Mathjax - Github Mathjax chokes on the expression $g^{\frac {p-1} {{p_i}^{n_i}}}$ · Issue #2971 · mathjax/MathJax · GitHub
But they said it’s an issue with the Liquid Template of Jekyll
As you point out, this is a build issue; MathJax isn’t involved until the page is viewed in a browser, so it is not a MathJax problem, and there is nothing MathJax can do about it.
It appears that the Liquid Template for GitHub pages uses
{{ variable }}
to insert the value of a variable into your output, so that is conflicting with the use of braces in LaTeX notation. The{{
at the beginning of{{p_i}...
is being picked up by the Liquid template as an attempted variable reference that isn’t closed properly by}}
since the next brace is a single brace. You will need to either protect the braces in the math (perhaps via\{
) or do something like insert spaces so that you have{ {
rather than{{
(I haven’t tested either of those suggestions).In any case, it is something that must be dealt with at the template level, as it occurs long before MathJax itself is involved.
I tried opening an issue in Jekyll, but the Submit button remains greyed out even if I have filled all fields.