Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to put two subscripts at the left and right of a character. For example, something like: _{t} p_{x} where p is in the middle. How do you do this?

share|improve this question
Just remove the space between the _{t} and the p: $_{t}p_{x}$ should work. –  Alan Munn Feb 20 '11 at 1:24
@Alan: Why a comment? –  Caramdir Feb 20 '11 at 1:40
@Caramdir It just seemed so short. I've added it as an answer. –  Alan Munn Feb 20 '11 at 1:51
Since this is essentially about left subscripts, you can also have a look at the answers to this question (possible duplicate). –  Hendrik Vogt Feb 20 '11 at 6:54
@Caramdir: The space has no effect in math mode ... –  Hendrik Vogt Feb 20 '11 at 6:57
add comment

5 Answers

Are you doing this in math mode?


should work.

share|improve this answer
Spaces are ignored in math mode. $ _ t p _ x $ produces exactly the same effect. –  TH. Feb 20 '11 at 5:31
@TH. I never realised that. So whatever elicited the original question may have been lack of math mode altogether? I'll update the answer. –  Alan Munn Feb 20 '11 at 13:07
I would go for {}_{t}p_{x}, otherwise things like \sum _{t}p_{x} give surprising results. –  Bruno Le Floch Feb 20 '11 at 14:11
I think that the t and x are not aligned using this approach –  becko Dec 2 '13 at 22:22
add comment

The tensor package will do exactly what you require, and more. For your particular case, you need only type



share|improve this answer
add comment

You could use the leftidx package which is capable of producing left and right subscripts and superscripts.

In contrast to using simply consecutive subscripts or superscripts such as in $_{t}p_{x}$ it takes care of adjusting indices to the argument using \vphantom. From its source:

share|improve this answer
add comment

The amsmath package has a \sideset command which lets you put indices at alll four corners of a symbol (even if this symbol itself has limits above/below):

\[  \sideset{_t}{_x}p  = \sideset{^*_*}{^*_*}\prod_*^*  \]
share|improve this answer
Good addition! Just a remark: \sideset is intended to be used with large operator symbols such as \sum and \prod. The amsmath documentation says: this command is not designed to be applied to anything other than sum-class symbols. –  Stefan Kottwitz Feb 20 '11 at 2:55
@Stefan: Ah, thanks ... I knew I should have looked it up before writing this. – So, don't use this with simple letter-symbols, use the other solutions given here. –  Paŭlo Ebermann Feb 20 '11 at 3:03
add comment

There are many tools for scripts:

  • For general math scripts before something, use \prescript provided by mathtools package, for better alignment:

    $ \prescript{14}{2}{\mathbf{C}} $

  • For large operators, use \sideset from amsmath:

    $ \sideset{_a^b}{'}\sum A_n $

  • For chemical equations, use mhchem package:


  • For tensors, use tensor package:

    $ M\indices{^a_b^{cd}_e} $
    $ \tensor[^a_b^c_d]{M}{^a_b^c_d} $

Please complete this list as you can.

share|improve this answer
+1: I think that this is a great answer because it acknowledges the semantic element of LaTeX environments. Using tensor for, say, denoting an isotope is ontologically dodgy and its visual suitability is contingent on some hypothetical divergence of notation not occurring down the line. –  Richard Terrett Feb 21 '11 at 4:53
I tried most of these and found the \tensor solution the best one. –  Love Learning Apr 29 at 12:20
add comment

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.