我尝试使用 adjustbox 缩小对于横向页面来说太大的表格,但当我使用它时,缩放后的表格相对于页面大小比它需要的要小得多。知道我做错了什么吗?
下面是一个显示该问题的示例。使用和不使用 Adjustbox 均显示同一张表。
\documentclass[letterpaper,12pt,oneside]{article}
\usepackage{booktabs,pdflscape,adjustbox}
\begin{document}
\begin{landscape}
some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text. some filler text.
\begin{table}[t]
\begin{adjustbox}{max width=\textheight}
\begin{tabular}{*{5}{l}}
\toprule
& \multicolumn{2}{c}{Women} & \multicolumn{2}{c}{Men} \\\cmidrule(lr){2-3}\cmidrule(lr){4-5}
& Person- & & Person- & \\
& month & Unique & month & Unique \\
Sample restrictions & records & individuals & records & individuals \\
\midrule
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx & xxxxxx & xxxxx & xxxxx & xxxxx \\
\bottomrule
\end{tabular}
\end{adjustbox}
\end{table}
\end{landscape}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% now same table without adjustbox
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\begin{landscape}
\begin{table}[t]
\begin{tabular}{*{5}{l}}
\toprule
& \multicolumn{2}{c}{Women} & \multicolumn{2}{c}{Men} \\\cmidrule(lr){2-3}\cmidrule(lr){4-5}
& Person- & & Person- & \\
& month & Unique & month & Unique \\
Sample restrictions & records & individuals & records & individuals \\
\midrule
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx & xxxxxx & xxxxx & xxxxx & xxxxx \\
\bottomrule
\end{tabular}
\end{table}
\end{landscape}
\end{document}
答案1
最大宽度=\textheight}
lscape
本地设置\textheight
为新的高度但你想要当地的宽度所以改用\linewidth
。