如何在双列模式的文档中制作一个可以分页的宽表格(例如使用 table*)?
低于预期结果(在任何普通文本编辑器中制作)。
第 1 页
第2页
更新
按照使用 multicols 和 longtable 的建议,这是实现的输出。在第一页看起来没问题,但在 break 之后,multicol 环境没有得到相应的遵循。
\documentclass[final,5p,times,twocolumn]{article}
\usepackage{longtable}
\usepackage{multicol}
\usepackage{lipsum}
\newcount\n
\n=0
\def\tablebody{}
\makeatletter
\loop\ifnum\n<50
\advance\n by1
\protected@edef\tablebody{\tablebody
\textbf{\number\n.}& shortText & longlonglonglonglong text
longlonglonglonglong text
\tabularnewline
}
\repeat
\makeatother
\begin{document}
\lipsum[1-10]
\begin{multicols}{2}
\end{multicols}
\begin{longtable}{|l|l|l|}
\caption[Triple columns]{Triple columns.}\\
\hline
\multicolumn{1}{|c|}{\textbf{Time (s)}} & \multicolumn{1}{c|}{\textbf{Triple chosen}} & \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\
\hline
\endfirsthead
\multicolumn{3}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline
\multicolumn{1}{|c|}{\textbf{Time (s)}} & \multicolumn{1}{c|}{\textbf{Triple chosen}} & \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\
\hline
\endhead
\hline
\multicolumn{3}{|r|}{{Continued on next page}} \\
\hline
\endfoot
\hline \hline
\endlastfoot
\tablebody
\end{longtable}
\end{document}
第 1 页
第2页
第 3 页
答案1
\documentclass[]{article}
\usepackage{longtable}
\usepackage{multicol}
\usepackage{lipsum}
\newcount\n
\n=0
\def\tablebody{}
\makeatletter
\loop\ifnum\n<50
\advance\n by1
\protected@edef\tablebody{\tablebody
\textbf{\number\n.}& shortText & longlonglonglonglong text
longlonglonglonglong text
\tabularnewline
n }
\repeat
\makeatother
\begin{document}
\begin{multicols}{2}
\lipsum[1-7]
\end{multicols}
\footnotesize
\begin{longtable}{|l|l|l|}
\caption[Triple columns]{Triple columns.}\\
\hline
\multicolumn{1}{|c|}{\textbf{Time (s)}} & \multicolumn{1}{c|}{\textbf{Triple chosen}} & \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\
\hline
\endfirsthead
\multicolumn{3}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline
\multicolumn{1}{|c|}{\textbf{Time (s)}} & \multicolumn{1}{c|}{\textbf{Triple chosen}} & \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\
\hline
\endhead
\hline
\multicolumn{3}{|r|}{{Continued on next page}} \\
\hline
\endfoot
\hline \hline
\endlastfoot
\tablebody
\end{longtable}
\normalsize
\begin{multicols}{2}
\lipsum[1-10]
\end{multicols}
\end{document}