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.

Minimal working example:

\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}

\[ {A^\mu}_\nu \]
\[ {\bar{A}^\mu}_\nu \]

\end{document}

The result isenter image description here.

Why is the placement of upper and lower indices in the second one wrong?

share|improve this question
    
you may remove \usepackage{amsmath} to make it really minimal... ;-) –  jfbu Dec 3 '12 at 18:27
    
The explanation is exactly the same as in Double superscript error involving tilde. –  Hendrik Vogt Dec 4 '12 at 10:20
add comment

2 Answers

up vote 6 down vote accepted

From the TeXbook, p. 290:

A <math field> is used to specify the nucleus, superscript, or subscript of an atom. When a <math field> is a <math symbol>, the f and a numbers of that symbol go into the atomic field. Otherwise the <math field> begins with a {, which causes TeX to enter a new level of grouping and to begin a new math list; the ensuing <math mode material> is terminated by a }, at which point the group ends and the resulting math list goes into the atomic field. If the math list turns out to be simply a single Ord atom without subscripts or superscripts, or an Acc whose nucleus is an Ord, the enclosing braces are effectively removed.

So in the first example

\[ {A^\mu}_\nu \]

the <math field> is A^\mu which has a superscript, so the braces are not removed. In the second example,

\[ {\bar{A}^\mu}_\nu \]

we are in the other situation, because \bar{A} is an Acc atom. So the braces are removed and ineffective.

Why did Knuth choose to do this? I don't really know, but the main reason could be the connected to making double accents. In a case such as

\bar{\bar{A}^\mu}

one would like to put the second bar over \bar{A}, rather than over the whole subformulas. Actually the Plain TeX macros don't easily allow for making double math accents, problem which is solved by amsmath.

share|improve this answer
add comment

the question is not why is the positioning of the subscript "wrong" in the second example, but why is it the way it is in the first.

in "normal" circumstances, the positioning of the subscript in the second is what is wanted, not the "offset" arrangement -- unless you're indicating a tensor, in which case the order and position is different.

clearly, you want the offset. this input will give that result:

\[ \bar{A}^\mu{}_\nu \]

in fact, the {} pair (called an "empty group") is the preferred method of obtaining the offset even in the first case:

\[ A^\mu{}_\nu \]

i'll have to leave it to someone else to say why there isn't any offset with your second example.

share|improve this answer
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.