Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I wonder why p columns are aligned at the bottom and b columns aligned at the top? enter image description here

created with this code:

\begin{tabular}{|p{0.3\linewidth}|m{0.3\linewidth}|b{0.3\linewidth}|}
\hline
\centering header p &
\centering header m &   
\centering header b \tabularnewline
\hline
text which is considerably longer than the width of the column  & 
text which is considerably longer than the width of the column  & 
text which is considerably longer than the width of the column 
\tabularnewline
\hline
\end{tabular}
share|improve this question
    
Possible duplicate of tex.stackexchange.com/questions/33257/… It is the expected result. –  egreg Nov 18 '11 at 14:42

1 Answer 1

up vote 17 down vote accepted
  • p means normal cells, they are like parbox with alignment at the top line

  • b means alignment at the bottom, so the baseline is at the bottom line

  • m means alignment in the vertical center, i.e. the baseline is in the center.

So the position for alignment is meant. In your picture, the top line of the first text, the middle of the second and the bottom line of the last text are all in a line:

table cell alignment

share|improve this answer
1  
Ok, I understand. My problem was that it is counter-intuitive. –  Matthias Pospiech Nov 18 '11 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.