介绍
longtable是在supertabular的基础上做改进的,所以现在更多人采用longtable来实现跨页长表格的排版。
注意:longtable只能支持单栏页面
在latex中需要插入续表,要求每一页的续表都要有自己的标题,续表标题中还需要承接上页表格的序号。同时续表的标题还有行距和字体要求。
字体设置
% 跨页表格
\usepackage{longtable}
%此命令用于调整续表标题的字号,这里默认为11号字体
\renewcommand{\small}{\fontsize{11}{11}\selectfont}
%此命令用于调整表格与之前文字的行距
\vspace{0.37cm}
{
\begin{longtable} … \end{longtable}
}
Longtable使用
\begin{longtable} … \end{longtable}
\begin{longtable} … \end{longtable}
时,外面不能再套一层
\begin{table} … \end{table}
\begin{table} … \end{table}
否则,longtable是不能实现跨页的。
注意事项:中插入\caption{…} \label{…}时,后面一定要加两个反斜杠(\) ,不然也会出错。
关于表格字体
必须额外增加一个{}包住
\begin{document}
% Temporarily change the font size
{
\small
\tiny
\begin{longtable}{|c|c|r|r|r|r|r|r|r|l|}
...
\end{longtable}
} % End of changing the font size
\end{document}
或者用\begin{footnotesize}…\end{footnotesize}括起来,两种方法都可以
\begin{document}
\begin{footnotesize}
\begin{longtable}{|c|c|r|r|r|r|r|r|r|l|}
...
\end{longtable}
\end{footnotesize}
\end{document}
Latex 字体大小介绍
Latex 设置字体大小命令由小到大依次为:
\tiny
\scriptsize
\footnotesize
\small
\normalsize
\large
\Large
\LARGE
\huge
\Huge