5

I am trying to make a document that has a table of contents at the beginning of each section. Each line item in the table of contents is a scanned document, and so there is no reason to include a page ahead of it with the name of the section. Is there a way to "mute" the listing of the section, and to just have the table of contents refer to the page that the scanned document is on?

Here's an example that shows the problem. Insert any old PDF to see the extra page generated in front of it:

\chapter{Chapter Title} \label{Chapter 1}
Introductory narrative (outside of any section).
\minitoc 

\section{Section 1} \label{sec:section 1}

\includepdf[pages={1}]{pdfs/MyDoc.pdf}

\section{Section 2} \label{sec:section 2}

\includepdf[pages={1}]{pdfs/MyDoc2.pdf}
1
  • Welcome to TeX.SX! You might have a look on our our starter page if you wish to familiarize yourself further with our format. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}) or hit Ctrl+K. Sep 9 '13 at 6:45
5

Use some of the experimental features of pdfpages. From the documentation (p 6):

addtotoc Adds an entry to the table of contents. This option requires five arguments, separated by commas:

addtotoc={<page number>,<section>,<level>,<heading>,<label>}

page number: Page number of the inserted page.
section: LaTeX sectioning name (e.g., section, subsection, ...)
level: Number, denoting depth of section (e.g., 1 for section level, 2 for subsection level, ...)
heading: Title inserted in the Table of Contents.
label: Name of the label. This label can be referred to with \ref and \pageref.

So try something like:

\includepdf[addtotoc={1,section,1,Section 1,sec:section1}]{mydoc}
\includepdf[addtotoc={1,section,2,Section 2,sec:section2}]{mydoc2}

There is also addtolist which provides similar functionality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.