I know how to write a usual index with the help of the underscore, but I seem to be unable to find out how to write an (upper/lower) index in front of a letter/text.

These kind of indices are common in chemistry.


4 Answers 4


You have to supply a "fake" object for TeX to put indices to:


However, for chemistry typesetting you should use one of the specialized packages, such as mhchem. This example is taken from mhchem documentation:


It will typeset the symbol for a positive Thorium ion with a charge of 90 and atomic mass of 227.


  • I had about the same answer, but you were quicker :). Since I already hat the screenshot I added it to your answer. I hope you don't mind.
    – Caramdir
    Aug 17, 2011 at 17:28
  • As I use MathJax this works great! Aug 17, 2011 at 17:36

mathtools provides among other useful things the prescript command for this. Verbose, but useful if you don't want to fiddle with negative spaces and fake objects.


enter image description here


The easiest in this case would be to use the leftidx package. Taken directly from the package documentation:

\usepackage{leftidx}% http://ctan.org/pkg/leftidx


The package offers the command \leftidx{<left indices>}{<stuff>}{<right indices>}.


I just saw this package a few minutes ago and it has a good example of this. There are probably other packages for Chemistry usage though.



This example is directly copied form the tensor package.

Not the answer you're looking for? Browse other questions tagged or ask your own question.