Consider the following:
\documentclass{article}
\begin{document}
What I have:
\[x^{1+1}\]
What I would like:
\[x^{1\,+\,1}\]
That is, I will like to have spacing around the operator as in `$1+1$'.\\[\baselineskip]
\textsf{Question:} How do I get the above throughout my document without having to add \verb|\,| on each side of the operator every time?
\end{document}
Best Answer
Luatex has primitives to control the space added between each class in each math style, so to control the space between a mathord and a mathbin in script style:
For classic TeX engines You can do
But it's not so good, it always adds the space so only works if
+
is used as a binary operator between to mathord atoms. Note the final prefix+c
in the last term gets the wide space, which isn't really what you want, you'd need a separate command to access a prefix+
.In an answer linked via comments I suggested a construct using
\nonscript
which looks more involved but actually I think it has the same flaw.The version suggested by egreg using
\text
gets the correct spacing but it requires more markup than just adding the space (although of course you could define your own variant\sp
command that made superscripts using this construct).