Is there a way to get the superscript math mode behavior without using ^?
By way of background: I work at a large school that has a large web site that occasionally has math content on pages. I recently convinced the powers that be to start using MathJax to render all of the math content, but they have encountered a hitch. There is a collection of pages that is processed by complicated subsystems in an automated way, and I'm told that the ^ character is a control character at some stage(s).
So either they have to work around that, or I could start communicating the math without using ^ symbol. (I understand that I may still have a MathJax issue to move on to, but my issue starts with this LaTeX question.)
\spinstead of^for exponents; it doesn't seem possible in MathJax. Nothing can be done other than making a feature request to the developers. However, I have tried$\def\sp{^}a\sp{b}$on a page where MathJax is used and it appears to work, so it may be possible to add\def\sp{^}to some initialization file. – egreg May 21 '15 at 21:06\mathsuperscript{}, then that would answer my question here. I'd move on to see if MathJAx supports it. – alex.jordan May 21 '15 at 21:13\newcommand\sp[1]{^{#1}}to define \sp in mathjax (or use another name, as the behaviour is slightly different. – David Carlisle May 21 '15 at 23:18^as a control character…I feel a little hypocritical for saying this, but that's abhorrent. – Sean Allred May 22 '15 at 00:55^in place of the^(either in your math expressions, or in the definition of\sp) in order to get past the pre-processing of^. This is will be converted to the circumflex by the browser, but is not a literal^in the source file. – Davide Cervone May 22 '15 at 10:25$a = x\sp2$or$y = cx\sb6$. – Leon Chang Nov 25 '23 at 04:56