General ⇒ Multiple Table of Contents
Multiple Table of Contents
Is there an easy way to do this?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Multiple Table of Contents
one option would be to use some of the features provided by the tocloft package (please, refer to the package documentation for further information). The following example uses the standard \tableofcontents command to create a table of contents in English and illustrates how to proceed to also produce a table of contents in Spanish (the code contains some explanatory comments):
Code: Select all
\documentclass{book}
\usepackage[spanish,english]{babel}
\usepackage{tocloft}
\newcommand{\nombreindice}{\'Indice General}
\newlistof{indice}{tce}{\nombreindice}
% definition of the commands used for the Spanish ToC;
% \captce for chapters, \sectce for sections and
% \ssectce for subsections
\newcommand\captce[1]{%
\addcontentsline{tce}{chapter}{\protect\makebox[1.3em][l]{\thechapter}#1}}
\newcommand\sectce[1]{%
\addcontentsline{tce}{section}{\protect\makebox[2.8em][l]{\thesection}#1}}
\newcommand\ssectce[1]{%
\addcontentsline{tce}{subsection}{\protect\makebox[3em][l]{\thesubsection}#1}}
\begin{document}
\tableofcontents
\clearpage
\listofindice
\clearpage
\chapter{Test chapter one}
\captce{Cap\'itulo de prueba uno}
\section{Test section one one}
\sectce{Secci\'on de prueba uno uno}
\section{Test section one two}
\sectce{Secci\'on de prueba uno dos}
\subsection{Test subsection one two one}
\ssectce{Subsecci\'on de prueba uno dos uno}
\chapter{Test chapter two}
\captce{Cap\'itulo de prueba dos}
\section{Test section two one}
\sectce{Secci\'on de prueba dos uno}
\subsection{Test subsection two one one}
\ssectce{Subsecci\'on de prueba dos uno uno}
\subsection{Test subsection two one two}
\ssectce{Subsecci\'on de prueba dos uno dos}
\end{document}-
testificate
- Posts: 1
- Joined: Wed Jun 18, 2014 10:01 pm
Re: Multiple Table of Contents
Multiple Table of Contents
This works, but how do you add \chapter*{Introduction} (unnumbered) to this second list?
greetings
Multiple Table of Contents
\addcontentsline{tce}{chapter}{Introduction}