Site icon texblog

Tidy and compact table of contents with multitoc

The multitoc package provides an easy and clean way to save space when producing a table of contents. It allows for two or more columns. Similarly, list of figures and list of tables can be compressed.

\documentclass[11pt]{article}
\usepackage{blindtext}
\usepackage[toc]{multitoc}
\renewcommand*{\multicolumntoc}{2}
\setlength{\columnseprule}{1pt}
\begin{document}

\tableofcontents

\section{Introduction}
\blindtext\blindtext
\section{Methods}
\subsection{First approach}
\blindtext
\subsection{Second approach}
\blindtext
\subsection{Third approach}
\blindtext
\section{Results}
\subsection{First approach}
\blindtext\blindtext
\subsection{Second approach}
\blindtext\blindtext
\subsection{Third approach}
\blindtext\blindtext
\section{Discussion}
\blindtext\blindtext
\end{document}

 

The basics

To produce a multi-column table of contents like the one above you’ll have to do the following:

  1. Load the package
  2. Redefine the number of columns if required (default 2)
  3. Optionally, add a column-separating line
\usepackage[toc]{multitoc}
\renewcommand*{\multicolumntoc}{2}
\setlength{\columnseprule}{0.5pt}

 

List of figures and list of tables

Similarly, the lists of figures and tables can be produced in multiple columns using the respective options. Again, the default number of columns is two. If necessary, use the toc-equivalent commands to adjust the number of columns.

\usepackage[lof,lot]{multitoc}

\renewcommand*{\multicolumnlof}{2}
\renewcommand*{\multicolumnlot}{2}

 

Additional notes

At this point I wasn’t able to mix multi-column with single-column lists. It’s either all content lists (toc, lof and lot) in two or more columns or none.

If you type the list commands, e.g. \listoffigures, but forget the option, i.e. lof, while loading the package, only the heading is produced.

Multitoc is based on commands provided by the multicol package.

For additional flexibility see the more recent titlesec/titletoc package

Exit mobile version