Closed asmeurer closed 4 years ago
If you build the test build in the tests, it seems that double dollars still get picked up by MathJax, even when they are not parsed by the extension. I think the default MathJax config parses double dollar signs. We should change the default config, and document how to do it in the install instructions.
You need to add
mathjax_config = {
'tex2jax': {
'inlineMath': [ ["\\(","\\)"] ],
'displayMath': [["\\[","\\]"] ],
},
}
to the conf.py. I've added it to the test build and documented it.
This is ready to go.
Just for the record: It is considered very bad style to use double dollars in LaTeX, see e.g. https://tex.stackexchange.com/questions/503/why-is-preferable-to.
I think we should merge this (btw, I don't like how GitHub Actions deletes old logs. Maybe we should just use Travis here).
Fixes #4.
Note, it currently allows it in any context where single dollar signs are allowed. But this produces odd results in some cases, like in headers. So maybe we should be more restrictive.
Also, as discussed in #4, it currently parses unclosed dollar signs as text. It might better to raise an error in this case, and require them to be escaped.