我有一张宽桌子,希望将其置于横向模式以使其可读。此外,我tabulary
习惯自动调整列宽。
\begin{landscape}
\begin{table}[p]
\caption{Candidate DACs\label{tab:dac}}
\begin{tabulary}{\textwidth}{|L|L|L|L|L|L|L|L|L|}
\hline
\textbf{Manufacturer} & \textbf{Model} & \textbf{Resolution} & \textbf{Accuracy (typ./max.),} LSB & \textbf{Samples availible?}
& \textbf{Price on Mouser}& \textbf{Broadband noise}, $\unit{nV}/\sqrt{\mathrm{Hz}}$ & \textbf{Pro} & \textbf{Contra} \\
\hline
& & & & & & & ngmfkjig ojojo & \\
\hline
& & & & & & & & \\
\hline
& & & & & & & & \\
\hline
& & & & & & & & \\
\hline
& & & & & & & & \\
\hline
\end{tabulary}
\end{table}
\end{landscape}
但是,表格的宽度保持不变,就像页面处于纵向模式一样。我尝试使用\textheight
参数,但没有成功。
我使用 LuaLatex。请帮助我!
答案1
而不是\textwidth
使用\linewidth
:
\documentclass{article}
\usepackage{pdflscape}
\usepackage{tabulary}
\begin{document}
\begin{landscape}
\begin{table}[p]
\caption{Candidate DACs\label{tab:dac}}
\begin{tabulary}{\linewidth}% <---- changed
{|L|L|L|L|L|L|L|L|L|}
\hline
\textbf{Manufacturer} & \textbf{Model} & \textbf{Resolution} & \textbf{Accuracy (typ./max.),} LSB & \textbf{Samples availible?}
& \textbf{Price on Mouser}& \textbf{Broadband noise}, $\mathrm{nV}/\sqrt{\mathrm{Hz}}$ & \textbf{Pro} & \textbf{Contra} \\
\hline
& & & & & & & ngmfkjig ojojo & \\
\hline
& & & & & & & & \\
\hline
& & & & & & & & \\
\hline
& & & & & & & & \\
\hline
& & & & & & & & \\
\hline
\end{tabulary}
\end{table}
\end{landscape}
\end{document}
答案2
我建议您加载包并使用其环境,而不是将table
环境嵌套在landscape
环境中,并摆弄参数。rotating
sidewaystable
% !TeX program = lualatex
\documentclass{article}
\usepackage{booktabs,siunitx,tabulary,rotating}
\usepackage[skip=0.333\baselineskip]{caption}
\begin{document}
\begin{sidewaystable}
\setlength\extrarowheight{2pt} % for a more "open" look
\caption{Candidate DACs\label{tab:dac}}
\begin{tabulary}{\textwidth}{|L|l|L|L|L|L|L|L|L|}
\hline
\textbf{Manufacturer} & \textbf{Model} & \textbf{Resolution} & \textbf{Accuracy (typ.\slash max.)}, LSB & \textbf{Samples availible?}
& \textbf{Price on Mouser}& \textbf{Broadband noise},
\si{\nano\volt}/$\sqrt{\si{\hertz}}$
& \textbf{Pro} & \textbf{Contra} \\
\hline
& & & & & & & ngmfkjig ojojo & \\
\hline
& & & & & & & & \\
\hline
& & & & & & & & \\
\hline
& & & & & & & & \\
\hline
& & & & & & & & \\
\hline
\end{tabulary}
\end{sidewaystable}
\end{document}