latex - 在单列 Longtable/Supertabular 之前平衡 Latex 双列布局
问题描述
我想在 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}
关于标签的注释:
我会添加更多标签,如“table”和“column-balancing”,但我没有找到合适的标签,因为这是我的第一个问题,我无法添加不存在的标签。所以,如果有人觉得这很有意义,请添加更多标签。
非常感谢和最好的问候
解决方案
推荐阅读
- node.js - sequelize 中迁移之间的事务
- anychart - 更改 anychart 包装器大小
- laravel - 在 Laravel 中请求数字证书
- pip - 如何在 conda install 之前完成时避免再次安装 pip 包?
- javascript - 找不到“hammerjs”的类型定义文件
- python - 未引发 IntegrityError 外键违规
- c++ - 错误:没有用于调用 'ope::ope() 的匹配函数
- java - 在 mvn 集成测试运行阶段覆盖一个属性文件中的属性
- wordpress - 无法在 Chrome 上从 WordPress 站点下载文件,但在 Safari 和 Firefox 上运行良好
- google-bigquery - 如何在 Bigquery 中使用 Regexp_extract 提取第二个括号内的单词?