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.

How can I display the index of P0 has a small letter, as well as Pn-1 (where the n-1 is small) ?

I know it's a simple thing but i'm starting with latex and not being able to hit the correct keywords on google.

share|improve this question
7  
If you're starting out, you may find Tobias Oetiker's Not So Short Introduction to LaTeX 2e or one of its translations to be worth reading. This particular question is covered in section 3.3 of that document. –  Mike Renfro May 13 '12 at 13:47
add comment

1 Answer

up vote 7 down vote accepted

Math mode

In LaTeX (and TeX) the subscript is represented by an underscore _ and only available in math mode. If only one charcacter follows you can type _x if there are more characters in the subscript, you must use braces _{xyz}.

There are two styles of math:
Inline math, shown with dollar sings $...$ or with \(...\)*,

Soe if we say $P_0$ and $P_{n-1}$ are stupid, we can assume that ...

and display style math, which could come in several ways, e.g.

Now we se that
   \[P_0 = p_{n-1}\]
and guess that ...

To write text like indices in math mode it’s recommended to use \text from the amsmath package (or via mathtools), e.g.

Assuming that ... $x_\text{min}=0$ ...

* The dollar sings $ are the old TeX syntax but work with LaTeX. The parenthesis version \( \) only works with LaTeX.

Text mode

For the text mode there is only a \textsuperscript{text}. With KOMA-Script you will also get \textsubscript{text}.


I strongly recommend that you read some LaTeX guides to learn the basics. See What is the best book to start learning LaTeX? or consult you local book dealer.

share|improve this answer
    
The KOMA-classes also provide a \textsubscript{<sub>}. –  cgnieder May 13 '12 at 13:46
    
@cgnieder: Thanks, I know. I added it after posting a first short answer :-) –  Tobi May 13 '12 at 13:49
    
Thanks that's exactly what I needed :) –  fmsf May 14 '12 at 17:35
add comment

Your Answer

 
discard

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.