LaTeX Wiki

The tabularx package provides the tabularx environment, which is similar to tabular but does not require you to manually calculate widths for paragraph columns.

Syntax[]

tabularx takes the same arguments as tabular* but has a new column specifier X (in uppercase). The column(s) specified with this specifier will be stretched to make the table as wide as specified.

\begin{tabularx}{width}[position]{column definition}
  Lorum      & ipsum & dolor       \\
  sit        & amet  & consectetur \\
  adipiscing & elit  & sed
\end{tabularx}

Example[]

Markup
\usepackage{tabularx}
% ...

\begin{tabularx}{\textwidth}{ |X|X|X|X| }
  \hline
  label 1 & label 2 & label 3 & label 4 \\
  \hline 
  item 1  & item 2  & item 3  & item 4  \\
  \hline
\end{tabularx}
Renders as

See also[]