TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to include an entire pdf file with pdfpages but I will not use numbering in the table of contents. Here is a MWE, which illustrates the problem.

Only a test
\addsec{Another Test}
\includepdf[pages=-,addtotoc={1,section,1,{Another PDF},test}]{test.pdf}

I will not number the entry in the toc for the included pdf. Well, I can set the number, denoting depth of section to a higher value than tocdepth/secnumdepth (which is working, like \includepdf[pages=-,addtotoc={1,section,6,{Another PDF},test}]{test.pdf} ).

Is there a smarter solution available?

share|improve this question
You could say something like { \renewcommand\thesection{} \addtocounter{section}{-1} \includepdf[pages=-,addtotoc={1,section,1,{Another PDF},test}]{b.pdf} } but I am not sure of this would be "smarter". – Gonzalo Medina Mar 22 '13 at 2:37
up vote 5 down vote accepted

You know the command addsec provided by a KOMA class. You can use this as an option of addtotoc:

\includepdf[pages=-,addtotoc={1,addsec,1,{Another PDF},test}]{test-crop.pdf}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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