Bug: underscore not handled correctly in \text{} macro
Created by: pkienzle
Issue Summary
With the amsmath package, LaTeX raises an error on \text{underscore_separated}
unless there is a leading backslash before the underscore. Mathjax renders with and without the backslash, but shows the backslash if it is included. This means that you cannot use the same input for both html and latex markup.
Steps to Reproduce
-
paste the following into the mathjax live demo page
erfc is the complementary error function $1 - \text{error_function}(x)$.
-
Compare this to the same markup in LaTeX (via overleaf shared latex editor):
Technical details
- MathJax Version: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM CHTML-full
- Client OS: Windows, Mac
- Browser: Firefox, Chrome, IE, Safari