Generalsubscripts with mbox

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
daviddoria
Posts: 60
Joined: Tue Sep 30, 2008 9:24 pm

subscripts with mbox

Post by daviddoria »

when I do something like this

Code: Select all

r_\mbox{12}
To indicate the 1st row, 2nd column entry of a matrix, the subscripts are way bigger than they should be. Is this not how I'm supposed to do non-italicized subscripts?

Thanks,
Dave

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

subscripts with mbox

Post by gmedina »

Hi,

the \text command provided by the amsmath package could be useful. Please compare the results obtained in the following example:

Code: Select all

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$r_{ab}$

$r_{\text{ab}}$

$r_{\mbox{ab}}$

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
daviddoria
Posts: 60
Joined: Tue Sep 30, 2008 9:24 pm

Re: subscripts with mbox

Post by daviddoria »

beautiful :)
daleif
Posts: 199
Joined: Wed Nov 19, 2008 12:46 am

subscripts with mbox

Post by daleif »

Do NOT use \text for wordlike subscripts!

Code: Select all

\documentclass{memoir}
\usepackage{amsmath}
\begin{document}
\[
   blah_{\text{test}}
\]
\itshape not italic text
\[
   blah_{\text{test}}
\]
still italic, but this is the right way:
\[
   blah_{\textup{test}}
\]
\end{document}
many people make this mistake. \textup is also better than \textrm as \textrm would disable sans-serif if it was present, \textup just disables italics (and of course changes to the text font)
Post Reply