Vertical Alignment in a Table Cell 

Newsgroups: comp.text.tex
From: Peter Flynn <p...@silmaril.ie>
Date: Tue, 08 Jan 2002
> LTXtable, longtable, tabularx and LaTable are all working very well
> for me.  However, I am still looking for an efficient way to center
> text vertically in a cell.   For example, a long passage of text in a
> certain cell causes the entire row to be four lines in height.  The
> cell to the right (same row) has only one word.  It appears at the
> very top of its cell with three lines of white space below it.  How do
> I center the one word "top-to-bottom" in its cell?

&\vbox to2cm{hsize=3cm\null\vfill stuff\vfill}&

Peter Flynn

Vertical Alignment in a Table Cell 

read the documentation of the array package if you want to do more than trivial table typesetting. Something like m columns, page 2 or so.

David Kastrup

Vertical Alignment in a Table Cell 

> LTXtable, longtable, tabularx and LaTable are all working very well
> for me.

With those packages you have the m (or M?) column type. Use it for the 4-line p cplumn. (Yes, you need to vertically center the 4-line column, not the 1-line. That is a source of confusion.)

Donald Arseneau

Vertical Alignment in a Table Cell 

> I read booktabs.dvi but I didn't read anything that prohibits me from
> centering text vertically in a cell.  The author of booktabs.dvi says
> never use vertical rules, where a rule is a line.

While not prohibited explicitly, vertical centering may make a (formal) table harder to read, because horizontal rules are intended to be used sparingly. It's less obvious where the cell boundaries are — and therefore, what the text is vertically centered relative to — than in a gridlined tableau.

> Anyway, m-column apears to be working.  Unfortunately, the formatting
> also applies to the cell in the head which has only 1 line of text,
> not 4.

You can use \multicolumn to override column formatting for an individual cell. See a LaTeX manual for usage information.

Scott Pakin <p…@uiuc.edu>