I have been trying to create a table detailing the changes in speed over time, and have noticed that the last column (22 seconds) is disproportionately wide. Is there any way I can reduce the size of it so that it is the same width as the others?
\begin{center}
\begin{tabularx}{\columnwidth}{|l|l|l|l|l|l|l|l|l|l|l|l|X|}
\hline
Time (sec) & 0 & 2 & 4 & 6 & 8 & 10 & 12 & 14 & 16 & 18 & 20 & 22 \\
\hline
Speed (m/sec) & 10 & 14 & 20 & 24 & 22 & 18 & 16 & 15 & 14 & 14 & 13 & 11 \\
\hline
\end{tabularx}
\end{center}\\
Best Answer
If you want the table to span a certain width, e.g., the width of the text block, but don't need (or want) all columns to be equally wide, you could employ a
tabular*
environment instead of thetabularx
environment you're using at the moment. (The directive@{\extracolsep{\fill}}
serves to insert additional intercolumn whitespace.)Echoing the comments made by @BenediktBauer in his answer, you may want to give some serious thought to omitting all vertical bars -- trust me, they add clutter rather than provide clarity -- and to replacing the
\hline
directives with the macros of thebooktabs
package, as they produce horizontal lines with much improved spacing properties.