TeX - ! Extra alignment tab has been changed to \cr
Carlos
linguafalsa at gmail.com
Sun Jul 7 02:16:58 CEST 2019
>
> TeX looks only for ‘\cr’commands, ‘&’, ‘#’, ‘\span’, and ‘\tabskip’. The
> glue following ‘\tabskip’ is scanned in the usual way (with macro expansion)
this is from page 238
And
This example merits careful study because it illustrates several things.
> (1)~The `|&|' ^^{ampersand} is like the {\sc TAB} key on many typewriters;
> it tells \TeX\ to advance to the next tab position, where there's a tab at
> the right edge of each column. In this example, \TeX\ has set up four tabs,
> indicated by the dashed lines; a dashed line is also shown at the left
> margin, although there isn't really a tab there. (2)~But `|&|' isn't
> exactly like a mechanical typewriter {\sc TAB}, because it first backs up
> to the beginning of the current column before advancing to the next. In
> this way you can always tell what column you're tabbing to, by counting
> the number of |&|'s; that's handy, because variable-width type otherwise
> makes it difficult to know whether you've passed a tab position or not.
> Thus, on the last line of our example, three |&|'s were typed in order to
> get to column~4, even though the text had already extended into column~2
> and perhaps into column~3. (3)~You can say `|\cr|' before you have
> specified a complete set of columns, if the remaining columns are blank.
> (4)~The |&|'s are different from tabs in another way, too: \TeX\ ignores
> ^{spaces} after~`|&|', hence you can conveniently finish a column by typing
> `|&|'~at the end of a line in your input file, without worrying that an
> extra blank space will be introduced there. \ (The second-last line of the
> example ends with~`|&|', and there is an implicit blank space following
> that
> symbol; if \TeX\ hadn't ignored that space, the words `the fourth'
> wouldn't have started exactly at the beginning of the fourth column.) \
> Incidentally, plain \TeX\ also ignores spaces after `|\+|', so that the
> first column is treated like the others. (5) The `^|\it|' in the last line
> of the example causes only the first column to be italicized, even though
> no ^{braces} were used to confine the range of italics, because \TeX\
> implicitly inserts braces around each individual entry of an alignment.
>
My issue notwithstanding the above, is the simple misleading message of
Extra alignment tab has been changed to \cr
When you ask an Anglophone speaking individual what from the above he/she
can understand from it,, that individual might reply - and rightly so -
that what the message conveys is that the \cr was applied to the newline,
Hence that extra alignment (unspecified or not) has been changed. So this
conversation would be nullified to start with.
If on the other hand, I were to translate the above to Spanish, and ask a
Spanish speaking individual what that message seems to convey to him/her,
that very same individual almost surely will agree with the Anglophone
counterpart.
I, unlike you, would be staggered if that is not modified accordingly by
Knuth. I highly doubt it, that the context of the TeXbook needs a revision
at this stage though.
On Sat, Jul 6, 2019 at 9:57 AM David Carlisle <d.p.carlisle at gmail.com>
wrote:
> On Sat, 6 Jul 2019 at 13:23, Carlos <linguafalsa at gmail.com> wrote:
> >
> > Hello list
> >
> > David a few months ago I brought up an issue with the infamous `Extra
> alignment tab has been changed to \cr` error attached to it, and you said ,
> quote
> >
> >> and the error is not detected until the & which is trying to put the
> >> Yes box into a third column of the table which only has two columns.
> >>
> >> there is no sensible way TeX could recover from this and guess your
> >> original intention.
> >
> >
> > http://tug.org/mail-archives/texhax/2019-January/023495.html
> >
> > And we certainly have been over this before, - even prior to the above -
> but I just want to confirm one more time, and based mostly on your
> past-past and past comments, who's to be blamed for....
> >
> > I thought at one time that this issue, namely the error with the
> misleading title of `Extra alignment tab has been changed to \cr` , was in
> your end of the LaTeX stick, but you threw the hands in the air and said
> that No no no, this is TeX fault.
> >
> > My question is this:
> >
> > Who's responsible to take care of this?
>
> Take care of what? Sorry I do not understand your message at all (or
> why you specifically sent it to me as well as the list?
>
> > The error is misleading either by wording or whatever other term you'd
> like to classify it under,
>
> Why is the error misleading?
>
> It has two parts both of which seem clear.
>
> .It is issued when an unexpected & is encountered
> "Extra alignment tab"
>
> and tex's recovery action is to change the & to \cr
>
> "has been changed to \cr"
>
>
>
> > Would it be Knuth himself the person to take care of fixing it?
>
> Yes but I would be staggered if he accepted that there was any bug to fix
> here.
>
>
> \documentclass{article}
> \def\test#1#2{\hbox to 2cm{#1}}
>
> \begin{document}
>
> \begin{tabular}{cc}
> \hbox to 2cm{working} \expandafter \cr & \hbox to 2cm {No}
> \expandafter \cr \hbox to 2cm {not working}{} &
> \test{Yes}{} \\
> \end{tabular}
>
> \end{document}
>
> this document is a weird mix of latex and tex primitive constructs
> it's not at all clear what you intend it to do, but it seems unrelated
> to your question about the alignment tab error as it runs without
> error?
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20190706/2aef168e/attachment.html>
More information about the texhax
mailing list