Two Columns in LaTeX: twocolumn, multicol and \multicolumn in Tables
Quick answer
- Whole document:
\documentclass[twocolumn]{article}. - Part of a page, any number of columns:
\usepackage{multicol}and\begin{multicols}{2} ... \end{multicols};\columnbreakstarts the next column. - Gap and rule:
\setlength{\columnsep}{1cm},\setlength{\columnseprule}{0.4pt}. - Figure across both columns:
\begin{figure*}[t] ... \end{figure*}(alsotable*). - Not the same thing:
\multicolumn{2}{c}{text}merges two cells of a table row.
\documentclass{article}
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\setlength{\columnseprule}{0.4pt}
\begin{document}
One-column introduction.
\begin{multicols}{2}
Left column text. \columnbreak
Right column text.
\end{multicols}
\begin{tabular}{lcc}
& \multicolumn{2}{c}{Score} \\
Name & Test 1 & Test 2 \\
Ada & 91 & 95
\end{tabular}
\end{document}“Two columns” means two different things in LaTeX. Page columns, where the text flows down one column and continues in the next, come from the twocolumn class option or the multicol package. Merged table cells, where one cell spans several columns of a table, come from \multicolumn. This guide covers both: when to use twocolumn or multicols, how to set the column gap and force a column break, how to make figures span both columns, and how \multicolumn works in tables, with the errors each one produces.
Two-Column Documents: the twocolumn Option
The twocolumn option of the standard classes (article, report, book) sets every page in two columns. It is what most conference and journal templates use. To keep the title and abstract across the full width, pass them to \twocolumn as an optional argument:
\documentclass[twocolumn]{article}
\usepackage{lipsum}
\setlength{\columnsep}{0.8cm}
\title{A Two-Column Paper}
\author{Ada Lovelace}
\begin{document}
\twocolumn[
\begin{@twocolumnfalse}
\maketitle
\begin{abstract}
This abstract runs across the full page width, above both columns.
\end{abstract}
\bigskip
\end{@twocolumnfalse}
]
\section{Introduction}
\lipsum[1-3]
\section{Method}
\lipsum[4-6]
\end{document}The @twocolumnfalse wrapper lets \maketitle and the abstract environment act as in one-column mode. Without the optional argument, \maketitle alone already spans both columns in the standard classes; the abstract does not. \onecolumn and \twocolumn in the body switch modes but always start a new page.
Inside a column, \columnwidth is the width of one column and \textwidth the width of both plus the gap. Size images in an ordinary figure with width=\columnwidth.
Figures and Tables Spanning Both Columns: figure*
In a two-column document, figure and table are one column wide. Their starred forms, figure* and table*, span both columns:
\documentclass[twocolumn]{article}
\usepackage{graphicx,lipsum}
\begin{document}
\section{Results}
\lipsum[1]
\begin{figure*}[t]
\centering
\rule{0.9\textwidth}{4cm} % stands in for \includegraphics[width=0.9\textwidth]{plot}
\caption{A figure across both columns.}
\label{fig:wide}
\end{figure*}
\begin{figure}[t]
\centering
\rule{\columnwidth}{3cm} % one column wide
\caption{A figure in one column.}
\end{figure}
Figure~\ref{fig:wide} is placed at the top of the next page. \lipsum[2-5]
\end{document}A spanning float can only go at the top of a page ([t]) or on a page of floats ([p]), and LaTeX places it on the page after the one where it appears in the source at the earliest. [h] and [b] are not supported; the stfloats package adds bottom placement. Move the figure* earlier in the source if it lands too late. Float placement in general is covered in tables.
The multicol Package: \begin{multicols}
The multicol package puts any part of a page into columns and switches back to one column on the same page. It supports two, three or more columns and balances them so they end at the same height:
\documentclass{article}
\usepackage{multicol,lipsum}
\setlength{\columnsep}{1cm}
\setlength{\columnseprule}{0.4pt} % vertical line between columns
\begin{document}
\section{One column}
\lipsum[1]
\begin{multicols}{3}[\section{Three columns}]
\lipsum[2]
\columnbreak % start the next column here
\lipsum[3]
\end{multicols}
\begin{multicols*}{2} % starred: fill columns, no balancing
\lipsum[4]
\end{multicols*}
\end{document}The optional argument after the column count (here [\section{...}]) is set in one column above the columns and kept on the same page as them. Useful settings:
| Setting | Effect |
|---|---|
\begin{multicols}{3} | Three balanced columns |
\begin{multicols*}{2} | Columns filled one after the other, not balanced |
\columnbreak | Starts the next column at this point |
\setlength{\columnsep}{1cm} | Gap between columns (default 10pt) |
\setlength{\columnseprule}{0.4pt} | Rule between columns (default 0pt, no rule) |
\raggedcolumns | Columns may end at different heights instead of stretching space |
\setlength{\multicolsep}{6pt} | Space above and below the environment |
Figures inside multicols
Ordinary floats are not allowed inside multicols: multicol warns “Floats and marginpars not allowed inside `multicols' environment!” and the figure is lost. Use figure* to span all columns, or place the image directly with \captionof from the caption package:
\documentclass{article}
\usepackage{multicol,caption,lipsum}
\begin{document}
\begin{multicols}{2}
\lipsum[1]
\begin{center}
\rule{0.9\linewidth}{2.5cm} % \includegraphics[width=0.9\linewidth]{plot}
\captionof{figure}{A figure in one column of a multicols block.}
\end{center}
\lipsum[2]
\end{multicols}
\end{document}twocolumn vs multicol
[twocolumn] option | multicol package | |
|---|---|---|
| Scope | Whole document | Any part of a page |
| Columns | Two | Two or more |
| Last page balanced | No (use flushend or balance) | Yes (unless multicols*) |
| Floats | figure one column, figure* both | Only figure* / table* |
| Column break | \newpage ends the column | \columnbreak |
| Footnotes | At the foot of the column | Across the full page width |
| Typical use | Journal and conference papers | Newsletters, CVs, lists, a two-column section |
If a journal template already uses twocolumn, do not add multicols on top of it. For a three-column list inside a one-column report, multicols is the right tool; see also lists.
\multicolumn in LaTeX Tables
\multicolumn{n}{alignment}{content} is a table command, unrelated to page columns. It replaces n cells of a row with one cell that spans them, with its own alignment (l, c, r or p{width}, plus | for vertical rules):
\documentclass{article}
\usepackage{booktabs,multirow}
\begin{document}
\begin{tabular}{lccc}
\toprule
\multirow{2}{*}{Model} & \multicolumn{3}{c}{Accuracy (\%)} \\
\cmidrule(lr){2-4}
& Train & Validation & Test \\
\midrule
Baseline & 91.2 & 88.4 & 87.9 \\
Ours & 95.7 & 93.1 & 92.8 \\
\midrule
\multicolumn{4}{l}{\footnotesize Mean of five runs.} \\
\bottomrule
\end{tabular}
\bigskip
\begin{tabular}{|l|r|r|}
\hline
\multicolumn{3}{|c|}{Totals} \\
\hline
Item & Q1 & Q2 \\
\hline
\multicolumn{1}{|c|}{centred} & 10 & 20 \\
\hline
\end{tabular}
\end{document}Three rules make \multicolumn work. It must be the first thing in its cell. The spanned cells still count, so \multicolumn{3}{c}{...} in a four-column table leaves one more cell in that row. And the alignment argument replaces the column's own, including its vertical rules, which is why the second table writes |c|. \multicolumn{1}{c}{...} is the standard way to change the alignment of a single cell. To span rows instead, use \multirow from the multirow package. More on table layout in LaTeX tables.
Common Errors and Fixes
| Message or symptom | Cause | Fix |
|---|---|---|
Undefined control sequence at \columnbreak | multicol not loaded, or \columnbreak used with the twocolumn option | \usepackage{multicol}; in twocolumn use \newpage |
| Package multicol Warning: Floats and marginpars not allowed inside `multicols' environment! | A figure, table or \marginpar inside multicols; it disappears | figure*, or a non-floating image with \captionof |
figure* appears a page late or at the end | Spanning floats only go at the top of a later page | Use [t] or [tp] and move it earlier in the source |
| Last page columns uneven in a twocolumn paper | twocolumn does not balance columns | \usepackage{flushend} or the balance package |
| Extra alignment tab has been changed to \cr | A row has more cells than the table has columns, often because the cells spanned by \multicolumn were not counted | Make each row add up: \multicolumn{2}{c}{...} counts as two cells |
| Misplaced \omit | \multicolumn is not the first thing in its cell, e.g. x \multicolumn{...} | Start the cell with \multicolumn; put other content inside it |
| Vertical rule missing next to a merged cell | The alignment in \multicolumn replaces the column's rules | Repeat them: \multicolumn{2}{|c|}{...} |
Frequently Asked Questions
How do I make a two-column document in LaTeX?
Add the twocolumn option to the document class: \documentclass[twocolumn]{article}. Every page is then set in two columns. To put only part of the document in columns, load the multicol package and wrap that part in \begin{multicols}{2} … \end{multicols} instead.
What is the difference between twocolumn and multicol?
The twocolumn class option makes the whole document two columns; columns are not balanced on the last page and figure and table floats work normally. The multicol package makes columns for a part of a page, supports 2 or more columns, balances them at the end and lets you switch between one and several columns on the same page, but ordinary floats are not allowed inside.
How do I make a figure span two columns in LaTeX?
Use the starred environment: \begin{figure*} … \end{figure*}, with \includegraphics[width=\textwidth]. The same works for tables with table*. A spanning float can only go at the top of a page or on a float page, so it appears at the top of the next page at the earliest; [h] is not supported.
How do I force a column break in LaTeX?
Inside a multicols environment, write \columnbreak where the new column should start; it needs the multicol package. In a document with the twocolumn option, \newpage ends the current column and \clearpage ends the page.
How do I merge cells across columns in a LaTeX table?
Use \multicolumn{number}{alignment}{content} in place of the cells to merge, for example \multicolumn{2}{c}{Results} spans two columns with centred text. It must be the first thing in its cell, and the merged cells count toward the total, so a row still adds up to the number of columns in the table. Merging rows needs \multirow from the multirow package.
How do I change the space between columns?
Set \columnsep in the preamble: \setlength{\columnsep}{1cm}. A vertical rule between the columns comes from \setlength{\columnseprule}{0.4pt}. Both work for twocolumn and multicol. In tables the gap between cells is a different length, \tabcolsep.
Next Steps
- LaTeX Tables – tabular, booktabs, multirow and table floats
- Page Size & Margins – Text width and margins for column layouts
- Spacing in LaTeX – Horizontal and vertical space
- Lists – Itemize and enumerate, also in columns
- Appendix in LaTeX – Lettered appendices after the main text
- Learn LaTeX: Tutorial for Beginners – The basics, from the first document up
Free LaTeX Tools
- LaTeX Preview – See a column layout compile instantly
- AI LaTeX Generator – Generate LaTeX from text descriptions
- LaTeX Symbols Reference – Browse math operators and special characters
Related Articles
Angle Brackets ⟨ ⟩: Symbol, Copy and Paste, and LaTeX
Compile LaTeX from Claude Code or Cursor with the Octree MCP Server
Diameter Symbol (⌀): Meaning, ⌀ vs Ø, and How to Type It on Windows, Mac, Word, LaTeX
LaTeX on iPad: How to Write and Compile LaTeX on a Tablet
Lay out two-column papers with AI
Octree's AI editor sets up two-column templates, moves figures across columns, fixes “Misplaced \omit” in tables and compiles your paper in seconds.
Try Octree Free →