I want to make a table where all the cells will have equal width.
Here the cells width of automobile is bigger than the others.So i want to take all the cells have the width of automobile. I tried this code but don't know how to specify width and height of a cell:
\begin{table}[]
\centering
\caption{My caption}
\label{my-label}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
labels & airplane & automobile & bird & cat & deer \\ \hline
airplane & & & & & \\ \hline
automobile & & & & & \\ \hline
bird & & & & & \\ \hline
cat & & & & & \\ \hline
\end{tabular}
\end{table}
Best Answer
The cleanest way is using the
X
columntype fromtabularx
package -- it calculates the column width from the width speficied as 1st argument totabularx
.