\chapter*{Prologue}
\addcontentsline{toc}{chapter}{Prologue}
\label{s:1}
\chapter{A first chapter}
\label{s:2}
\setcounter{tocdepth}{3}
\minitoc

paragraph text.

\section{A first section}
\label{s:3}
paragraph text.

\subsection{A subsection}
\label{s:4}
paragraph text.

\subsection{Another subsection}
\label{s:5}
paragraph text. A reference to the subsection
\hyperref[s:5]{Another subsection}.
\hyperref[s:5]{Another subsection}
\hyperref[s:5]{link text to Another subsection}.

\section{Another section}
\label{s:6}
paragraph text.

\chapter{A second chapter}
\label{s:7}
paragraph text.

\section{A last section}
\label{s:8}
\setcounter{tocdepth}{3}
\tableofcontents
\setcounter{tocdepth}{0}
\tableofcontents
\setcounter{tocdepth}{3}
\tableofcontents
\setcounter{tocdepth}{3}
\tableofcontents
\setcounter{tocdepth}{3}
\minitoc
