# Why does my two-column book have column breaks that leave huge empty spaces?

I have the following XeTeX document. You can also view it on ShareLaTeX. I have a two-column layout, and sometimes there is a column break that leaves a very huge empty space.

\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.
\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} \\

\end{supertabular}

\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}

\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}

\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}


As you can see, the right column on the first page is almost completely empty except for the subsection heading, and then the content continues on the second page.

Why is this happening and how can I fix this problem?

Note that I'm automatically generating the LaTeX code from a different source, and I'll end up with a few hundred pages, so I'd rather not do anything that requires manual fiddling with page breaks.

• Please post a Minimal Working Example here. Questions should be self-contained so that they remain useful to future users with the same or a similar problem. Unless you plan to maintain the buggy version of your book on the given site indefinitely? – cfr Aug 10 '16 at 1:30
• You are also much more likely to get answers if you post a manageable example. Especially if you'd like a choice of answers. Improving your question is likely to be much more effective in improving the range and quality of help than adding a bounty. (Adding a bounty gets people to look, I think, if only to see what's bugging people most. But who wants to trawl through the code for a book on another site?) – cfr Aug 10 '16 at 1:32
• @cfr Fair point. I've tried to minimize my example, I hope it's more manageable now. – Peter Olson Aug 10 '16 at 1:58

I cannot reproduce exactly your MWE because I do not have the SimSun font, but I agree that there is no reason to use supertabular in this MWE.

Besides this, if you cannot leave aside supertabular or your face a similar problem for another reason, causing LaTeX fail to find the best place for page breaks, this could be alleviated to a large extent when you left some stretchable glue between paragraphs skips.

You can use some like \parskip 1em plus 1em minus 1 em (modify 1em to what you find better) or better, use the the parskip package to left a zero \parindent and non-zero \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.
\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} \\

\end{supertabular}

\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}

\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}

\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}

• You may try adding a \vspace{-100pt} before section 1.2. – Symbol 1 Aug 11 '16 at 13:11
• @Symbol Yes, that mess supertabular checks again, that is the real problem,, but this does not contradict what I said. (that this can alleviate the problem) For example, the layout is correct with class scrbook because this class take care by default of the paragraph skip differently. Also a book class a \parskip 2pt plus 2pt minus 2pt fix up this layout (of course, except the negative vertical space) , but obviously is not the panacea for bad page breaks. – Fran Aug 11 '16 at 19:52

The document of supertabular says that it checks if there is enough space left and might start a new page accordingly. The problem seems to be a logical flaw concerning the calculation.

The TeX register \pagetotal contains the height of the page so far, the LaTeX register \@colroom contains the height of the column.

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}%


Ten lines later

In this case we’re in the second column, so we have to compensate for the material in the first column.

141   \ST@trace\tw@{Second column}%
144 \fi


Since ST@pagesofar is the height of collected materials including those in the first column, there is no need to substract \@colroom.

In your case, the \@colroom is about 500pt and \ST@pagesofar is about 540pt, where the extra 40pt comes from \subsection*{Words}. Then the subtraction reads

1000 - 540 - 500 = -40


which falsely indicates that there is no enough space, new page required.

• OK, thanks for the diagnosis of the problem. So what should I do to fix it? – Peter Olson Aug 9 '16 at 18:16
• Use normal tabular unless you have a strong reason... Formally a table is put inside a floating environment so there is always enough space. On the other hand if you do not care about layout, add potential pagebreak manually. – Symbol 1 Aug 9 '16 at 18:35
• Of course you are free to redefine \@calfirstpageht. Nonetheless, tabular in LaTeX is nothing but pain and table-related packages only make thing messier. One might find themselves lost in the ocean of TeX primitives and LaTeX internal commands. – Symbol 1 Aug 9 '16 at 18:59