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.

Writing ${\dot X^a}^b$ produces a very cryptic "double superscript" error: this has been explained here on this forum: the reason is that {\dot X}^a generates an Acc atom and that, for a reason that only Knuth must know, putting braces around a single Acc atom does not work to turn it into an Ord nucleus like it does for any other math list (see page 291, ¶5, of the TeXbook, quoted in the aforementioned thread).

What I'd like to know, now, is why $\mathord{\dot X^a}^b$ (or, for that matter, ${\mathord{\dot X}^a}^b$) doesn't work any better: unlike simple grouping, \mathord is not supposed to have any weird exception for single Acc atoms, at least if I believe the TeXbook (just two paragraphs below).

It's simple enough to work around ($\mathord{{}\dot X^a}^b$ works, or simply ${{}\dot X^a}^b$), and of course one shouldn't be writing this sort of thing anyway, but what I'd like to know is: does this count as a bug in TeX? Do I win a $327.68 check from Knuth ;-), or is there some fine print somewhere in the TeXbook or elsewhere that explains how \mathord is supposed to work?

share|improve this question
    
What are you trying to accomplish? The \dot accent produces an Ord atom anyway …? –  Qrrbrbirlbel Mar 12 '13 at 17:10
    
@Qrrbrbirlbel: I'm merely trying to understand what's going on within the bizarre internals of TeX. And no, \dot really seems to produce an Acc atom (why do you think it would be Ord?). –  Gro-Tsen Mar 12 '13 at 17:23
    
Let me clarify: \dot is an “Acc” atom. \dot makes \dot X an Ord atom. TeXbook: “Other kinds of atoms, which arise from commands like […] \mathaccent […], are all treated as type Ord […]” (p. 170). –  Qrrbrbirlbel Mar 12 '13 at 17:28
    
@Qrrbrbirlbel: It's still an Acc atom, it's only treated like an Ord in horizontal spacing. –  Hendrik Vogt Mar 12 '13 at 17:47
2  
I'm afraid you have discovered that \mathord{<math>} is exactly the same as {<math>}. See also module 1186 in tex.web where the "brace removing" around an Acc atom is described. –  egreg Mar 12 '13 at 19:15
show 2 more comments

1 Answer

I'm afraid you have discovered that \mathord{<math>} is exactly the same as {<math>}. See also module 1186 in tex.web where the "brace removing" around an Acc atom is described:

1186 Now at last we’re ready to see what happens when a right brace occurs in a math formula. Two special cases are simplified here: Braces are effectively removed when they surround a single Ord without sub/superscripts, or when they surround an accent that is the nucleus of an Ord atom.

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.