Article View: comp.text.tex
Article #1043Explanation needed for \multispan behavior
From: Ed Overman
Date: Fri, 07 Aug 1992 21:14
Date: Fri, 07 Aug 1992 21:14
51 lines
2327 bytes
2327 bytes
I am experiencing strange behavior (at least to me) when using \multispan
(which I will describe below). But first let me point out that there was
a bug in \multispan in plain.tex(3.0) which is fixed in (3.14). The
difference is:
\def\multispan#1{\omit \mscount#1\relax % NEW
\loop\ifnum\mscount>\@ne \sp@n\repeat}
\def\multispan#1{\omit \mscount#1 % OLD
\loop\ifnum\mscount>\@ne \sp@n\repeat}
Here is the example. (The reason for all these lines is that the old
\multispan gave different behavior in lines 2 and 3 than in lines 4 and 5.)
\newcount\CC \CC = 2
\count37 = 2
\tabskip=0pt
\halign{&#\hfil\cr
xxx&yyy&zzz&uuu\cr %1
x&\multispan{\CC}z&u\cr %2
x&\multispan{\count37 }z&u\cr %3
x&\multispan{\count37}z&u\cr %4
x&\multispan{\the\CC}z&u\cr %5
x&\multispan{2}z&u\cr %6
x&\multispan{\the\CC} z&u\cr %7
x&\multispan{\the\CC}\ z\ &u\cr} %8
I do not understand the behavior of \multispan in lines 7 and 8 of \halign
(see below). I do not understand why 1 space on the left causes the 'z' to be
moved all the way to the right and why 1 space on each side causes the 'z' to
be centered. Why then is the 'z' left justified if there are NO spaces on
either side. \multispan is discussed on page 243 where it says that "that
hbox will be preceded by glue of width $g_0$ and it will be followed by glue
of width $g_3$ ..." However, I have explicitly set the tabskip glue to 0pt.
So what is going on. Any explanations will be greatly appreciated.
xxxyyyzzzuuu
x z u
x z u
x z u
x z u
x z u
x zu
x z u **** 'z' is actually in the middle of 'yyyzzz' ****
Thanks,
Ed Overman
The TeXbook --- similar to the Bible but provides solutions to the exercises.
Technical Details
Message-ID:
<15up48INN51r@point.mps.ohio-state.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!caen!zaphod.mps.ohio-state.edu!not-for-mailShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!zaphod.mps.ohio-state.edu!not-for-mail From: overman@point.mps.ohio-state.edu (Ed Overman) Newsgroups: comp.text.tex Subject: Explanation needed for \multispan behavior Date: 7 Aug 1992 17:14:48 -0400 Organization: Department of Mathematics, The Ohio State University Lines: 53 Distribution: world Message-ID: <15up48INN51r@point.mps.ohio-state.edu> NNTP-Posting-Host: point.mps.ohio-state.edu