如何设置\hline
才适合表格?
\documentclass[12pt,a3paper]{report}
\usepackage{booktabs, makecell,amsmath, graphicx}
\usepackage[output-decimal-marker={,}]{siunitx}
\NewDocumentCommand{\anote}{}{\makebox[0pt][l]{$^*$}}
\usepackage[margin=0.25in]{geometry}
\usepackage{pdflscape}
\usepackage{lscape}
\begin{document}
\begin{landscape}
\begin{table}[h!!]
\tiny
\renewcommand{\arraystretch}{1.45}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}
r|ccccccccccccccccccccc
}
Fit&& 1& 2& 3& 4& 5& 6& 7& 8& 9& 10& 11& 12& 13& 14& 15& 16& 17&\\
\hline
A& 54867,608227& 54867,600478& 54867,597004& 54867,598053& 54867,598004& 54867,597391& 54867,597323& 54867,595745& 54867,59403& 54867,595847& 54867,594425& 54867,595113& 54867,59502& 54868,48386& 54867,591154& 54867,591663& 54867,592885& \\
\end{tabular*}
\end{table}
\end{landscape}
\end{document}
答案1
这?
\documentclass[12pt,a3paper]{report}
\usepackage{booktabs, makecell,amsmath, graphicx}
\usepackage[margin=.25in]{geometry}
\usepackage{pdflscape}
\usepackage{lscape}
\begin{document}
\begin{landscape}
\begin{table}[h!!]
\tiny
\renewcommand{\arraystretch}{1.45}
\begin{tabular*}{\linewidth}{r|ccccccccccccccccccccc}
Fit&& 1& 2& 3& 4& 5& 6& 7& 8& 9& 10& 11& 12& 13& 14& 15& 16& 17&\\
\hline
A& 54867,608227& 54867,600478& 54867,597004& 54867,598053& 54867,598004& 54867,597391& 54867,597323& 54867,595745& 54867,59403& 54867,595847& 54867,594425& 54867,595113& 54867,59502& 54868,48386& 54867,591154& 54867,591663& 54867,592885& \\
\end{tabular*}
\end{table}
\end{landscape}
\end{document}
到右边距
或这个?
\documentclass[12pt,a3paper]{report}
\usepackage{booktabs, makecell,amsmath, graphicx}
\usepackage[margin=.25in]{geometry}
\usepackage{pdflscape}
\usepackage{lscape}
\begin{document}
\begin{landscape}
\begin{table}[h!!]
\tiny
\renewcommand{\arraystretch}{1.45}
\begin{tabular}{r|ccccccccccccccccccccc}
Fit&& 1& 2& 3& 4& 5& 6& 7& 8& 9& 10& 11& 12& 13& 14& 15& 16& 17&\\
\hline
A& 54867,608227& 54867,600478& 54867,597004& 54867,598053& 54867,598004& 54867,597391& 54867,597323& 54867,595745& 54867,59403& 54867,595847& 54867,594425& 54867,595113& 54867,59502& 54868,48386& 54867,591154& 54867,591663& 54867,592885& \\
\end{tabular}
\end{table}
\end{landscape}
\end{document}
我认为哪个更好
答案2
使用一个tabular*
环境,将其宽度设置为\textwidth
(或其他特定长度),但不让 LaTeX 通过环境@{\extracolsep{\fill}}
第二个参数开始时的指令调整列间空白量,tabular*
以实现所需的整体宽度,这种做法并不好。
无需将字体大小一直缩小到\tiny
--\footnotesize
就足够了。就易读性而言,将某个内容线性缩小 20%(即脚注大小)或线性缩小 50%(即极小)的差异是巨大的。
\documentclass[12pt]{report}
\usepackage{rotating} % for "sidewaystable" environment
\usepackage[margin=0.25in,a3paper]{geometry}
\begin{document}
\begin{sidewaystable}
\setlength\tabcolsep{0pt}
\footnotesize % no need for "\tiny"
\renewcommand{\arraystretch}{1.45}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} r *{17}{c}}
Fit& 0& 1& 2& 3& 4& 5& 6& 7& 8& 9& 10& 11& 12& 13& 14& 15& 16\\
\hline
A&
54867,608227& 54867,600478& 54867,597004& 54867,598053& 54867,598004&
54867,597391& 54867,597323& 54867,595745& 54867,59403 & 54867,595847&
54867,594425& 54867,595113& 54867,59502 & 54868,48386 & 54867,591154&
54867,591663& 54867,592885 \\
\end{tabular*}
\end{sidewaystable}
\end{document}