I have a document in two column mode. All works fine (all in two columns) — except the table of contents (toc). Strangely I found a solution:
\unsettoc{toc}{onecolumn}
This leads to a toc in two columns?! I do not understand since it says
literallyonecolumn
in the command.
(screenshot; taken from the manual)
\documentclass[
twoside = false,
twocolumn = true,
listof=totoc,
]{scrbook}
% Comment in/out to see effect
\unsettoc{toc}{onecolumn}
\begin{document}
\tableofcontents
\chapter{Chapter}
Test
\section{Section}
Test
\subsection{SubSection}
Test
\subsubsection{SubSubSection}
Test
\paragraph{Paragraph}
Test
\subparagraph{SubParagraph}
Test
\end{document}
\unsettoc{toc}{onecolumn}
active
\unsettoc{toc}{onecolumn}
NOT active
After the Solution
Be aware that there is a UNset
(unsettoc
) command and set
(setuptoc
) command. I didn't read carefully enough!
Best Answer
While the command
\setuptoc{<extension>}{<feature list>}
sets the features for an file extension liketoc
orlof
, the command\unsettoc{<extension>}{<feature list>}
unsets the listed features. Note that these aretocbasic
commands and the file extension must be controlled by packagetocbasic
.Each of the KOMA-Script classes
scrartcl
,scrreprt
andscrbook
loads packagetocbasic
and their ToC and the default lists are controlled bytocbasic
automatically.scrreprt
andscrbook
also set the featureonecolumn
for the TOC and the lists of ownerfloat
as default. So if you do not want a onecolumn TOC withscrreprt
orscrbook
you have to useto deactivate the
onecolumn
feature for the TOC.If the lists (controlled by
tocbasic
) should alse be twocolumn, you can uselistof=totoc
is an option of the KOMA-Script classes which does the same asSo it effects only lists of the owner
float
likelof
orlot
and nottoc
. Note that an entry of the TOC in the TOC is not recommended. But it is possible withCode: