![如何将 tabularx 表转换为 twocolumn 类中的 longtable?](https://linux22.com/image/416603/%E5%A6%82%E4%BD%95%E5%B0%86%20tabularx%20%E8%A1%A8%E8%BD%AC%E6%8D%A2%E4%B8%BA%20twocolumn%20%E7%B1%BB%E4%B8%AD%E7%9A%84%20longtable%EF%BC%9F.png)
我创建了一个表格。我使用了 springer 的模板,它有一个 \documentclass[twocolumn] 类。表格如下图所示:
我的代码:
\documentclass[twocolumn]{svjour3}
gsave
newpath
20 20 moveto
20 220 lineto
220 220 lineto
220 20 lineto
closepath
2 setlinewidth
gsave
.4 setgray fill
grestore
stroke
grestore
\end{filecontents*}
%
\RequirePackage{fix-cm}
\begin{filecontents*}{Draft Paper.eps}
\usepackage{booktabs,array,enumitem,ragged2e}
\begin{document}
\begin{table} [htp]
\setcellgapes{2pt}
\centering
\scriptsize
\makegapedcells
\begin{tabularx}{\linewidth}
{| p{0.007\textwidth} | p{0.068\textwidth} | p{0.1535\textwidth} | p{0.1535\textwidth} | }
\hline
%%%%
\multicolumn{2}{|p{0.1\textwidth}|}{ A} & B & C\\ \hline
%%%%
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
\\ \hline
\end{tabularx}
\end{table}
\bibliographystyle{spmpsci_copy}
\bibliography{Bibliography}
\end{document}
如何激活我的表格的自动分页功能,我的意思是我想自动将表格中超出限制的部分替换到下一页,如下图所示:
答案1
做不是使用环境table
时,它不能有分列符或分页符。在这种情况下使用包supertabular
。但请记住,分页符只能在两个表格行之间,不是在表格行内:
\documentclass[twocolumn]{svjour3}
\usepackage{microtype}
\usepackage{supertabular,booktabs,array,enumitem,ragged2e}
\begin{document}
\small
\tablehead{\hline\multicolumn{2}{|l|}{ A} & B & C\\ \hline}
\tabletail{\hline}
\begin{supertabular}
{| l | p{0.068\textwidth} | p{0.17\textwidth} | p{0.17\textwidth} | }
\hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
\\ \hline
\multicolumn{2}{|l|}{MADM} &
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
&
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
\\
\end{supertabular}
\normalsize
\end{document}