From: Mark Wooding Date: Thu, 18 May 2023 21:55:06 +0000 (+0100) Subject: mdwtab.dtx: Add a sneaky kern after `\multicolumn'. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mdwtools/commitdiff_plain/refs/heads/mdw/tangle?hp=9cb5c64cc696cd59cf723021386b254ab8de5b13 mdwtab.dtx: Add a sneaky kern after `\multicolumn'. I don't know, any more, why `\tab@tabcr' does `\@maybe@unskip' if it's in hmode and you ask for a nonzero interrow gap, but it does. And the result, if you put `\multicolumn' in the last column of a row, terminated by `\\[...]', is that the `\tabcolsep' glue gets eaten, and, in a right- or centre-aligned row, the cell contents ends up misaligned. So add `\kern 0pt' to make it not do that. --- diff --git a/mdwtab.dtx b/mdwtab.dtx index 97320f3..11cf692 100644 --- a/mdwtab.dtx +++ b/mdwtab.dtx @@ -36,7 +36,7 @@ %<+color> [2020/09/06 1.14.0 Fix for people who can't spell] % \end{meta-comment} % -% \CheckSum{3424} +% \CheckSum{3426} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -3525,6 +3525,9 @@ % which seems a little silly. Then again, I forgot to do it the first % time around.) % +% Again, we have a sneaky |\kern| to prevent the final |\tabcolsep| glue from +% being eaten by a later |\unskip|. +% % \begin{macrocode} \long\def\multicolumn#1#2#3{% \multispan{#1}% @@ -3535,6 +3538,7 @@ \let\tab@looped\tab@err@multi% \tab@readpreamble{#2}% \the\tab@preamble% + \kern\z@% \endgroup% \ignorespaces% }