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

When I try to add subscript(I write O_L and O_R to denote left and right ) in my text all the text after that becomes italicized. Any ideas what might be causing this?

share|improve this question
see also tex.stackexchange.com/questions/1013/… – Caramdir Jun 8 '11 at 17:27
i'm surprised that nobody has mentioned the fact that unless O_L and O_R are entered in math mode, the job should stop with the error message ! Missing $ inserted. that's an unambiguous indication that math mode is being entered as tex tries to recover. the _ and what's being subscripted need to be explicitly in math mode to avoid side effects. – barbara beeton Jun 9 '11 at 12:35

What is causing this behavior is the difference between TeX's math mode and text mode. In math mode, each character is a separate entity. Mathematicians, unlike programmmers, don't believe in long expressive names. To a mathematician, a two-character identifier is one character too long.

It's not just your subscripted names that are subject to this treatment. Suppose you have some variable named 'foobar' and you want to use this name in some math expression. To you, that 'foobar' is just a multi-character identifier. That is not how TeX views things in math mode. In math mode, TeX views 'foobar' as if it were 'f*o*o*b*a*r', but with implicit rather than explicit multiplication. TeX will insert a small amount of space between each letter to show that each letter is indeed a separate entity and that these entities are connected by implicit multiplication.

You need to override this behavior whenever you have a multi-character identifier, a multi-character subscript, a multi-character superscript, or any other multi-character entity and TeX is in math mode. There are lots of ways to accomplish this. All of them temporarily throw TeX back into LR (text) mode. One simple approach is to put the entity in a box. Another, and my personal choice, is to use the \text command provided by the AMS math package. Then again, that is because I \RequirePackage{amsmath} or \usepackage{amsmath} in all of my LaTeX documents.

share|improve this answer

The way I use subscript and superscript in regular text is using the following two commands


Then it's just a matter of using


Of course, you can name those as you want, you don't hate to keep the french names I use :)

share|improve this answer

You can't use the subscripts in text mode but only in math mode, so you have two options: the one suggested by xport or using the specific command given by the babel package. For example if you write in italian, the package babel allows you to use the command \ped in this way:


I think it will exist a similar command for your language too!


It looks like that the \ped and \ap commands are defined only for italian! If you want to use them you can copy the definitions from the babel manual. So the next example will work:

\usepackage[<your language>]{babel}

\DeclareRobustCommand*{\bbl@ped}[1]{\textormath{$_{\mbox{\fontsize\sf@size\z@ \selectfont#1}}$}{_\mathrm{#1}}}%


As you can see the positions of subscript and superscript together is a bit different than the one in math mode!

share|improve this answer
Age of empire: O$_\textrm{\scriptsize R}$ and O$_\textrm{\scriptsize L}$. What is next?
share|improve this answer
It worked ! Thanks – rty Jun 8 '11 at 17:13
Semantically there is a better solution. Check the link Caramdir posted in a comment above (this question is a duplicate of that question). – N.N. Jun 8 '11 at 17:33

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.