10

I am using also titletoc to improve how my table of contents. I would like to print the table of contents several times. How can I do it?

It does not work in the MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}

\begin{document}

\tableofcontents

\section{Hello}
\section{Bye}

\tableofcontents

\end{document}

enter image description here

PS: I have this code in my document, in order to have no title for the table of contents.

\makeatletter
\renewcommand\tableofcontents{%
    \@starttoc{toc}%
}
\makeatother

PPS: \renewcommand{\contentsname}{}% Remove \tableofcontents' title/name will not work since I am using [french]{babel}.

2 Answers 2

9

Here's one possibility using titletoc; using \printcontents, you can replicate the ToC as many times as desired:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{titletoc}

\begin{document}

\tableofcontents

\startcontents
\section{Hello}
\section{Bye}

\printcontents{}{1}{\section*{\contentsname}}

\printcontents{}{1}{\section*{\contentsname}}

\end{document}

enter image description here

12

Use etoc. It provides this functionality out-of-the-box:

enter image description here

\documentclass{article}
\usepackage{etoc}
\begin{document}

\tableofcontents

\section{Hello}
\section{Bye}

\tableofcontents

\end{document}
6

You must log in to answer this question.

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