在 onecolumn Longtable/Supertabular 之前平衡 Latex twocolumn 布局

问题描述

我想在 Latex 的两列布局中放置一个 Longtable 或 Supertabular。表格对于单列来说太大了,所以对于表格,我切换到一列布局。这工作得很好,但表格前的两列不平衡,所以可能会出现巨大的差距。

一个例子:
如果左列被填满,表格随后开始,右列将留空,表格将在下一页开始。

我想把这个问题细分为两个问题:

  • 是否可以平衡表格前的两列?
  • Longtable 或 Supertabular 是否有可能在平衡列之后直接启动?因为如果表格很长并且无法容纳页面上的剩余空间,表格将从下一页开始。

示例代码

\documentclass[twocolumn]{scrbook}

\usepackage{lipsum}
\usepackage{longtable,booktabs}
\usepackage{supertabular}
\usepackage{luacode}

\title{Ein Testdokument}
\author{Its Me}
\date{5. Januar 2020}

\newcounter{rownumb}
\setcounter{rownumb}{1}
\newcommand{\tabline}{Test & \the\value{rownumb} & Description\addtocounter{rownumb}{1}\\}
\newcommand{\tablines}[1]{
  \luaexec{
    for i=1,#1,1 do
      tex.print(string.format("Test & \%d & Description \\\\",i))
    end
  }
}

\begin{document}
\maketitle
\tableofcontents

\chapter{Introduction}

\lipsum


\onecolumn
\begin{longtable}[]{lcr}
\caption{longtable}\tabularnewline
\toprule
First A & First B & First C \\
\midrule
\endfirsthead
\toprule
A & B & C \\
\midrule
\endhead
\tablines{50}
\bottomrule
\end{longtable}
\twocolumn


\lipsum

\begin{center}
\tablefirsthead{\hline First A & First B & First C \\ \hline}
\tablehead{\hline First A & First B & First C \\ \hline}
\tabletail{\hline}
\tablelasttail{\hline}
\topcaption{short supertabular}
\begin{supertabular}{lcr}
\tablines{10}
\end{supertabular}
\end{center}

\lipsum

\onecolumn
\tablefirsthead{\hline First A & First B & First C \\ \hline}
\tablehead{\hline First A & First B & First C \\ \hline}
\tabletail{\hline}
\tablelasttail{\hline}
\topcaption{long supertabular}
\begin{supertabular}{lcr}
\tablines{50}
\end{supertabular}
\twocolumn


\lipsum

\begin{table}
\centering
\begin{tabular}{lcr}
\hline First A & First B & First C \\ \hline
\tablines{10}
\hline
\end{tabular}
\end{table}

\lipsum

\end{document}

标签说明:
我会添加更多标签,如“表格”和“列平衡”,但我没有找到合适的标签,因为这是我的第一个问题,我无法添加不存在的标签。所以,如果有人觉得这很有意义,请添加更多标签

非常感谢和最好的问候

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)