How can I center the column when using X in tabularx environment like in this example?
\begin{tabularx}{\textwidth}{@{}lXXXXX@{}}
1 & 2 & 3 & 4 & 5 \\
\end{tabularx}
horizontal alignmenttablestabularx
How can I center the column when using X in tabularx environment like in this example?
\begin{tabularx}{\textwidth}{@{}lXXXXX@{}}
1 & 2 & 3 & 4 & 5 \\
\end{tabularx}
Best Answer
I recently dealt with the same task, so here I present my solution: I defined a new columntype
Y
to center the cells in atabularx
environment.In the preamble define:
to typeset the example simply enter