# How do I set up two independent tables of contents

I am editing a novel in memoir class that requires a table of contents for the whole book (introduction, preface, chronology, bibliography, etcetera) and another independent table of contents for just the original novel (author's preface, chapters). I have been trying to use the shorttoc for the book material and the regular toc for the original novel material, but I cannot get the introduction and whatnot to appear in the shorttoc alone.

This is the structure that I want:

\shorttoc
Introduction
Note on the Text
Chronology
Novel
\toc
Author's Preface
Book One
Chapter One
Etcetera
Bibliography


I am not married to the shorttoc approach, so any solution would be welcome, especially if there is a way to create two completely independent tables of contents where I could just \addcontenstline to one or the other or both.

Update: Using Caramdir's solution, I can get the two tables of contents to appear, but I cannot get them to populate. Here is my code. The individual \addcontents lines are in the included files, but I have also tried them in the main file with the same results:

\documentclass{memoir}

\title{The Napoleon of Notting Hill}
\author{G. K. Chesterton}
\date{2012}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ccicons}
\usepackage{graphicx}
\usepackage{natbib}
\usepackage{titletoc}

\begin{document}

\frontmatter

\pagestyle{empty}

\include{maintitle}

\newpage

\newpage

\include{dedication}

\newpage

\pagestyle{simple}

\startcontents

\newpage

\include{introduction}

\newpage

\include{chronology}

\newpage

\mainmatter

\include{title}

\endcontents

\newpage

\startcontents
\printcontents{}{-1}{\chapter*{Contents}}

\include{chapterx} %etcerera

\endcontents

\endmatter

\nobibintoc
\include{bibliography}

\end{document}


Caramdir - The solution at Two independent TOCs would work as well, but neither solution will populate for me. I even cut the code straight from each into a test file, compiled twice, and still got empty headers. I am using ScribTeX to compile online. Might this have something to do with it?

-
Does tex.stackexchange.com/questions/48900/two-independent-tocs solve your problem? – Caramdir Apr 1 '12 at 0:58
possible duplicate of How to remove the self-reference of the ToC from the ToC? – cmhughes Apr 1 '12 at 20:04
I don't know: personally, I have neither used titletoc nor ScribTeX. – Caramdir Apr 2 '12 at 23:13
The issue was in ScribTex and has now been addressed by the admin. Gonzalo Medina's solutions here and in <a href="tex.stackexchange.com/questions/48900/…; tex.stackexchange.com/questions/48900/two-independent-tocs</…; now both work well. – Jeremy Apr 4 '12 at 13:54

The titletoc package allows you to obtain partial (independent) ToCs. The following example illustrates the procedure and also shows how to manually include (via \addcontentsline) entries in each one of the ToCs:

\documentclass{memoir}
\usepackage{titletoc}

\begin{document}

\startcontents
\printcontents{}{-1}{\chapter*{Short ToC}}

\chapter*{Introduction}
\chapter*{Note on the Text}
\chapter*{Chronology}
\chapter*{Novel}

\stopcontents

\startcontents
\printcontents{}{-1}{\chapter*{Contents}}

\chapter*{Author's Preface}

Just wanted to say thanks for the example, @GonzaloMedina; I wander why the manual doesn't have something like this :) Note to self: the manual's wording "\startcontents[<name>] - ... a partial toc begins ... The <name> argument allows different sets of tocs..." made me think that partial tocs are saved to files \jobname.<name> ; however, there is only one file for partial tocs, \jobname.ptc - and inside, different partial tocs are differentiated via \ttl@starttoc {<name>@1} (and corresponding ..stoptoc...) Many thanks again - cheers! – sdaau Jun 22 '12 at 4:25