I have a table that is define as follows:
\documentclass[a4paper]{paper}
\usepackage{multirow}
\usepackage{makecell}
\begin{document}
\begin{table}[h]
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|*{10}{c|}}
\hline
\multirowcell{3}{Work} & \multirowcell{3}{Prime\\[1ex] (bits)} & \multicolumn{5}{c|}{Area} & \multicolumn{3}{c|}{Time} \\
\cline{3-10}
& & \makecell{\# \\FFs} & \makecell{\#\\ LUTs} & \makecell{\#\\ Slices} & \makecell{\# \\ DSPs} & \makecell{\# \\ BRAMs} & \makecell{Freq.\\ (MHz)} & \makecell{Latency \\ (cc${}\times 10^6$)} & \makecell{Total time\\ (ms)} \\
\hline \hline
% Partially removed for brevity
\end{tabular}}
\caption{Comparison of hardware architectures}
\label{tab:hard}
\end{table}
\end{document}
The point is that this works fine and fits the table to my page's margin, but several people here pointed out to me that using \resizebox
is not recommended and can lead to inconsistent font sizes. Therefore, I would like to hear (and see some examples) as what is a proper way to fit a table to my page's margin? Please also note that I will need to use some footnotes inside the table too.
Best Answer
Getting rid of some repetitive material in the header cells and switching to a
tabular*
environment (with\tabcolsep
set to 0pt) enables you to typeset the material in portrait mode without resorting to the\resizebox
"hammer". And, for better-spaced horizontal lines, load thebooktabs
package and use\toprule
,\midrule
,\cmidrule
, andbottomrule
instead of\hline
and\cline
. Finally, if you're at all interested in creating tables with an open or inviting "look", do get rid of all vertical bars -- they're not needed. Really.