Problem with Table Vertical Alignment

You could use optional arguments of \parbox for vertical alignment and vertical size. Here's a small demonstration example, I just quickly estimated the height. Inserting \vspace{0pt} is a trick for changing the base line for the alignment. Without it, we would get a lot of additional whitespace.

\documentclass{article}
\newcommand*{\tabbox}[2][t]{%
    \vspace{0pt}\parbox[#1][3.7\baselineskip]{1cm}{\strut#2\strut}}
\begin{document}
\begin{tabular}{| p{1cm} | p{1cm} | p{1cm} |}
    \hline
    \tabbox{x} &
    \tabbox{A long text comes here} &
    \tabbox[b]{x} \\
    \hline
\end{tabular}
\end{document}

Output:

alt text


The thing with the array package is you cannot use p{...}, m{...} and b{...} in the same table. m{...} will usually override the other two if they are present. You might just want to manually insert your vertical space or do your alignment within the multirow environment.


This isn't an answer per se, but rather an observation from, what I gather, a "lower" level:

\parindent=0pt
\baselineskip=0pt
\raggedright
\halign to .2\hsize{
  \vbox to 20pt{\hsize=.05\hsize#\vfil}&% cmr10*2=20
  \vbox to 20pt{\hsize=.10\hsize#\vfil}&
  \vtop to 20pt{\hsize=.05\hsize#\vfil}\cr
  \hfill x&long text here&x\cr
  \centerline{wtf}&is happening here&huh?\cr
}\hfill
\bye

enter image description here

Notice how the first 'x' is higher than the following vbox, and the last column content is lower than the middle column content, even though the explicit height definitions. Also I've no clue where does the white-space between the rows come from.

I, too, sure would like to know what is happening.