Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Strange brace removal

0 views
Skip to first unread message

Martin Costabel

unread,
Jul 23, 2008, 3:01:02 PM7/23/08
to
The TeX command

${a_b}_c$

gives what one expects, namely two indices, the second a little lower.
One would expect that

${\hat{a}_b}_c$

looks similar, with a hat on the $a$. In reality, one gets a "Double
subscript" error.

I traced this to the following rule in the TeXbook, page 290:

"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."

Does anyone have a (historical or technical) explanation for this
strange rule that can have unexpected and annoying consequences as in
the example above?

BTW, as the rules implies, writing

${{}\hat{a}_b}_c$

gives exactly the expected result.

--
Martin

Donald Arseneau

unread,
Jul 24, 2008, 10:37:37 AM7/24/08
to
On Jul 23, 12:01 pm, Martin Costabel <costa...@wanadoo.fr> wrote:
> ${\hat{a}_b}_c$
> Does anyone have a (historical or technical) explanation for this
> strange rule that can have unexpected and annoying consequences as in
> the example above?

There is a note about it in the bug-report-replies from Don Knuth
recently.
He has a vague recollectiuon that there were some problems with doing
it
the sensible way.

I suspect it was over-zealous treatment of "math atom" where
"nucleus"
was called for, but once it got documented it was frozen.

Wolfgang Helbig

unread,
Jul 24, 2008, 11:59:22 AM7/24/08
to

It was documented only in 3/24/90, i.e., while updating the TeXbook
for version 3.0. (see errata.six).
So this might be an "undocumented feature" before 3.0 or it was
introduced in 3.0.
Where are those "bug-reports-replies"?

Donald Arseneau

unread,
Jul 29, 2008, 2:43:07 AM7/29/08
to
On Jul 24, 8:59 am, Wolfgang Helbig <hel...@lehre.ba-stuttgart.de>
wrote:

> > > ${\hat{a}_b}_c$

> It was documented only in 3/24/90, i.e., while updating the TeXbook


> for version 3.0. (see errata.six).

The behavior is correctly described in my copy, which is the second
printing, 1984. Was it clarified? Ah yes, he included the exception
on
page 290, whereas it was originally only described on p 291.

> Where are those "bug-reports-replies"?

I thought the tex-implementors mailing list archive, but I don't see
it on
the tug site and the CTAN archive ends in 1993! Maybe Barbara
Beeton can direct us all.

Donald Arseneau
as...@triumf.ca

0 new messages