TransWikia.com

Two column mode does not give columns of exactly the same height

TeX - LaTeX Asked on February 12, 2021

Sometimes latex does not care that two columns be of exactly the same height. Here is an example, where on the first page the left column is about a millimeter longer than the right one:

documentclass[twocolumn,a4paper,12pt]{article}
usepackage[margin=3.0cm]{geometry}
usepackage[utf8]{inputenc}
usepackage{librebaskerville}
usepackage[T1]{fontenc}
setlength{parindent}{2em}
setlength{parskip}{0.5em}
renewcommand{baselinestretch}{1.1}
usepackage{lipsum}

begin{document}
lipsum[1-6]
end{document}

Is the problem caused by the fixed paragraph space lengths? If yes, how to reduce/enlarge them but still have the vertical stretching working?

One Answer

LaTeX uses flushbottom by default in twocolum, so that any stretchabke vertical space is stretched so that the baselines of the last row in each column line up.

In your example though you have removed all stretchable space, setting parskip to a fixed 6pt, and having no section headings or display math on the page means that there is no space that can be stretched. as parskip is not a multiple of baselineskip the columns are necessarily of different lengths as they have different numbers of paragraph breaks.

You could use

setlength{parskip}{baselineskip}

if you want all lines to line up:

enter image description here

Although that still has no stretchable space to account for any items that are of different heights.

Or use a flexible parskip such as

setlength{parskip}{6pt plus 2pt}

enter image description here

Answered by David Carlisle on February 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP