Is there any way to make table of contents in two column without using multicol?
I added twocolumn
in the document class, but the table of contents is still one column.
All solutions I found are using muitlcol.
However, using multicol
in twocolumn mode gives me warning:
Package multicol Warning: May not work with the twocolumn option on input line 150.
So, I don't want to use multicol
. Is there any way to make table of contents in two column without using multicol
?
EDIT:
I am using book
class
Best Answer
The
\tableofcontents
command from the standardbook.cls
checks whethertwocolumn
mode has been activated, usesonecolumn
and sets a flag in order to restore totwocolumn
after that.I decided to use a new command, say
\twocolumntoc
which does not check. It is, of course, possible to put thetwocolumn
command into the new macro and the restoration with\onecolumn
at the end of the command.The
pgffor
package is only for quick generation of content in here.