mathjax / MathJax

Beautiful and accessible math in all browsers
http://www.mathjax.org/
Apache License 2.0
10.22k stars 1.16k forks source link

redefining \cal breaks \mathcal #850

Closed davidfarmer closed 10 years ago

davidfarmer commented 10 years ago

If I define \cal to be \mathcal, then \mathcal stops working.

Here is a minimal example demonstrating the problem:

http://aimath.org/~farmer/print/mjerr1.html

Tested in Firefox 28.0 and Safari 6..1.3.

dpvc commented 10 years ago

That is because \mathcal is defined in terms of \cal in MathJax, essentially \def\mathcal#1{{\cal #1}}. So when you \def\cal{\mathcal}, you create an infinite loop, which MathJax flags as a problem.

davidfarmer commented 10 years ago

This arose as I was processing someone's LaTeX math paper into HTML. I will flag this as an error and remove the definition as part of the processing.

pkra commented 10 years ago

@davidfarmer since the combined configuration files load the noError extension, you won't see the error. But see http://codepen.io/pkra/pen/bwsJh for what MathJax reports.

pkra commented 10 years ago

FYI, I learned recently from Davide that

TeX: {noUndefined: {disabled: true}}

works with the combined configuration files as well.

Closing this as expected behavior.