@@ -77,34 +77,44 @@ markdown test suite.
7777
7878\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
7979
80−\section{Headers}\label{headers}
80+\hypertarget{headers}{%
81+\section{Headers}\label{headers}}
8182
83+\hypertarget{level-2-with-an-embedded-link}{%
8284\subsection{\texorpdfstring{Level 2 with an \href{/url}{embedded
83−link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link}
85+link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link}}
8486
87+\hypertarget{level-3-with-emphasis}{%
8588\subsubsection{\texorpdfstring{Level 3 with
86−\emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis}
89+\emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis}}
8790
88−\paragraph{Level 4}\label{level-4}
91+\hypertarget{level-4}{%
92+\paragraph{Level 4}\label{level-4}}
8993
90−\subparagraph{Level 5}\label{level-5}
94+\hypertarget{level-5}{%
95+\subparagraph{Level 5}\label{level-5}}
9196
92−\section{Level 1}\label{level-1}
97+\hypertarget{level-1}{%
98+\section{Level 1}\label{level-1}}
9399
100+\hypertarget{level-2-with-emphasis}{%
94101\subsection{\texorpdfstring{Level 2 with
95−\emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis}
102+\emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis}}
96103
97−\subsubsection{Level 3}\label{level-3}
104+\hypertarget{level-3}{%
105+\subsubsection{Level 3}\label{level-3}}
98106
99107with no blank line
100108
101−\subsection{Level 2}\label{level-2}
109+\hypertarget{level-2}{%
110+\subsection{Level 2}\label{level-2}}
102111
103112with no blank line
104113
105114\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
106115
107−\section{Paragraphs}\label{paragraphs}
116+\hypertarget{paragraphs}{%
117+\section{Paragraphs}\label{paragraphs}}
108118
109119Here's a regular paragraph.
110120
@@ -119,7 +129,8 @@ here.
119129
120130\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
121131
122−\section{Block Quotes}\label{block-quotes}
132+\hypertarget{block-quotes}{%
133+\section{Block Quotes}\label{block-quotes}}
123134
124135E-mail style:
125136
@@ -164,7 +175,8 @@ And a following paragraph.
164175
165176\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
166177
167−\section{Code Blocks}\label{code-blocks}
178+\hypertarget{code-blocks}{%
179+\section{Code Blocks}\label{code-blocks}}
168180
169181Code:
170182
@@ -188,9 +200,11 @@ These should not be escaped: \$ \\ \> \[ \{
188200
189201\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
190202
191−\section{Lists}\label{lists}
203+\hypertarget{lists}{%
204+\section{Lists}\label{lists}}
192205
193−\subsection{Unordered}\label{unordered}
206+\hypertarget{unordered}{%
207+\subsection{Unordered}\label{unordered}}
194208
195209Asterisks tight:
196210
@@ -261,7 +275,8 @@ Minuses loose:
261275 Minus 3
262276\end{itemize}
263277
264−\subsection{Ordered}\label{ordered}
278+\hypertarget{ordered}{%
279+\subsection{Ordered}\label{ordered}}
265280
266281Tight:
267282
@@ -327,7 +342,8 @@ Multiple paragraphs:
327342 Item 3.
328343\end{enumerate}
329344
330−\subsection{Nested}\label{nested}
345+\hypertarget{nested}{%
346+\subsection{Nested}\label{nested}}
331347
332348\begin{itemize}
333349\tightlist
@@ -392,7 +408,8 @@ Same thing but with paragraphs:
392408 Third
393409\end{enumerate}
394410
395−\subsection{Tabs and spaces}\label{tabs-and-spaces}
411+\hypertarget{tabs-and-spaces}{%
412+\subsection{Tabs and spaces}\label{tabs-and-spaces}}
396413
397414\begin{itemize}
398415\item
@@ -408,7 +425,8 @@ Same thing but with paragraphs:
408425 \end{itemize}
409426\end{itemize}
410427
411−\subsection{Fancy list markers}\label{fancy-list-markers}
428+\hypertarget{fancy-list-markers}{%
429+\subsection{Fancy list markers}\label{fancy-list-markers}}
412430
413431\begin{enumerate}
414432\def\labelenumi{(\arabic{enumi})}
@@ -496,7 +514,8 @@ B. Williams
496514
497515\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
498516
499−\section{Definition Lists}\label{definition-lists}
517+\hypertarget{definition-lists}{%
518+\section{Definition Lists}\label{definition-lists}}
500519
501520Tight using spaces:
502521
@@ -599,7 +618,8 @@ orange fruit
599618\end{enumerate}
600619\end{description}
601620
602−\section{HTML Blocks}\label{html-blocks}
621+\hypertarget{html-blocks}{%
622+\section{HTML Blocks}\label{html-blocks}}
603623
604624Simple block on one line:
605625
@@ -661,7 +681,8 @@ Hr's:
661681
662682\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
663683
664−\section{Inline Markup}\label{inline-markup}
684+\hypertarget{inline-markup}{%
685+\section{Inline Markup}\label{inline-markup}}
665686
666687This is \emph{emphasized}, and so \emph{is this}.
667688
@@ -693,7 +714,8 @@ spaces: a\^{}b c\^{}d, a\textasciitilde{}b c\textasciitilde{}d.
693714
694715\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
695716
696−\section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes}
717+\hypertarget{smart-quotes-ellipses-dashes}{%
718+\section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes}}
697719
698720``Hello,'' said the spider. ``\,`Shelob' is my name.''
699721
@@ -714,7 +736,8 @@ Ellipses\ldots{}and\ldots{}and\ldots{}.
714736
715737\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
716738
717−\section{LaTeX}\label{latex}
739+\hypertarget{latex}{%
740+\section{LaTeX}\label{latex}}
718741
719742\begin{itemize}
720743\tightlist
@@ -762,7 +785,8 @@ Cat & 1 \\ \hline
762785
763786\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
764787
765−\section{Special Characters}\label{special-characters}
788+\hypertarget{special-characters}{%
789+\section{Special Characters}\label{special-characters}}
766790
767791Here is some unicode:
768792
@@ -824,9 +848,11 @@ Minus: -
824848
825849\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
826850
827−\section{Links}\label{links}
851+\hypertarget{links}{%
852+\section{Links}\label{links}}
828853
829−\subsection{Explicit}\label{explicit}
854+\hypertarget{explicit}{%
855+\subsection{Explicit}\label{explicit}}
830856
831857Just a \href{/url/}{URL}.
832858
@@ -846,7 +872,8 @@ Just a \href{/url/}{URL}.
846872
847873\href{}{Empty}.
848874
849−\subsection{Reference}\label{reference}
875+\hypertarget{reference}{%
876+\subsection{Reference}\label{reference}}
850877
851878Foo \href{/url/}{bar}.
852879
@@ -874,7 +901,8 @@ Foo \href{/url/}{bar}.
874901
875902Foo \href{/url/}{biz}.
876903
877−\subsection{With ampersands}\label{with-ampersands}
904+\hypertarget{with-ampersands}{%
905+\subsection{With ampersands}\label{with-ampersands}}
878906
879907Here's a \href{http://example.com/?foo=1\&bar=2}{link with an ampersand in the
880908URL}.
@@ -886,7 +914,8 @@ Here's an \href{/script?foo=1\&bar=2}{inline link}.
886914
887915Here's an \href{/script?foo=1\&bar=2}{inline link in pointy braces}.
888916
889−\subsection{Autolinks}\label{autolinks}
917+\hypertarget{autolinks}{%
918+\subsection{Autolinks}\label{autolinks}}
890919
891920With an ampersand: \url{http://example.com/?foo=1\&bar=2}
892921
@@ -916,7 +945,8 @@ or here: <http://example.com/>
916945
917946\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
918947
919−\section{Images}\label{images}
948+\hypertarget{images}{%
949+\section{Images}\label{images}}
920950
921951From ``Voyage dans la Lune'' by Georges Melies (1902):
922952
@@ -930,7 +960,8 @@ Here is a movie \includegraphics{movie.jpg} icon.
930960
931961\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
932962
933−\section{Footnotes}\label{footnotes}
963+\hypertarget{footnotes}{%
964+\section{Footnotes}\label{footnotes}}
934965
935966Here is a footnote reference,\footnote{Here is the footnote. It can go
936967 anywhere after the footnote reference. It need not be placed at the end of