[texhax] little table within table cell

Geoffrey Knauth geoff at knauth.org
Wed Jun 14 15:12:39 CEST 2006


I liked all your ideas.  I tried your last macro, and it worked  
beautifully.  Thank you so much!

Geoffrey
--
Geoffrey S. Knauth | http://knauth.org/gsk


On Jun 14, 2006, at 08:54, Oleg Katsitadze wrote:

> On Wed, Jun 14, 2006 at 04:39:47AM -0400, Geoffrey Knauth wrote:
>> \valign{\strut#&#\cr Sat&5/27\cr}
>
> Why are you using \valign?  It puts the stuff into the
> main vertical list after the current box, that's why it
> takes up the whole line.
>
> The simplest solution for your problem is to just split one
> `visual' cell into two subcells, the upper one containing
> `Sat' and the lower `5/27'.  If your table uses rules, just
> omit the horizontal rule between these two cells and box the
> two cells together, so they will look like one cell.
>
> If somehow you need these to be in a single cell, try
> something like this:
>
> \halign{
>     #\cr
>     \vbox{\hbox to 2em{\hss\strut Sat\hss}
>           \hbox to 2em{\hss\strut 5/27\hss}}\cr
> }
>
> Replace 2em by whatever is appropriate, and probably define
> the whole thing as a macro.
>
> If you still want to use \halign inside another \halign,
> just put the internal \halign into a \vbox:
>
> \halign{
>   #\cr
>   \vbox{\halign{
>     \hfil\strut#\hfil\cr
>     Sat\cr
>     5/27\cr
>   }}\cr
> }
>
> Even better, isolate the internal \halign inside a macro, to
> avoid confusing yourself.  Put it in a \vbox and double the
> #'s, like this:
>
> \def\t{%
>   \vbox{\halign{%
>     \hfil\strut##\hfil\cr
>     Sat\cr
>     5/27\cr
>   }}%
> }
>
> \halign{
>   #\cr
>   \t\cr
> }
>
> HTH,
> Oleg
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/ 
> texhax
> Human mailing list managers: postmaster at tug.org



More information about the texhax mailing list