\
mbox
or \
textrm
:
$e = mc^2 \mbox{here we go again}$
The problem is that, with either, the size of the text remains firmly at the surrounding text size, so that
$z = a_{\mbox{other end}}$
looks quite painfully wrong.
The other simple technique,\
textrm
, is more promising:
$z = a_{\textrm{other end}}$
is definitely right. However, the surrounding text may not be in your
roman font; if you care about matching text, you need to choose
between \
textrm
, \
textsf
, and so on.
\
mathrm
) gets the
size right, but since it’s intended for use in maths, its spaces get
ignored — use \
mathrm
for upright roman alphabetic variable
names, but not otherwise.)
You can correct these problems with size selectors in the text, as:
$z = a_{\mbox{\scriptsize other end}}$
which works if your surrounding text is at default document size, but gives you the wrong size otherwise.
These short cuts are (just about) OK for the “occasional” mathematician, but serious mathematics calls for a technique that relieves the typist of the sort of thought required. As usual, the AMSLaTeX system provides what’s necessary — the\
text
command. The command is actually provided by the amstext
package, but the “global” amsmath package loads it, so
anyone using AMSLaTeX proper has the command available, so even
joke mathematicians can write:
\usepackage{amsmath} ... $z = a_{\text{other end}}$
and the text will be at the right size, and in the same font as surrounding text.
AMSLaTeX also makes provision for interpolated comments in the middle of one of its multi-line display structures, through the\
intertext
command. For example:
\begin{align} A_1&=N_0(\lambda;\Omega')-\phi(\lambda;\Omega'),\\ A_2&=\phi(\lambda;\Omega')-\phi(\lambda;\Omega),\\ \intertext{and} A_3&=\mathcal{N}(\lambda;\omega). \end{align}
places the text “and” on a separate line before the last line of the
display. If the interjected text is short, or the equations
themselves are light-weight, you may find that \
intertext
leaves
too much space. Slightly more modest is the \
shortintertext
command from the mathtools package:
\begin{align} a =& b \shortintertext{or} c =& b \end{align}
To have the text on the same line as the second equation, one can use
the flalign
environment (from amsmath)
with lots of dummy equations (represented by the double &
signs):
\begin{flalign} && a =& b && \\ \text{or} && c =& b && \end{flalign}
Comprehensive documentation of AMSLaTeX is to be found in amsldoc, in the distribution; it is also available on the web at ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=mathstext