Skip to content

Super/sub-scripts

The typesetting of super/subscripts in equations is very easy in LaTeX:

LaTeX-rendering
\begin{align} 
  x_{b} = 3 
\end{align}

However, typesetting a variable with a multi-letter subscript most often goes wrong:

LaTeX-rendering
\begin{align}
  x_{problemform} = 2 
\end{align}

What happens? LaTeX puts extra spacing in between the letters of the subscript. This is due to the fact that it interprets the subscript as a product of the variables \(b\), \(a\), \(d\), \(f\), ..., \(m\). Some typefaces mask this effect. However, the more modern OTF/TTF fonts show this extra space. To remove it, you should instruct LaTeX to consider it as a text.

LaTeX-rendering
\begin{align}
  x_{\textsl{noproblemform}} = 1 
\end{align}

Personally, I define the following macro to typeset complex variablenames with subscripts:

LaTeX-rendering
\newcommand\xx[2]{\ensuremath{\textsl{#1}_{\textsl{#2}}}}
\begin{align}
  \xx{v}{OUT}(s) = H(s)\cdot\xx{v}{IN}(s) 
\end{align}

I have no doubt you already realized that the entire concern also holds for superscripts.