我有以下 XeTeX 文档。您也可以在 ShareLaTeX 上查看。我有一个双列布局,有时会出现列中断,留下很大的空白空间。
\documentclass[twocolumn]{book}
\usepackage[bottom=1in]{geometry}
\usepackage{xeCJK}
\setCJKmainfont{SimSun}
\newcommand{\pinyin}[1] {{\sffamily #1}}
\newcommand{\definition}[1] {\textsl{#1}}
\usepackage{supertabular}
\parindent=0pt
\begin{document}
\chapter{}
This chapter contains 10 characters. If you know all 10 characters from the beginning of this book through the end of this chapter, you can \begin{itemize}\item recognize 1.5\% of the characters in Chinese movie subtitles.\item recognize 2.4\% of the characters in Chinese books.\end{itemize}On average, characters in this group will appear in 62.39\% of Chinese movies.
\section{一\hfill yī -- \definition{one}\quad}
\subsection*{Origin}
A single horizontal stroke, representing the number one.\subsection*{Words}
\begin{supertabular}{ r p{1.25cm} p{3.75cm}}一 & \pinyin{yī} & \definition{one; 1; single; a} \\
一一 & \pinyin{yī yī} & \definition{one by one} \\
\end{supertabular}
\section{二\hfill èr -- \definition{two}\quad}
\subsection*{Origin}
Two horizontal strokes, representing the number two.\subsection*{Words}
\begin{supertabular}{ r p{1.25cm} p{3.75cm}}二 & \pinyin{èr} & \definition{two; 2} \\
\end{supertabular}
\section{三\hfill sān -- \definition{three}\quad}
\subsection*{Origin}
Three horizontal strokes, representing the number three.\subsection*{Words}
\begin{supertabular}{ r p{1.25cm} p{3.75cm}}三 & \pinyin{sān} & \definition{three; 3} \\
\end{supertabular}
\section{四\hfill sì -- \definition{four}\quad}
\subsection*{Origin}
In ancient texts the character 亖 (four horizontal strokes) was used. The origin of the current form is unclear.\subsection*{Words}
\begin{supertabular}{ r p{1.25cm} p{3.75cm}}四 & \pinyin{sì} & \definition{four; 4} \\
\end{supertabular}
\end{document}
如您所见,第一页的右栏除了小节标题外几乎完全是空的,然后内容在第二页上继续。
为什么会发生这种情况?我该如何解决这个问题?
请注意,我正在从不同的来源自动生成 LaTeX 代码,最终会得到几百页,所以我不想做任何需要手动摆弄分页符的事情。
答案1
由于我没有 SimSun 字体,因此我无法准确重现您的 MWE,但我同意没有理由supertabular
在此 MWE 中使用。
除此之外,如果你不能放过这个问题supertabular
,或者因为其他原因你遇到了类似的问题,导致 LaTeX 无法找到分页符的最佳位置,那么当你在段落跳过之间留下一些可拉伸的胶水时,这个问题可以很大程度上得到缓解。
您可以使用一些类似的\parskip 1em plus 1em minus 1 em
(将 1em 修改为您认为更好的)或者更好的,使用包parskip
来留下零\parindent
和非零\parskip
。
\documentclass[twocolumn]{book}
\usepackage{parskip}
\usepackage[bottom=1in]{geometry}
\usepackage{xeCJK}
\newcommand{\pinyin}[1] {{\sffamily #1}}
\newcommand{\definition}[1] {\textsl{#1}}
\usepackage{supertabular}
\begin{document}
\chapter{}
This chapter contains 10 characters. If you know all 10 characters from the beginning of this book through the end of this chapter, you can \begin{itemize}\item recognize 1.5\% of the characters in Chinese movie subtitles.\item recognize 2.4\% of the characters in Chinese books.\end{itemize}On average, characters in this group will appear in 62.39\% of Chinese movies.
\section{一\hfill yī -- \definition{one}\quad}
\subsection*{Origin}
A single horizontal stroke, representing the number one.
\subsection*{Words}
\begin{supertabular}{ r p{1.25cm} p{3.75cm}}一 & \pinyin{yī} & \definition{one; 1; single; a} \\
一一 & \pinyin{yī yī} & \definition{one by one} \\
\end{supertabular}
\section{二\hfill èr -- \definition{two}\quad}
\subsection*{Origin}
Two horizontal strokes, representing the number two.
\subsection*{Words}
\begin{supertabular}{ r p{1.25cm} p{3.75cm}}二 & \pinyin{èr} & \definition{two; 2} \\
\end{supertabular}
\section{三\hfill sān -- \definition{three}\quad}
\subsection*{Origin}
Three horizontal strokes, representing the number three.
\subsection*{Words}
\begin{supertabular}{ r p{1.25cm} p{3.75cm}}三 & \pinyin{sān} & \definition{three; 3} \\
\end{supertabular}
\section{四\hfill sì -- \definition{four}\quad}
\subsection*{Origin}
In ancient texts the character 亖 (four horizontal strokes) was used. The origin of the current form is unclear.
\subsection*{Words}
\begin{supertabular}{ r p{1.25cm} p{3.75cm}}四 & \pinyin{sì} & \definition{four; 4} \\
\end{supertabular}
\end{document}
答案2
文档中supertabular
说,它会检查剩余空间是否足够,并可能据此开始新的一页。问题似乎是计算方面的逻辑缺陷。
该文件内容如下
TeX 寄存器
\pagetotal
包含迄今为止的页面高度,LaTeX 寄存器\@colroom
包含列的高度。127 \global\ST@pagesofar\pagetotal 128 \global\ST@pageleft\@colroom 129 \ST@trace\tw@{Height of text = \the\pagetotal; \MessageBreak 130 Height of page = \the\ST@pageleft}%
十行之后
在这种情况下,我们在第二列,所以我们必须补偿第一列中的材料。
141 \ST@trace\tw@{Second column}% 142 \global\advance\ST@pageleft -\ST@pagesofar 143 \global\advance\ST@pageleft -\@colroom 144 \fi
由于ST@pagesofar
是包括第一列材料在内的收集材料的高度,因此无需减去\@colroom
。
在您的例子中,\@colroom
约为 500pt,\ST@pagesofar
约为 540pt,其中额外的 40pt 来自\subsection*{Words}
。然后减法为
1000 - 540 - 500 = -40
这错误地表明空间不足,需要新的页面。