I interpret your questions being mainly about the purpose (or purposes) of having different rules for the typesetting of superscripts and subscripts depending on whether the immediately preceding material is (a) a right-parenthesis -- which happens to be, in TeX jargon, an "atom" of type "math-close" -- or (b) a right-hand curly brace that ends a math "group". (As @egreg has notes in his answer, the direct answer to the why is given in Appendix G of the TeXbook: TeX uses different rules depending on whether or not it can "inspect" the material that immediately precedes the sub/superscript material. Math material in curly braces creates a new "nucleus" or box; once the material is placed in the box, TeX knows the width, height, and depth of the box, but nothing further.)
To understand the purpose of having these differing rules, it's important to recall that TeX was designed in large part to typeset mathematical expressions beautifully, in both display style (i.e., offset equations) and text style, i.e., running text. For running text, a commonly used criterion for typographical beauty is uniform color (grayness, if you prefer) of the text block. To achieve this objective, it really helps if
- different paragraphs within a page and across pages have approximately the same amount of color regardless of what's in the paragraphs, as well as if
- individual lines of text within one and the same paragraph are evenly spaced.
For many Roman fonts (in German, I believe they're called "Antiqua" fonts) that are suitable for running text, the distance between consecutive "single-spaced" lines is generally set to be 20 percent larger than the nominal font size. E.g., a 10pt font is given an interline spacing of 12pt -- 10/12
for short -- in single-spaced text. (Blackletter fonts, in contrast, can generally be set "solid", e.g., 10/10
.) For this setting of interline spacing to have a chance to produce the desired outcome in terms of color, it's important that nothing be allowed to protrude too much into the interline whitespace.
What, you may ask, does all this have to do with your question, i.e., with reasons for having different algorithms for positioning sub- and superscripts?
Consider the following two paragraphs, which are both set 10/12
. The first paragraph features a combination of lipsum filler text and expressions of the form $(x+y)^8_8$
; the second paragraph has the same filler sentences plus expressions of the form ${(x+y)}^8_8$
:
All lines in the first paragraph are evenly spaced, whereas this isn't the case in the second paragraph. The difference between the paragraphs, by construction, is the positioning of the superscripts and subscripts of the math expressions. Without the curly braces around the (x+y)
terms, TeX notices that the term that precedes the subscript and superscript is )
; in such a case, TeX uses a specialized algorithm to position the subscript and superscript quite tightly: notice that the subscripts do not fall below the )
symbol and that the superscripts barely rise above the parentheses. The consequence of the tight positioning of the sub- and superscripts for the appearance of the paragraph as a whole is that no adjustments are necessary to the default interline spacing, resulting in a nice even color.
In contrast, if curly braces are used, TeX doesn't "know" that the expression encased by braces ends with a parenthesis and therefore chooses a different, more generic algorithm for placing the subscript and superscript terms. This, it turns out, leads to a more pronounced protrusion of the terms into the interline whitespace, forcing TeX to enlarge the interline whitespace slightly. The result is non-uniform line spacing within one and the same paragraph -- ugly!!
In sum, there is indeed a very good reason for not using {
and }
unnecessarily: doing so might interfere with TeX's ability to typeset paragraphs beautifully. :-)
\documentclass{article}
\newcommand\lipsi{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. }
\newcommand\lipsii{Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. }
\newcommand\lipsiii{Curabitur~dictum gravida mauris. }
\newcommand\lipsiv{Nam libero, nonummy eget, consectetuer id, vulputate a, magna. }
\newcommand\withoutbraces{$(x+y)^8_8$ }
\newcommand\withbraces{${(x+y)}^8_8$ }
\hyphenation{purus dictum vulputate}
\begin{document}
\lipsi \withoutbraces \lipsii \withoutbraces \lipsiii \withoutbraces \lipsiv \lipsi \lipsii \lipsiii \lipsiii
\medskip
\lipsi \withbraces \lipsii \withbraces \lipsiii \withbraces \lipsiv \lipsi \lipsii \lipsiii \lipsiii
\end{document}
Addendum: It's possible to restore uniform line-spacing for the second paragraph by setting it at 10/13
, i.e., with one more point of "lead". That still doesn't lead to an entirely satisfactory outcome, though, as now lines that contain no material with subscripts and/or superscripts start to look isolated from their adjacent lines. In short, if 10/12
is deemed to be OK for typesetting running text, the typesetting engine should be enabled to typeset any math objects -- assuming, of course, that they're not so large as to deserve being typeset offset on a line by themselves! -- in such a way as not to interfere of keeping the text at 10/12
.