(Note that I am NOT trying to make a table with equal column spacing.)
Here's a table with 6 columns:
\begin{tabular}{cccccc}
a&bbbbb&cccccccccc&d&eeeee&ffffffffff\\
g&hhhh&iiiiiiiii&j&kkkk&lllllllll\\
m&nnnnn&ooooooooooo&pp&qqqqq&rrrrrrrrr
\end{tabular}
The tabular
environment adds some intercolumn spacing, which I can adjust manually by changing \tabcolsep
. However, what I need is to be able to set a total width for the table (e.g. 4in). It would then calculate on its own what the intercolumn spacing should be, to achieve a 4-inch table. That is, the widths of each column are subtracted from the total width, and the remainder is split equally among the 5 intercolumn spaces. The columns still have different widths. Is this something that can be easily done with tabular
, tabularx
, or similar?
\begin{tabularx}{3in}{*{3}{X} ... \end{tabularx}
.. If you want the content to be centred, replaceX
with>{\centering\arraybackslash}X
.