9

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?

7
  • What are you trying to accomplish? The \dot accent produces an Ord atom anyway …? Commented Mar 12, 2013 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
    Commented Mar 12, 2013 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). Commented Mar 12, 2013 at 17:28
  • @Qrrbrbirlbel: It's still an Acc atom, it's only treated like an Ord in horizontal spacing. Commented Mar 12, 2013 at 17:47
  • 3
    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
    Commented Mar 12, 2013 at 19:15

1 Answer 1

3

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .