我第一次用 latex 写论文,我有一个复杂而长的表格,超过了页面长度。所以我想将表格跨越多页,并重复标题。我也看到了一些使用 longtable 包的示例,但我的 latex 模板是双列模式,此外,我对 latex 没有足够的经验。
\documentclass[twocolumn]{svjour3} % twocolumn
%
\smartqed % flush right qed marks, e.g. at end of proof
%
\usepackage{graphicx}
\usepackage{bigstrut}
\usepackage{multirow}
\begin{document}
%Table 1
% Table generated by Excel2LaTeX from sheet 'Sheet1'
\begin{table}[htbp]
\centering
\caption{Add caption}
\begin{tabular}{|c|c|c|c|c|c|c|c|}
\hline
\textbf{head 1} & \multicolumn{3}{c|}{\textbf{head 1}} & \textbf{head 1} & \textbf{head 1} & \textbf{head 1} & \textbf{head 1} \bigstrut\\
\hline
\multirow{6}[12]{*}{2} & \multirow{4}[8]{*}{\textbf{Data}} & \multicolumn{2}{c|}{\multirow{2}[4]{*}{\textbf{Data}}} & \multirow{2}[4]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & & \multicolumn{2}{c|}{} & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{3-8} & & \multicolumn{2}{c|}{\multirow{2}[4]{*}{\textbf{Data}}} & \multirow{2}[4]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & & \multicolumn{2}{c|}{} & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{2-8} & \multicolumn{3}{c|}{\multirow{2}[4]{*}{\textbf{Data}}} & \multirow{2}[4]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 1 & 1000 & 2000 \bigstrut\\
\hline
\multirow{12}[24]{*}{4} & \multirow{8}[16]{*}{\textbf{Data}} & \multicolumn{2}{c|}{\multirow{4}[8]{*}{\textbf{Data}}} & \multirow{4}[8]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & & \multicolumn{2}{c|}{} & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{6-8} & & \multicolumn{2}{c|}{} & & Data 2 & 1000 & 2000 \bigstrut\\
\cline{6-8} & & \multicolumn{2}{c|}{} & & Data 3 & 1000 & 2000 \bigstrut\\
\cline{3-8} & & \multicolumn{2}{c|}{\multirow{4}[8]{*}{\textbf{Data}}} & \multirow{4}[8]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & & \multicolumn{2}{c|}{} & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{6-8} & & \multicolumn{2}{c|}{} & & Data 2 & 1000 & 2000 \bigstrut\\
\cline{6-8} & & \multicolumn{2}{c|}{} & & Data 3 & 1000 & 2000 \bigstrut\\
\cline{2-8} & \multicolumn{3}{c|}{\multirow{4}[8]{*}{\textbf{Data}}} & \multirow{4}[8]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 2 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 3 & 1000 & 2000 \bigstrut\\
\hline
\multirow{18}[36]{*}{6} & \multicolumn{2}{c|}{\multirow{12}[24]{*}{\textbf{Data}}} & \multirow{6}[12]{*}{\textbf{Data}} & \multirow{6}[12]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 2 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 3 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 4 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 5 & 1000 & 2000 \bigstrut\\
\cline{4-8} & \multicolumn{2}{c|}{} & \multirow{6}[12]{*}{\textbf{Data}} & \multirow{6}[12]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 2 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 3 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 4 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 5 & 1000 & 2000 \bigstrut\\
\cline{2-8} & \multicolumn{3}{c|}{\multirow{6}[12]{*}{\textbf{Data}}} & \multirow{6}[12]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 2 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 3 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 4 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 5 & 1000 & 2000 \bigstrut\\
\hline
\multirow{24}[48]{*}{8 Data} & \multicolumn{2}{c|}{\multirow{16}[32]{*}{\textbf{Data}}} & \multirow{8}[16]{*}{\textbf{Data}} & \multirow{8}[16]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 2 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 3 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 4 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 5 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 6 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 7 & 1000 & 2000 \bigstrut\\
\cline{4-8} & \multicolumn{2}{c|}{} & \multirow{8}[16]{*}{\textbf{Data}} & \multirow{8}[16]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 2 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 3 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 4 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 5 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 6 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{2}{c|}{} & & & Data 7 & 1000 & 2000 \bigstrut\\
\cline{2-8} & \multicolumn{3}{c|}{\multirow{8}[16]{*}{\textbf{Data}}} & \multirow{8}[16]{*}{3000} & Data 0 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 1 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 2 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 3 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 4 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 5 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 6 & 1000 & 2000 \bigstrut\\
\cline{6-8} & \multicolumn{3}{c|}{} & & Data 7 & 1000 & 2000 \bigstrut\\
\hline
\end{tabular}%
\label{tab:addlabel}%
\end{table}%
\end{document}
% end of file template.tex
答案1
在两列文章中,长表格可以跨越多页并带有标题吗?基本上可以,使用supertabular
包和环境。但是,您使用多行单元格,这使得自动引入行分隔符变得困难/不可能。
两个建议:
将表拆分成两个或更多个。
使用较小的字体大小来显示表格。但是,如果您不拆分表格,则需要
\tiny
,这会使表格适合一列,但会使阅读变得困难。