1

There are many packages for left super- and subscripts, but none of them seem to solve the central issue: The spacing between the left indices and the symbol often looks wrong. Most packages seem to use some variant of the idea of adding a \vphantom in front of the symbol, containing the symbol itself, to adjust the height of the indices. But \vphantom does not take care of the spacing around the indices. For instance, there is far too much room between the f and the a in the below code.

I know one can in principle fix this by hand by using space commands, but is there a more systematic solution? For instance, does there exist some TeX command that returns the value of the indentation of the right superscript? And can you use this to adjust the position of the left one? Or could one make an \indexphantom command such that \indexphantom{f}^a_b typesets the indices a and b with the same spacing as they would have had if there was an f?

\documentclass{article}

\begin{document}

$ \vphantom{f}^a_b f $

\end{document}

enter image description here

Gaussler
  • 12,801

1 Answers1

1

Surely I'm killing a fly with a cannon using tensor or other packages, but there are further solutions to write easily your request like the picture. I think that the last solution it is more closest with over/subscript near f.

\documentclass[a4paper,12pt]{article}
\usepackage{tensor}
\begin{document}
$\tensor*[^{a}_b]{f}{}$
\end{document}

enter image description here

or with isotope package:

\documentclass[a4paper,12pt]{article}
\usepackage{isotope}

\begin{document} $\isotope[a][b]{,\textit{f}}$ \end{document}

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}

\begin{document} ${}_{b}^{a}f$ \end{document}

enter image description here

Sebastiano
  • 54,118