# [texhax] Forcing size changes in exponents

bnb at ams.org bnb at ams.org
Sun Aug 16 17:45:05 CEST 2015

On Sun, 16 Aug 2015, Michael Barr wrote:

I have often been criticized by posters on these boards for "not using LaTeX".  Why I should care is a real question.  But here is something I really tried to do in LaTeX and failed, although it is almost trivial using the deprecated command \rm:

\def\op{^{\rm op}}
$A\op$
$A^{A\op}$

When I tried do it using \textrm, the size did not change.  So I added \scriptsize.  I expected the first line to be correct, I expected the second would not.  Instead I got a missing $error. I tried sprinkling some$ signs into the defiinition and the first one worked (although I don't see why), but the second still caused an error.

So how can you do this in pure LaTeX?

try this:

\documentclass{article}
\newcommand{\op}{^{\mathrm{op}}}
\begin{document}
$A\op$
$A^{A\op}$
\end{document}

(tex live 2015), \rm and the other 2-letter
font changes (except, i think, \em) have
been disabled.

\mathrm has been the recommended latex
math font specification for many years.
it does change sizes as expected.

i sympathize with your desire to be able
to use the same vocabulary in plain tex
and latex, but it really isn't possible.
-- bb