summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-balance.html
blob: f04c9d2879469653b0a7886b6e83cbd9eed68654 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<head>
<title>UK TeX FAQ -- question label balance</title>
</head><body>
<h3>Balancing columns at the end of a document</h3>
<p/>The <i>twocolumn</i> option of the standard classes causes
LaTeX to set the text of a document in two columns.  However, the last
page of the document typically ends up with columns of different
lengths &mdash; such columns are said to be &ldquo;unbalanced&rdquo;.  Many (most?)
people don&rsquo;t like unbalanced columns.
<p/>The simplest solution to the problem is to use the <i>multicol</i>
package in place of the <i>twocolumn</i> option, as
<i>multicol</i> balances the columns on the final page by default.
However, the use of <i>multicol</i> does come at a cost: its
special output routine disallows the use of in-column floats, though
it does still permit full-width (e.g., <code>figure*</code>
environment) floats. 
<p/>As a result, there is a constant push for a means of balancing columns
at the end of a <i>twocolumn</i> document.  Of course, the job can
be done manually: <code>\</code><code>pagebreak</code> inserted at the appropriate place on
the last page can often produce the right effect, but this seldom
appeals, and if the last page is made up of automatically-generated
text (for example, bibliography or index) inserting the command will
be difficult.
<p/>The <i>flushend</i> package offers a solution to this problem.  It&rsquo;s a
somewhat dangerous piece of macro code, which patches one of the most
intricate parts of the LaTeX kernel without deploying any of the
safeguards discussed in <a href="FAQ-patch.html">patching commands</a>.
The package only changes the behaviour at end document (its
<code>\</code><code>flushend</code> command is enabled by default), and one other command
permits adjustment of the final balance; other packages in the bundle
provide means for insertion of full width material in two-column
documents.
<p/>The <i>balance</i> package also patches the output routine
(somewhat more carefully than <i>flushend</i>).
<p/>The user should be aware that any of these packages are liable to
become confused in the presence of floats: if problems arise, manual
adjustment of the floats in the document is likely to be necessary.
It is this difficulty (what&rsquo;s required in any instance can&rsquo;t really be
expressed in current LaTeX) that led the author of
<i>multicol</i> to suppress single-column-wide floats.
<dl>
<dt><tt><i>balance.sty</i></tt><dd>Distributed as part of <a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/preprint.zip">macros/latex/contrib/preprint</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/preprint.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/preprint/">browse</a>)
<dt><tt><i>flushend.sty</i></tt><dd>Distributed as part of <a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/sttools.zip">macros/latex/contrib/sttools</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/sttools.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/sttools/">browse</a>)
<dt><tt><i>multicol.sty</i></tt><dd>Distributed as part of <a href="ftp://cam.ctan.org/tex-archive/macros/latex/required/tools.zip">macros/latex/required/tools</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/required/tools.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/required/tools/">browse</a>)
<p/></dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=balance">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=balance</a>
</body>