# chapter, section, etc. in ToC but not appearing in document

Is it possible to have chapters, sections, etc. that appear in the ToC but not as actual headers in the document? Basically I just want tell the ToC "make a chapter mark here" but without making the actual chapter header. I would like to do that for my appendix in an internship report which consists of quite some NMR spectra.

\documentclass[11pt,a4paper]{scrreprt}

\begin{document}
\tableofcontents

\setcounter{chapter}{0}
\renewcommand{\thechapter}{\Alph{chapter}}
\chapter{Spectra}
\section{Compounds for Teaching Purposes}
\includepdf[angle=90]{./spectra/DHcompd197_1}
\end{document}


The ToC should look like here:

But I do not want the title here:

• Take a look at addcontentsline and phantomsection. – leandriis Mar 2 at 17:07
• Did you try using an empty optional argument: \chapter[][Introduction} for instance? – Bernard Mar 2 at 17:08

Issue

\cleardoublepage
\includepdf[..]{...}


\cleardoublepage puts you on the correct (recto) page for a regular \chapter. You can do the same for \sections and other sectional units, for example

\addcontentsline{toc}{chapter}{\numberline{A}Spectra}


If you're using hyperref as well, you'll need to add a \phantomsection before each use of an arbitrary \addcontentsline in order for the hyperlink to jump appropriately. More specifically,

\usepackage{hyperref}
...
\cleardoublepage
\phantomsection
\phantomsection


With a KOMA-Script class I would use

\cleardoubleoddpage
\refstepcounter{chapter}


Example:

\documentclass[
%11pt,a4paper,% default
]{scrreprt}
\usepackage{hyperref}

\newcommand\chapteronlytocentry[1]{%
\cleardoubleoddpage
\refstepcounter{chapter}%
}
\newcommand\sectiononlytocentry[1]{%
\cleardoubleoddpage
\refstepcounter{section}%
}

\begin{document}
\tableofcontents
\clearpage
See appendix \ref{sec:asec} (page \pageref{sec:asec}).

\appendix

\chapteronlytocentry{Spectra}
\sectiononlytocentry{Compounds for Teaching Purposes}
\includepdf[angle=90,pages=1,pagecommand={}]{dummy-l.pdf}

\sectiononlytocentry{Another Section}\label{sec:asec}%
\includepdf[angle=90,pages=2]{dummy-l.pdf}

\end{document}


Result: