Over-riding auto-repeated \tabskip for final column of alignment [UNIV: iniTeX].

Philip Taylor (Small Acres) P.Taylor at Trezaise.Uk
Wed Feb 15 14:20:05 CET 2023


Consider the following iniTeX program —

The "&&" in line 5 causes the remaining preamble elements (other than 
the \cr) to be repeated as many times as are required by the data that 
form the body of the alignment (in this case, just "&a&&b&\cr"). The 
\tabskip = 0 pt at line 2 ensures that the first \vrule aligns with the 
left margin, and the \tabskip = 0 pt plus 1 fil of line 5 ensures that 
every cell is nicely centered between its surrounding \vrule s.  
Unfortunately a problem occurs with the final column, where once again 
we need [the effect of] \tabskip = 0 pt to force the final\vrule to 
align with the right margin, but because we are auto-repeating a part of 
the preamble, we have no access to the preamble pattern which will be 
used for the final column only.  Inserting \tabskip = 0 pt into the body 
of the alignment at the appropriate point has no effect — \tabskip s are 
honoured only in the preamble.  Can anyone suggest how the final \vrule 
can be forced to align with the right margin, and therefore with the 
right extremes of the \hrule s above and below ?  A "hacky" solution 
would be to adjust the width of the \hrule s on an /ad hoc/ basis (e.g., 
\everycr = {\noalign {\hrule width 0,805 \hsize}}), but this is ugly and 
I would seek to avoid it if possible ...

 1. \everycr = {\noalign {\hrule}}
 2. \tabskip = 0 pt
 3. \halign to \hsize
 4. \bgroup
 5.      \tabskip = 0 pt plus 1 fil #\vrule height 3 ex depth 1 ex &&
    \hfil #\hfil & #\vrule \cr
 6.      &a&&b&\cr
 7. \egroup
 8. \end

--/
Philip Taylor/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20230215/c12df2e3/attachment.html>


More information about the texhax mailing list.