1

As the title says I would like to have the title („Contents") appear above both columns as this picture suggests:Desired editing for TOC

I.e. the items within the table of contents should start at the same level in them both. Currently the title is considered as part of the first column (that is the issue). The creation I am following seems quite simple – using multicols –, so I might need guidance for a completely new direction replacing that. Below you can find my code:

\documentclass[7pt,a4paper]{report}

\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{multicol}
\usepackage{tocloft}

\setlength{\cftbeforetoctitleskip}{0pt}
\setlength{\cftaftertoctitleskip}{8pt}

\begin{document}

\begin{multicols}{2}
 \tableofcontents
\end{multicols}



\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}


\end{document}
1

1 Answer 1

1

Without using multicol, you can enter two-column mode, do the ToC, and return to one-column mode.

Using the answer ToC in two column without multicol

a

\documentclass[7pt,a4paper]{report}

\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{multicol}
\usepackage{tocloft}

\setlength{\cftbeforetoctitleskip}{0pt}
\setlength{\cftaftertoctitleskip}{8pt}


%% From https://tex.stackexchange.com/a/353870/161015
\makeatletter
\newcommand{\twocolumntoc}{% added <<<<<<<<<<<<<<<<
    \twocolumn
    \chapter*{\contentsname
    \@mkboth{%
        \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \@starttoc{toc}%
    \onecolumn
    }
\makeatother


\begin{document}
    
\twocolumntoc % added <<<<<<<<<<<<<<<<  
    

\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}

\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
\chapter{Asdf}
    
\end{document}

If you want a balanced columns, you can now use the multicol package with

\makeatletter
\newcommand{\twocolumntoc}{% added <<<<<<<<<<<<<<<<
    \chapter*{\contentsname
    \@mkboth{%
        \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \begin{multicols}{2}
        \@starttoc{toc}%
    \end{multicols}
    \onecolumn
    }
\makeatother

to get

b

2
  • On another note this seems to turn off \cftbeforetoctitleskip. Do you know how may I modify the spacing with this new structure?
    – Marton
    Apr 2, 2022 at 21:31
  • 1
    @Marton This site works best with one question at the time, to help other readers. Please add another question with some code that shows the problem. Apr 2, 2022 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .