In the file with two columns by twocolumn
options, the last page can't be balanced by balance
package if lineno
package works.
\documentclass[twocolumn]{book}
\usepackage{lipsum,balance}
\usepackage[switch]{lineno}
\begin{document}
\twocolumn[
\begin{@twocolumnfalse}
\chapter{the first}
\end{@twocolumnfalse}
]
\linenumbers
\lipsum[1-8]
balabala
\balance
\end{document}
produces:
Obvious, the last page is not balanced. So, how to balance the last page based on lineno
working.
As pbalance
would work in sometime, but when there are figures with figure*
parameter, pbalance
would be very difficult to be adjusted well.
\documentclass[twocolumn]{book}
\usepackage{lipsum,pbalance,stfloats,graphicx}
\usepackage[switch]{lineno}
%\shrinkLastPage{2.2in}
\begin{document}
\twocolumn[
\begin{@twocolumnfalse}
\chapter{the first}
\end{@twocolumnfalse}
]
\linenumbers
\lipsum[1]
\par
\begin{figure*}[b]
\centering
\includegraphics[width=0.4\textwidth]{example-image-a}
\end{figure*}
\lipsum[2-8]
balabala
\end{document}
produces:
\balance
to work it needs to install a new output routine;lineno
also does its numbering by changing the output routine. The two are incompatible. You can see this immediately by thinking about the question of "where should the line number appear?" Forlineno
to decide whether to put the number on the left or on the right, it needs to know whether the text is in the left or the right column. Butbalance
needs to set the text first before deciding ...lineno
attaches the line numbers as they are set. So you end up with either lack of balancing, or what happens when you try to combinelineno
andmulticol
(where the line numbers always show up on the same side). // So the answer is: "they can't work together, unless someone puts in the effort to write some code to makebalance
work withlineno
explicitly."\newpage
to force a column switch. I don't know about any "automatic" solutions to this problem.