I want to include some external documents (PDFs) in the appendix of the document I am writing. I would like to have these included documents listed in my table of contents, but no section heading should be typeset where they appear in the main document.

The setup I constructed with the help of this answer (included below) works fine, except that the links made by hyperref in the ToC all point to the start of the appendix. How can I get links in the ToC that point to the sections?

\documentclass[oneside]{scrbook}
\usepackage{hyperref,scrpage2}

\newcommand*\silentsection[1]{
\sectionmark{#1} % this is to get headers for the section
}

\automark{section}
\begin{document}
\tableofcontents
\chapter{main}
\clearpage\section{part}
\clearpage\section{with}
\chapter{some}
\clearpage\section{sections}

\appendix
\chapter{included documents}

\silentsection{one}

\cleardoublepage
\silentsection{two}

\cleardoublepage
\silentsection{three}

\end{document}

• Try \phantomsection just before your \silentsection command. – user31729 Aug 21 '14 at 9:13
• @ChristianHupfer: That works, thanks! If you want to post that as an answer I will accept it. – xebtl Aug 21 '14 at 9:17

Manual additions to a Toc (or LoF/LoT etc) via \addcontentsline often require a \phantomsection statement for correct linking, as well as for the bookmarks.

A more elaborate way would apply the \phantomsection command in \silentsection...

\documentclass[oneside]{scrbook}
\usepackage{hyperref,scrpage2}

\newcommand*\silentsection[1]{%
\sectionmark{#1} % this is to get headers for the section
}

\automark{section}
\begin{document}
\tableofcontents
\chapter{main}
\clearpage\section{part}
\clearpage\section{with}
\chapter{some}
\clearpage\section{sections}

\appendix
\chapter{included documents}
\phantomsection
\silentsection{one}