General ⇒ Multiple Table of Contents
Multiple Table of Contents
Is there an easy way to do this?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
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}
-
- 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}
