When you want some math, we have XML elements you fill with LaTeX. That works
pretty well. But then you are tempted to use the \text{} macro. You might
really need it, like for part of a \cases, or part of a definition of a set.
Now you are doing text, but back to being subject to the mercy of LaTeX.
MathJax passes the contents of \text{} through without processing, so bare
special characters like # & % appear to render fine by accident. This was never
correct LaTeX, and PDF output via LaTeX would have always failed on these bare
characters.
Not anymore. We have adjusted the MathJax configuration to require the escaped
versions, \#, \& and \%. So this may be a breaking change for you, especially
if you live in an HTML-only world. Why now? This will need to happen when we
upgrade to MathJax 4 (soon!), so I'd like to have this be a separate event. And
there really isn't a clean way to handle the transition.
We have added a warning at teh debugging level. If we wanted to parse raw
LaTeX, we never would have started PreTeXt, so we don't have much confidence and
we will remove it at the first opportunity. So please report false positives.
You can see the new versions in action, plus a bit more information, in the
sample article at:
Subsection 7.10: Special Characters in Text Mode
https://pretextbook.org/examples/sample-article/html/section-mathematics.html#subsection-special-characters-text-mode
Questions and comments on pretext-support or pretext-dev, as appropriate.
Rob