This is a visual comparison to show that just scale too wide tables (right column) is always the wrong approach. The solution should be reducing the font size, and the column separations if needed, and in case it is necessary also to fit the width of the table exactly, use tabular*
environment or packages as tabularx, tabulary or widetable (left column), and when nothing is enough, redesign the table (not showed).
Do you see the problems at the right? Let me explain:
The rules are also scaled, giving inconsistent thin rules (ugly, right?).
The text of normal size scaled down do not look like small fonts (obtained with \small
, \footnotesize
, \scriptize
or \tiny
). It is less readable.
Worse, every scaled table will have a different font size: 40 tables = 40 font sizes, not 2 or 3 standard sizes through the whole document (very ugly, right?).
Worse, as you can scale down infinitely the table, the risk of allowing ridiculously unreadable small fonts sizes is high. Maybe you have noticed the that the last header if the left-bottom table have the wrong number, but... have you noticed that there are also four badly numbered cells in last table of the right column?
With the other approach, you decide the limit (note: the mine is \footnotesize
) or if you lack common sense you cannot low to absurd limits. It is important to have that limit, because it will tell you when you have to pass plan B (redesign the table).
The code:
\documentclass[twocolumn,a5paper]{article}
\usepackage{lipsum,parskip,booktabs,graphicx,tabulary,tabularx}
\usepackage[margin=1cm,bmargin=7cm]{geometry}
\begin{document}
\lipsum[1][1-3]
\begin{tabularx}{\linewidth}{lXX}\toprule
& Heading 1 & Heading 2\\\cmidrule{2-3}
Row 1 & Cell 1,1 & Cell 1,2 \\
Row 2 & Cell 2,1 & Cell 2,2 \\\bottomrule
\end{tabularx}
% \lipsum[2][1-3]
{\small\tabcolsep5pt
\begin{tabularx}{\linewidth}{@{}lXXX@{}}\toprule
& Heading 1 & Heading 2 & Heading 3 \\\cmidrule{2-4}
Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 \\
Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 \\\bottomrule
\end{tabularx}}
{\scriptsize
\tabcolsep1.7pt
\begin{tabularx}{\linewidth}{@{}lXXXX@{}}\toprule
& Heading 1 & Heading 2 & Heading 3 & Heading 4 \\\cmidrule{2-5}
Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 & Cell 1,4 \\
Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 & Cell 2,4 \\\bottomrule
\end{tabularx}}
{\tiny
\tabcolsep1.1pt
\begin{tabularx}{\linewidth}{@{}lXXXXX@{}}\toprule
& Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5\\\cmidrule{2-6}
Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 & Cell 1,4 & Cell 1,5 \\
Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 & Cell 2,4 & Cell 2,5 \\\bottomrule
\end{tabularx}}
{\tiny\tabcolsep1pt
\begin{tabulary}{\linewidth}{@{}lCCCCCCC@{}}\toprule
& Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5 & Heading 6\\\cmidrule{2-7}
Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 & Cell 1,4 & Cell 1,5 & Cell 1,5 \\
Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 & Cell 2,4 & Cell 2,5 & Cell 1,5 \\\bottomrule
\end{tabulary}}
{\tiny\tabcolsep1pt
\begin{tabulary}{\linewidth}{@{}lCCCCCCCC@{}}\toprule
& Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5 & Heading 6 & Heading 6\\\cmidrule{2-8}
Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 & Cell 1,4 & Cell 1,5 & Cell 1,6 & Cell 1,7 \\
Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 & Cell 2,4 & Cell 2,5 & Cell 2,5 & Cell 2,7 \\\bottomrule
\end{tabulary}}
\lipsum[2][1]
\footnote{Footnote as reference of reasonable and standard small font.}
\newpage \lipsum[1][1-3]
{\centering
\begin{tabular}{lll}\toprule
& Heading 1 & Heading 2\\\cmidrule{2-3}
Row 1 & Cell 1,1 & Cell 1,2 \\
Row 2 & Cell 2,1 & Cell 2,2 \\\bottomrule
\end{tabular}\par}
\resizebox{\linewidth}{!}{%
\begin{tabular}{llll}\toprule
& Heading 1
& Heading 2
& Heading 3 \\\cmidrule{2-4}
Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 \\
Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 \\\bottomrule
\end{tabular}}
\resizebox{\linewidth}{!}{%
\begin{tabular}{lllll}\toprule
& Heading 1 & Heading 2 & Heading 3 & Heading 4 \\\cmidrule{2-5}
Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 & Cell 1,4 \\
Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 & Cell 2,4 \\\bottomrule
\end{tabular}}
\resizebox{\linewidth}{!}{%
\begin{tabular}{llllll}\toprule
& Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5\\\cmidrule{2-6}
Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 & Cell 1,4 & Cell 1,5\\
Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 & Cell 2,4 & Cell 2,5\\\bottomrule
\end{tabular}}
\resizebox{\linewidth}{!}{%
\begin{tabular}{lllllll}\toprule
& Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5 & Heading 6\\\cmidrule{2-7}
Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 & Cell 1,4 & Cell 1,5 & Cell 1,5 \\
Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 & Cell 2,4 & Cell 2,5 & Cell 1,5 \\\bottomrule
\end{tabular}}
\resizebox{\linewidth}{!}{%
\begin{tabular}{llllllll}\toprule
& Heading 1 & Heading 2 & Heading 3 & Heading 4 & Heading 5 & Heading 6 & Heading 7\\\cmidrule{2-8}
Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 & Cell 1,4 & Cell 1,5 & Cell 1,5 & Cell 1,5 \\
Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 & Cell 2,4 & Cell 2,5 & Cell 1,5 & Cell 1,5 \\\bottomrule
\end{tabular}}
\lipsum[2][1-2]
\
\end{document}
\small
or\footnotesize
at the beginning oftable
environment? Box scaling also has disadvantage, tabular line will be slightly scaled.\small
after\begin{table}
, and although it does the job, I like the output that\resizebox
gives better.