2

I want to have two table of contents in one document so I used the package etoc and I had two table of contents of the same contents, I want like this

\documentclass{book}
\usepackage{etoc}
\begin{document}
\tableofcontents % the first
\chapter{chapitre 1}% I want just this chapter in the first table of contents
\section{hello}
\tableofcontents
\chapter{chapitre2} % I want just this chapter in the second table of contents
\section{HELLO}
\end{document}

Any help please

Espoir
  • 110

2 Answers2

1

Here is the method using the etoc package:

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

\etocsettocstyle{\chapter*{First TOC (just chapter 1)}}{} \tableofcontents \ref{toc:chapter 1}% the first

\chapter{chapitre 1}% I want just this chapter in the first table of contents \invisiblelocaltableofcontents \label{toc:chapter 1} \section{hello}

\etocsettocstyle{\chapter*{Second TOC (just chapter 2)}}{} \tableofcontents \ref{toc:chapter 2}% the first

\chapter{chapitre2} % I want just this chapter in the second table of contents \invisiblelocaltableofcontents \label{toc:chapter 2} \section{HELLO}

\end{document}

Paul Gaborit
  • 70,770
  • 10
  • 176
  • 283
0

I used this code

\documentclass{book}
\usepackage{titletoc}
\begin{document}
\startcontents
\printcontents{}{-1}{\chapter*{Table des matière}}
\chapter{Chapitre 1}
\section{hello}
\stopcontents
\startcontents
    \printcontents{}{-1}{\chapter*{Table des matière}}
    \chapter{Chapitre 2}
    \section{Hello}
    \stopcontents
\end{document}

thanks to How do I set up two independent tables of contents

Espoir
  • 110