[OS X TeX] Center a "tabbing" environment

Morten Høgholm morten.hoegholm at latex-project.org
Sun Apr 17 08:14:09 EDT 2005

On Thu, 14 Apr 2005 18:41:49 +0200, Bruno Voisin <bvoisin at mac.com> wrote:

> It seems the specified width is of no influence at all, and only the  
> actual width of the tabbing environment is taken into account. From the  
> LaTeXbook p. 218, regarding \parbox{width}{text} and  
> \begin{minipage}{width} text \end{minipage}:
> "The list-making environments listed in Section 6.6 and the tabular  
> environment may appear in "text" with the minipage environment, but not  
> with the \parbox command. (If "text" consists of only a tabbing  
> environment, then the width of the resulting box is the actual width of  
> the longest line rather than the "width" argument.)"

The reason for the first part of th quote is perhaps best illustrated by  
an example:

     \item We're at level \number\@listdepth
     \item #1


% This will give an error although it's almost identical

And then there is of course the matter of verbatim material which cannot  
be handled by \parbox.

The reason tabbing behaves a little strange inside minipage is that  
minipage consists of a \vbox (or vtop or \vcenter depending on the b, t,  
or c optional arguments). The width of such a box is determined by the  
widest object in it. In the usual case we have normal text inside which  
causes TeX to go into horizontal mode and start building a paragraph thus  
creating boxes with the current linewidth and resulting in the contents  
taking up the full width specified. In the case of the tabbing environment  
we never get that far as it never enters normal paragraph building mode.  
Instead it puts every field into a box and then pastes all these boxes  
back but it all happens in vertical mode thus never creating a paragraph.
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>

More information about the MacOSX-TeX mailing list