Consider this preamble:
\tabskip=0pt plus1fil#&#&#\tabskip=0pt
The last template is #
, so it should not matter whether a line is \BOX&\BOX&\cr
or \BOX&\BOX\cr
. But it turns out, it does matter, but only when there is a line with \span
. I would like to understand why the &
before \cr
is important. For example:
\def\BOX{\vrule width50pt height8.5pt depth3.5pt}
\vbox{\offinterlineskip
\halign to 16em{\tabskip=0pt plus1fil#&#&#\tabskip=0pt\cr
\BOX&\BOX&\cr
&\span\leaders\vrule height8.5pt depth3.5pt\hfill\cr
}}
\vbox{\offinterlineskip
\halign to 16em{\tabskip=0pt plus1fil#&#&#\tabskip=0pt\cr
\BOX&\BOX\cr
&\span\leaders\vrule height8.5pt depth3.5pt\hfill\cr
}}
For conveniency, there is a ruler. We can easily see that the second column shifts by 25pt when &
before \cr
is removed:
% ruler:
\vskip5pt
\def\\#1{\hbox to 10pt{\hfil#1}}
\def\1{\vrule height 0pt depth 2pt}
\def\2{\vrule height 0pt depth 4pt}
\def\3{\vrule height 0pt depth 8pt}
\def\4{\\\1\\\1\\\1\\\1\\\2\\\1\\\1\\\1\\\1\\\3}
\hbox to160pt{\hrulefill} \nointerlineskip
\hbox{\3\4\\\1\\\1\\\1\\\1\\\2\\\1} \nointerlineskip
\font\7=cmr7 \font\5=cmr5
\hbox to360pt{\rlap{\70}\kern50pt\rlap{\550}\kern50pt\rlap{\7100}\kern50pt
\rlap{\5150}\hss}
\tabskip
glue? – egreg Jan 20 '20 at 8:49g0 w50 g30 w50 g30 w0 g0
andg0 w50 g30 w50 g30 w0 g0
(here the secondw50
is an overfull box with filler glue set to 80 - the result of\span
). In the secord halign we have such lines:g0 w50 g55 w50 g55
andg0 w50 g55 w50 g55 w-50 g0
and I'm completely stymied where these results come from, especially that number of boxes and glue in first line and second line are different. – Igor Liferenko Jan 21 '20 at 2:35