# How to set a function with dash and subscript

In

$f_3$


the subscript is higher than in

$f'_3$.


So how does one set a function with dash and subscript correctly?

-
Normally the adjustment is only needed if f_3 and f'_3 appear in the same formula; just do f^{}_3 in that case. It's not the only case where this trick is needed: look at a_1a_2^2 and a_1^{}a_2^{2}. – egreg Feb 15 at 9:19
the more usual name for this superscript symbol is "prime". – barbara beeton Feb 15 at 15:47

I would input f'_{3}.

Beside this: it's a feature of TeX, not a bug, that the subscript position change if there is also a superscript. See Appendix G of the TeXbook. But you can change the fontdimens:

\documentclass{article}%
\begin{document}

$\hbox{}$%initialize math
\fontdimen16\textfont2=2.7pt
\fontdimen17\textfont2=2.7pt
$f^{}_3 f_3 f^{'}_3 f'_3$

\end{document}


The change is global, so if you want to revert it you will have to save the original values. There is also a package subdepth which does something similar.

-
Thanks. I don't see how f'_{3} gives a output from f'_3. But the global change is helpful. – Daniel Feb 15 at 9:19
f_3 and f_{3} is equivalent, but the braces don't hurt, and as you need them for longer subscripts anyway, it is only consequent to use them always. – Ulrike Fischer Feb 15 at 9:27

Compare $f^{}_3 f_3 f^{'}_3 f'_3$

-
Thanks. As mentioned, the second looks out of line to me. For the third the dash seems a bit too high. So I guess the first and last are the ones to go. Strange that LaTeX does not set them in line by default, i.e. $f_3$ and $f'_3$ being in line. – Daniel Feb 15 at 8:40