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

$8^(a - b)$ produces only a superscripted (; the rest of the power is not superscripted.

How can I superscript the whole (a-b) portion?

share|improve this question
Please read any introduction to (La)TeX. The FAQ is a good starting point. – Martin Schröder Jan 27 '12 at 15:40
up vote 22 down vote accepted

Put braces around the entire part that you want superscripted:

$8^{(a - b)}$

Note that from the mathematical point of view, the parentheses () are superfluous here and can be omitted:

share|improve this answer

To always get it right you can define a command probably like


For example:

share|improve this answer
In my opinion, such macro is un-useful. I always find the \ensuremath command mis-leading, because you should know if you are in math-mode or not. If any, I define \newcommand{\upp}[1]{^{(#1)}} and use it 8\upp{a-b} ("upp" as "up--parenthesis") – yo' Jan 27 '12 at 17:56
I would in this case write the power as \smash{(}a+b\smash{)} because ()'s in powers have a tendency to affect line spacing if used in the normal text. – daleif Jan 27 '12 at 18:16
The \ensuremath I only use it as a safety precaution. It is the first time I am seeing the \smash command. My answer, in no way is the best, but it may be an alternative to the norm, I guess..... – azetina Jan 27 '12 at 19:00

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.