The multicol package
Sets part of a page in two to ten columns with the multicols environment and balances the columns at its end.
Loading the package
\usepackage{multicol}The class option twocolumn applies to whole pages, and the last page ends with one full and one short column. multicols starts and ends anywhere on a page, so a one-column title or figure can stand above two-column text, and the columns on the last page get the same height.
The text flows from one column to the next by itself. \columnbreak forces the change at a chosen place.
Main commands
\begin{multicols}{2} ... \end{multicols} | Text in two columns; the number can go up to 10. |
\begin{multicols}{2}[\section{Title}] | The optional argument is set across all columns above them and kept on the same page as the start of the columns. |
\columnbreak | Ends the current column here. |
\setlength{\columnsep}{1cm} | Distance between the columns. |
\setlength{\columnseprule}{0.4pt} | Draws a vertical rule of this thickness between the columns. |
\begin{multicols*}{2} | Starred form: fills the columns one after the other without balancing them. |
Complete example
\documentclass{article}
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\begin{document}
\section{One column}
This paragraph runs across the full width of the page.
\begin{multicols}{2}
This text is set in two columns. The environment splits it so that
both columns end at the same height. A longer text continues on the
next page in the same way.
\columnbreak
This sentence starts the second column because of the column break.
\end{multicols}
\end{document}Compiled with pdfLaTeX from TeX Live 2023.
Pitfalls
figureandtabledo not work insidemulticols: the float is dropped with the warningFloats and marginpars not allowed inside multicols environment. Use the starred formsfigure*andtable*, which span all columns, or the placement[H]of thefloatpackage for a figure inside one column.\marginparis not available inside the environment for the same reason.
Related pages
- How-to Two-column text in LaTeX
- How-to Page break in LaTeX
- Package
float