[comp.text] glue in haligns in TeX

mrd@sun1.mie.clarkson.edu (Michael DeCorte) (12/24/88)

Hello,

Below is a little halign; but I am having a problem with it.  It seems
that any form of glue that I put into the items is ignored.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\halign to\hsize{&#\tabskip=0pt plus 1fil\cr
\hskip 0pt plus 1fill hello&how&are\cr
you&today\cr
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

What I want it to do is:
						|<- left margin
hello		how		are		
	     youtoday

what I get is:

						|<- left margin
hello		how		are		
you		today
           ^^^^^
         
My guess is that the second order hskip glue is being ignored because
the first order tabskip glue is being set before the hskip glue is
read.

Is this right? or am I just doing something wrong?

thanks

--

Michael DeCorte // (315)265-2439 // P.O. Box 652, Potsdam, NY 13676
Internet: mrd@sun.soe.clarkson.edu  // Bitnet:   mrd@clutx.bitnet        
---------------------------------------------------------------------------
Clarkson Archive Server // commands = help, index, send, path
archive-server@sun.soe.clarkson.edu
archive-server%sun.soe.clarkson.edu@omnigate.bitnet
dumb1!dumb2!dumb3!smart!sun.soe.clarkson.edu!archive-server
---------------------------------------------------------------------------

dlau@cs.utexas.edu (David Lau) (12/26/88)

In article <MRD.88Dec23215043@sun1.mie.clarkson.edu> mrd@sun1.mie.clarkson.edu (Michael DeCorte) writes:
>
>Below is a little halign; but I am having a problem with it.  It seems
>that any form of glue that I put into the items is ignored.
>
>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>\halign to\hsize{&#\tabskip=0pt plus 1fil\cr
>\hskip 0pt plus 1fill hello&how&are\cr
>you&today\cr
>}
>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
The \hskip in the entry containing the word 'hello' is essentially a no-op,
simply because of the fact that that entry is the widest in its
column. It's not really clear to me why you put stretchable glue in
the entry containing the word 'hello' when it is the word 'you' in the
entry below you want to have flushed right.

Anyway, to get what you want, a slight change will suffice:

\halign to\hsize{&#\tabskip=0pt plus 1fil\cr
hello&how&are\cr
&\llap{you}today\cr
}

A side note:
you can achieve the above more easily by using \settabs instead:

\settabs 3\columns
\+hello&how&are\cr
\+\hfill you&today&\cr



David
dlau@cs.utexas.edu