Graphics, Figures & TablesMixing p and m column types

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
debruyck
Posts: 1
Joined: Fri May 22, 2009 3:10 pm

Mixing p and m column types

Post by debruyck »

When I read the documentation of the p and m column types in the array package documentation, I find:
* m{width} defines a column of width width. Every entry will be centered in proportion to the rest of the line.

I'm trying to create a table where the left two columns need to be vertically centered. The right two columns need to be top aligned, so I tried:

\begin{tabular}{|m{.25\textwidth}|m{.25\textwidth}|p{.25\textwidth}|p{.25\textwidth}|}
\hline
Low &
Low &
Some very long text

in multiple

paragraphs
&
Some even longer text

in way more

paragraphs, of which this is the first one

and this is the second one
\tabularnewline
\hline
\end{tabular}

But mixing p and m columns doesn't work. If I make it:

\begin{tabular}{|m{.25\textwidth}|m{.25\textwidth}|m{.25\textwidth}|m{.25\textwidth}|}

ALL columns are vertically aligned. But that's not what I want. The right two columns should remain top aligned. Messing with \parbox[t]{.25\textwidth}{some text} doesn't work either.

Anyone an idea on how to achieve this?

Kind regards
Koen

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply