Quantcast
Channel: tabular – texblog
Viewing all articles
Browse latest Browse all 22

Equal cell width in Latex tables

$
0
0

Latex will automatically adjust the width of a cell in a table. If you wish to have a table where each cell in a row has the same width, you would use the p option instead of l, c or r for left, centre or right alignment.

Example:

\begin{table}[ht]
\centering
\begin{tabular}{|p{1cm}|p{1cm}|}
\hline
a&bbb\\
\hline
a&bbb\\
a&bbb\\
\hline
\end{tabular}
\end{table}


Viewing all articles
Browse latest Browse all 22

Trending Articles