Page Layoutmulticol package gives ugly white space between paragraphs

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
alexander van loon
Posts: 11
Joined: Tue Jun 02, 2009 5:49 pm

multicol package gives ugly white space between paragraphs

Post by alexander van loon »

Recently I’ve created a few LaTeX documents with two columns with the multicol package. However, I noticed that multicol gives PDF-documents which display ugly white space between the paragraphs. For an example, please take a look at:

http://alexandervanloon.nl/bsk.pdf

Take a look at the right column of text on the first page of the document. It’s obviously not looking good, the white space between the paragraph is almost as high as a line.

I created a minimal example (text is from the Iliad) and uploaded that as well as the source file. It’s compiled with xelatex, so my definition of a ‘minimal’ example might not be so minimal for others, but hopefully it will do:

http://alexandervanloon.nl/multicol-test.pdf
http://alexandervanloon.nl/multicol-test.tex

In the example the problem can also be seen in the right column of text on the first and the last page.

I thought that I might prevent this if the section heading and it’s white space or skip before and after the section ehading would be exactly as high as the ordinary lines. So I modified the previous document with the following code in the preamble:

Code: Select all

\setsecheadstyle{\normalfont\bfseries} % Change section heading to normal sized bold font
\setbeforesecskip{-\onelineskip} % Changes vertical space after section heading to one line
\setaftersecskip{\onelineskip} % Changes vertical space after section heading to one line
I looked up the info for variables \beforesecskip and \aftersecskip in the manual (page 358) of the memoir package, which I always use. See the following PDF-document and source:

http://alexandervanloon.nl/multicol-test-modified.pdf
http://alexandervanloon.nl/multicol-test-modified.tex

In the resulting PDF-document, the second, third and fourth pages now look good, with all lines of both columns at equal height. However, the text on the first and last pages still looks like garbage with huge white space between the paragraphs.

I’ve read the manual of the multicol package. The manual suggested playing with the \tolerance command, but that didn’t make any difference, and provided no help. Google doesn’t know the answer either.

A two column format is often used in scientific journals I come across, where the columns are always perfectly balanced with no white space, and the lines of both the columns are almost exactly at the same height. I hope LaTeX can produce such beautiful, ‘correct’ two column documents too?

I’m using the latest version of the multicol package, 1.6h, and I’m on Ubuntu Linux 10.04 so the TeXLive packages should probably be adequately up to date as well.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: multicol package gives ugly white space between paragrap

Post by frabjous »

I don't have access to the Gentium font on the system I'm currently working on (yes, I know it's free), so I can't test your example code, but you can probably remove the whitespace just by removing the rubber lengths between paragraphs:

\setlength{\parskip}{0pt}

Give it a try and see if it works.

P.S. I don't think this has anything to do with multicol. You'll get the same behavior with a regular page if there are bad vboxes.
alexander van loon
Posts: 11
Joined: Tue Jun 02, 2009 5:49 pm

multicol package gives ugly white space between paragraphs

Post by alexander van loon »

Thanks a ton, using your code fixed the problem. Now the text in both columns is aligned at equal height on all pages, just like the articles in the scientific journals. I had absolutely no idea that the parskip variable was the culprit, I’ll write a blog post about it so the world will know.
Post Reply