3

I have following table:

enter image description here

I would like to center align vertically the contents of column 2. My code is as follows:

\begin{tabular}{|p{1.2cm}|p{5.5cm}|p{5.5cm}|p{1.5cm}|}
    \hline
    Column1 & Column2 & Column3 & Column4 \\
    \hline
    {} & {\textbf{I would like this line to be center aligned vertically}} &
    \begin{itemize}
        \item A
        \item B
        \item C
        \item D
        \item E
        \item F
        \item G
        \item H
        \item I
        \item J
    \end{itemize} & {} \\
    \hline
\end{tabular}
0

1 Answer 1

3

You need to adjust the vertical anchor of the list-column - Column3 - to be the middle; this alignment option is provided by array's m{<len>} column specification (akin to the regular paragraph style column, just with a vertically-centred anchor point).

image

\documentclass{article}

\usepackage{array}

\begin{document}

\begin{tabular}{ | p{1.2cm} | p{5.5cm} | m{5.5cm} | p{1.5cm} | }
    \hline
    Column1 & Column2 & Column3 & Column4 \\
    \hline
    & \bfseries I would like this line to be center aligned vertically &
    \begin{itemize}
        \item A \item B \item C \item D
        \item E \item F \item G \item H
        \item I \item J
    \end{itemize} &  \\
    \hline
\end{tabular}

\end{document}

Note how the top of Column2's entry is not in the middle of Column3. If you want both of these to have a middle anchor point, then use m{5.5cm} for Column2 as well.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .