12

How to center text vertically in this table?

\begin{center}
  \begin{tabularx}{\linewidth}{ | c | X | X | }
    \hline
      \textbf{Date} & \textbf{Name} & \textbf{Sign} \\
    \hline
      31.03.2013 & & \\
    \hline
  \end{tabularx}
\end{center}

Changing package is not a solution for me. How to do it in tabularx?

0

1 Answer 1

26
\def\tabularxcolumn#1{m{#1}}

defines the X column to use m (\parbox[c]) instead of p (`parbox[t]`).

3
  • How would this be used in the OP's example?
    – beldaz
    May 8, 2017 at 11:14
  • 1
    @beldaz just put that line anywhere before the table May 8, 2017 at 11:55
  • Ah, understood. I was trying to figure out how to make a single column vertically centred, not all of them, hence my confusion.
    – beldaz
    May 8, 2017 at 11:58

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