-
Notifications
You must be signed in to change notification settings - Fork 940
跨页长表
mohuangrui edited this page Apr 13, 2018
·
16 revisions
论文中应尽量避免跨页长表。由于 longtable 宏包自带的 caption 的设计不兼容 bicaption 宏包的如下两条位于 artratex.sty 中的命令(tex.se上bicaption的作者回答过这个问题,并进行了解决,只是奇怪的是问题仍存在)
\captionsetup[table][bi-first]{format=hang,hangindent=-0.5em}%
\captionsetup[table][bi-second]{format=hang,hangindent=-2em,name=Table}%
从而若使用 longtable 就需要注释掉上述行,但其导致的问题就是普通 table 的标题若用 bicaption 命令,则第二个标题无法是 “Table” 而是 “表”,解决的办法是:
- 不用 longtable,只需用普通的 table 环境,请慎重考虑一个跨页的 longtable 的必要性。
- 若坚持用longtable,只需注释掉 artratex.sty 中的如下行
%\captionsetup[table][bi-first]{format=hang,hangindent=-0.5em}%
%\captionsetup[table][bi-second]{format=hang,hangindent=-2em,name=Table}%
并在 artracom.sty 中调用 longtable 宏包:
\RequirePackage{longtable}
然后所有 table(包括普通的table和longtable)的双语标题的实现都如如下样例:
\begin{longtable}{|c|c|c|c|}
\caption[这是一个样表]{这是一个样表\\Table~\ref{tab:longtab} A simple longtable example}\label{tab:longtab}\\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} & \textbf{Fourth entry} \\
\hline
\endfirsthead
\multicolumn{4}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} & \textbf{Fourth entry} \\
\hline
\endhead
\hline \multicolumn{4}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
\end{longtable}
其结果如图
最后,longtable 跨页所产生的英文注释,除非修改 longtable 宏包文件,应该无法解决。