[texhax] Vertical alignment of cell contents in tables.

Rolf Turner r.turner at auckland.ac.nz
Fri Jun 29 01:57:14 CEST 2012


I am trying to make use of the p{} column specifiers and I would like
the cell contents to "sit" on the bottom of the cell rather than rising to
the top.

At first I thought I could do this by using "\vfill"  before the cell 
contents.
This works when the maximal number of lines in other cells is two, but
not when it is three or more.

A minimal example of trying this approach is as follows:

\documentclass[11pt]{article}
\begin{document}
\begin{tabular}{|p{2cm}|p{4cm}|p{2cm}|p{2cm}|} \hline
\mbox{ } \vfill Melvin & This is a whole load of dingos' kidneys.
History repeats itself; it also mumbles. &
\mbox{ } \vfill Clyde & \mbox{ } \vfill Irving \\ \hline
\mbox{ } \vfill Fred & This is another great load of dingos' kidneys. &
\mbox{ } \vfill Fred & \mbox{ } \vfill Fred \\ \hline
\end{tabular}
\end{document}

Note that the "Fred"s all sit on the bottom as desired, but "Melvin",
"Clyde" and "Irving" only go down one line.

Is there any way I can (conveniently?) get all contents to sit on the
bottom irrespective of the maximal number of lines in other cells?

Remember that one cannot use "\\" with the p{} column specifier.

Thanks for any advice.

     cheers,

         Rolf Turner


More information about the texhax mailing list