TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Maybe tex.stackexchange.com/questions/334/non-kludgey-left-subscripts has what you need. – Caramdir Aug 17 '11 at 17:21
These two questions might answer your question: tex.stackexchange.com/questions/11542/left-and-right-subscript, tex.stackexchange.com/questions/8255/… – doncherry Aug 17 '11 at 17:21
Since you want to typeset chemical formulas, maybe the mhchem package helps. – Caramdir Aug 17 '11 at 17:23
Although you can solve the problem in the ways mentioned below, you should still consider searching CTAN for chemistry specific packages that are supported by your system. These packages will give the "look and feel" that a professionally typeset chemistry publication will have. – DJP Aug 17 '11 at 17:39
up vote 20 down vote accepted

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.


share|improve this answer
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 '11 at 17:28
@Caramdir: Thanks! – Andrey Vihrov Aug 17 '11 at 17:35
As I use MathJax this works great! – Martin Vseticka Aug 17 '11 at 17:36

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>}.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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