First: I'm not sure if this should be two separate questions but I've decided to post them as one.
Consider the following MWE (follow-up to Error regarding \contentsline when compiling):
\documentclass{article}
\usepackage{tocloft}
\usepackage{pdfpages}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\newpage
\section{A section}
\label{section:A}
Test
\newpage
\section{External document}
The following pages consist of external documents.
\phantomsection
\addtocontents
{toc}
{\protect
\contentsline
{subsection}
{\protect\numberline{}Dummy Page}
{4}
{}}
\includepdf[pages = -]{dummy.pdf}
\end{document}
-
How do I make the added ToC entry
Dummy Page
into a clickable link which directs me to the page where the dummy document starts (page 4, in this case)? -
How do I add a bookmark entry called
Dummy Page
with the correct page number (here, 4)?
Best Answer