# Problem with vertical alignment of cells in tabular environment

I'm having a problem with vertical alignment of cells in a somewhat complicated case. Does anyone know how to have a different vertical alignment for two cells in the same column? And also if you use the "p" alignment on some columns, it affects the alignment of other columns in the table that are set to "m". Below is the example:

In latex (Table A):

\documentclass{revtex4-1}
\usepackage{array}
\begin{document}

\begin{table*}
\begin{ruledtabular}
\begin{tabular}{ >{\centering}m{0.8 in} >{\centering}m{0.8in}
>{\centering}m{0.8in} >{\centering}m{0.8in}
>{\centering}m{1.5in} >{\centering\arraybackslash}m{1.5in} }

\hline

text & text & text & text &
\begin{itemize}
\item texttexttexttexttex texttexttexttexttexttexttexttext \end{itemize} &
\begin{itemize}
\item texttext texttext texttext texttext
\item texttext texttext texttext texttext\end{itemize} \\

\end{tabular}
\end{ruledtabular}
\end{table*}

\end{document}


In latex (Table B):

\documentclass{revtex4-1}
\usepackage{array}
\begin{document}

\begin{table*}
\begin{ruledtabular}
\begin{tabular}{ >{\centering}m{0.8 in} >{\centering}m{0.8in}
>{\centering}m{0.8in} >{\centering}m{0.8in}
>{\centering}p{1.5in} >{\centering\arraybackslash}p{1.5in} }

\hline

text & text & text & text &
\begin{itemize}
\item texttexttexttexttex texttexttexttexttexttexttexttext \end{itemize} &
\begin{itemize}
\item texttext texttext texttext texttext
\item texttext texttext texttext texttext\end{itemize} \\

\end{tabular}
\end{ruledtabular}
\end{table*}

\end{document}

• Please always show a complete document that produces the image, it's hard to guess what markup you have used otherwise. A column specifier such as m, p, b only affects the one column not others, and can be changed per cell with \multicolumn{1}{b{..}}{...} – David Carlisle Oct 13 '14 at 19:40
• Welcome to TeX.SX! – barbara beeton Oct 13 '14 at 19:40
• @David Carlisle: I think ruledtabular comes from revtex. – Bernard Oct 13 '14 at 19:49
• Note that m doesn't mean to vertically centre the text in the space taken up be that row, it means place the vertical cemtre of _this entry" (the word text here) on the reference line for the row, which is why when they have m and the list entries have p the centre of text lines up with the top of the space above the list – David Carlisle Oct 13 '14 at 19:56
• @st77 it's important as people like to test their answers by running your code, and that's hard if it contains undefined commands. – David Carlisle Oct 13 '14 at 19:57

You can use nested tabular to control the alignment and enumitem to use a list with less vertical space:

\documentclass{revtex4-1}
\usepackage{array,enumitem}
\begin{document}
\begin{table*}
\begin{ruledtabular}
\begin{tabular}{ >{\centering}p{0.8 in} >{\centering}p{0.8in}
>{\centering}p{0.8in} >{\centering}p{0.8in}
>{\centering}p{1.5in} >{\centering\arraybackslash}p{1.5in} }

\hline

text & text & text & text &
\multicolumn{2}{@{}m{\dimexpr3in+2\tabcolsep}@{}}{%
\begin{tabular}{>{\centering}p{1.5in} >{\centering\arraybackslash}p{1.5in}}
\begin{itemize}[leftmargin=1em,noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt]
\item texttexttexttexttex texttexttexttexttexttexttexttext \end{itemize} &
\begin{itemize}[leftmargin=1em,noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt]
\item texttext texttext texttext texttext
\item texttext texttext texttext texttext\end{itemize} \\
\end{tabular}}
\end{tabular}
\end{ruledtabular}
\end{table*}
\end{document}

• This looks great, I'll try it out. Thanks a lot! – st77 Oct 13 '14 at 20:16
• David Carlisle: I try your code with two changes: instead of 'revex4-1' I use 'article', and for easy see obtained result I added 'preview' package. Without of 'preivew' I obtained the same result as you, with it, on the top of last column in nested table arise empty space. – Zarko Oct 14 '14 at 5:24
• @Zarko presumably preview is conflicting with enumitem in some way, I don't know that package, perhaps ask a new question just about that – David Carlisle Oct 14 '14 at 8:01