You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

双栏Elsevier论文中如何让longtable占满单栏宽度

解决elsarticle双栏文档中longtable单栏排版问题

问题根源

  • 列宽总和超限:代码中固定列宽总和(1+1.8+1+2+2.1+1.3+2=11.2cm)远大于elsarticle 5p格式的单栏宽度(约8.9cm),导致表格溢出、排版混乱。
  • 表头列数错误:使用multicolumn{6}但实际表格有7列,续表表头格式失效。
  • 未适配单栏宽度:固定列宽无法匹配文档的单栏尺寸。

可行解决方案

方案1:手动调整列宽适配单栏

直接调整longtable列宽使其总和接近\columnwidth,同时修正表头错误:

\documentclass[5p,times,twocolumn,authoryear]{elsarticle}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{placeins}
\usepackage{multirow}
\usepackage{afterpage}
\usepackage{xcolor}
\usepackage{longtable}

\begin{document}

\afterpage{%
\begingroup
\scriptsize
\begin{longtable}{@{}p{0.8cm}p{1.5cm}p{0.8cm}p{1.6cm}p{1.7cm}p{1.1cm}p{1.2cm}@{}}
\caption{High Level Overview of Existing Frameworks}
\label{tab:general-description-v1}\\
\hline
\textbf{Name} &
\textbf{Authors} &
\textbf{Year} &
\textbf{Column A} & 
\textbf{Column B} & 
\textbf{Column C} &
\textbf{Column D} \\ \hline
\endfirsthead
% 修正multicolumn列数为7
\multicolumn{7}{@{}c@{}}{\textbf{Table \thetable\ continued from previous page}} \\
\hline
\textbf{Name} &
\textbf{Authors} &
\textbf{Year} & 
\textbf{Column A} & 
\textbf{Column B} & 
\textbf{Column C} &
\textbf{Column D} \\ \hline
\endhead
%
AA\textsuperscript{*}&
citation 1 &
2019-2020 &
data 1 &
data 2 &
data 3 &
data 4 \\ \hline

\multirow{2}{*}{BB\textsuperscript{*}} &
citation 2 &
2010 &
data 1 &
data 2 &
data 3 &
data 4 \\ \cline{2-7}

&citation 3 &
2013 &
data 1 &
data 2 &
data 3 &
data 4 \\ \hline

\end{longtable}
\endgroup
}%
\raggedbottom

\end{document}

方案2:用ltxtable实现弹性列宽(推荐)

通过ltxtable包结合tabularx的X列,自动分配剩余宽度,无需手动计算固定列宽:

  1. 创建单独的表格内容文件(例如table-content.tex):
\begin{tabularx}{\columnwidth}{@{}lXlXXXX@{}}
\hline
\textbf{Name} &
\textbf{Authors} &
\textbf{Year} &
\textbf{Column A} & 
\textbf{Column B} & 
\textbf{Column C} &
\textbf{Column D} \\ \hline
\endfirsthead
\multicolumn{7}{@{}c@{}}{\textbf{Table \thetable\ continued from previous page}} \\
\hline
\textbf{Name} &
\textbf{Authors} &
\textbf{Year} & 
\textbf{Column A} & 
\textbf{Column B} & 
\textbf{Column C} &
\textbf{Column D} \\ \hline
\endhead
%
AA\textsuperscript{*}&
citation 1 &
2019-2020 &
data 1 &
data 2 &
data 3 &
data 4 \\ \hline

\multirow{2}{*}{BB\textsuperscript{*}} &
citation 2 &
2010 &
data 1 &
data 2 &
data 3 &
data 4 \\ \cline{2-7}

&citation 3 &
2013 &
data 1 &
data 2 &
data 3 &
data 4 \\ \hline
\end{tabularx}
  1. 主文档中调用表格:
\documentclass[5p,times,twocolumn,authoryear]{elsarticle}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{placeins}
\usepackage{multirow}
\usepackage{afterpage}
\usepackage{xcolor}
\usepackage{ltxtable} % 替代longtable,支持tabularx弹性列

\begin{document}

\afterpage{%
\begingroup
\scriptsize
\LTXtable{\columnwidth}{table-content.tex}
\endgroup
}%
\raggedbottom

\end{document}

关键说明

  • \afterpage确保表格从下一页开始排版,避免截断当前页内容。
  • @{}...@{}去掉表格左右默认边距,让表格完全占满单栏宽度。
  • 方案2的X列自动适配内容长度,适合列内容不确定的场景。

内容的提问来源于stack exchange,提问作者Ines

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 05:25:07