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

But it looks wierd if I have a title included in two columns - second column is above the title. So I would like to have something like that:

\section*{My content}
\begin{multicols}{2}
\tableofcontents
\end{multicols}

Is there any way to do this?

-
Which document class are you sing? –  Gonzalo Medina Dec 11 '11 at 18:20

The article document class defined \tableofcontents as

\newcommand\tableofcontents{%
\section*{\contentsname
\@mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\@starttoc{toc}%
}

This prints both the \contentsname as a \section* and marks the headers, after which it typesets the actual ToC (via \@starttoc{toc}). If you forego the header adjustments, merely renewing the \tableofcontents command to

\renewcommand{\tableofcontents}[1][\contentsname]{%
\section*{#1}
\begin{multicols}{2}
\@starttoc{toc}
\end{multicols}
}

would suffice. This typesets a \section* with the contents name provided as an optional argument (default is \contentsname, which is Contents in article). Afterwards, if starts a two-column multicol environment and inserts the ToC. Here's a minimal example:

\documentclass{article}
\usepackage{multicol}% http://ctan.org/pkg/multicol
\makeatletter
\renewcommand{\tableofcontents}[1][\contentsname]{%
\section*{#1}
\begin{multicols}{2}
\@starttoc{toc}
\end{multicols}
}
\makeatother
\begin{document}
\section{First section}%
\subsection{First subsection}%
\subsection{Second subsection}%
\subsection{Third subsection}%
\subsection{Last subsection}%
\section{Second section}%
\subsection{First subsection}%
\subsection{Second subsection}%
\subsection{Third subsection}%
\subsection{Last subsection}%
\section{Last section}%
\subsection{First subsection}%
\subsection{Second subsection}%
\subsection{Third subsection}%
\subsection{Last subsection}%
\end{document}​
-
Thank you again, it is exactly what I needed.. –  Yetty Dec 11 '11 at 18:27
you might want to also include a \mathboth statement after the section command so to get running headers for any followup pages (if the TOC is long). –  Frank Mittelbach Dec 19 '11 at 17:09
I'm too slow for this system it doesn't allow me to correct my comments after 5 min ... this should have come first: @Werner For the sake of separating document structure from document layout I would recommend to redefine \tableofcontents to include both \section* and the multicols environment. Then your source stays clean and you only have additions/changes in the preamble. –  Frank Mittelbach Dec 19 '11 at 17:17
@FrankMittelbach: Thanks - good and clean suggestion! –  Werner Dec 19 '11 at 18:10

For a ToC in multiple columns you can simply use the multitoc package.

\documentclass[11pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[margin=1in]{geometry}
\usepackage[toc]{multitoc}
\usepackage{blindtext}

\begin{document}
\tableofcontents

\Blinddocument
\end{document}
-
This is much simpler than the accepted answer. –  Mk12 May 20 '13 at 15:14
The package conflicts with the tocbasic package from KOMA-script. Which is not that surprising... –  Keks Dose Apr 16 at 16:08