diff options
| author | John MacFarlane <[email protected]> | 2023-08-19 09:52:01 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2023-08-19 09:52:01 -0700 |
| commit | 70329edcd7afb7b3f8f015b13ab2e734c9e31d05 (patch) | |
| tree | 34c8363de72e10ae737681f4cdbdb3f25b5f4a97 /test/command | |
| parent | 068fce4293eb139f54d4825e1dbdcaf35e34da03 (diff) | |
LaTeX writer: improve internal links and targets.
We no longer wrap section headings in a `\hypertarget`.
This is unnecessary (hyperref creates an anchor based on the
label) and it interferes with tagging.
In addition, we now use `\hyperref` rather than `\hyperlink`
for internal links.
Currently `\hypertarget` is still being used for link anchors
not on headings.
Closes #8744. Thanks to @u-fischer.
Diffstat (limited to 'test/command')
| -rw-r--r-- | test/command/1762.md | 9 | ||||
| -rw-r--r-- | test/command/5574.md | 3 | ||||
| -rw-r--r-- | test/command/6030.md | 6 | ||||
| -rw-r--r-- | test/command/6033.md | 15 | ||||
| -rw-r--r-- | test/command/6107.md | 3 | ||||
| -rw-r--r-- | test/command/6360.md | 2 | ||||
| -rw-r--r-- | test/command/7857.md | 3 |
7 files changed, 14 insertions, 27 deletions
diff --git a/test/command/1762.md b/test/command/1762.md index c0c34dc24..b35b209aa 100644 --- a/test/command/1762.md +++ b/test/command/1762.md @@ -6,13 +6,10 @@ # Three {.unlisted .unnumbered} ^D -\hypertarget{one}{% -\section{One}\label{one}} +\section{One}\label{one} -\hypertarget{two}{% -\section*{Two}\label{two}} +\section*{Two}\label{two} \addcontentsline{toc}{section}{Two} -\hypertarget{three}{% -\section*{Three}\label{three}} +\section*{Three}\label{three} ``` diff --git a/test/command/5574.md b/test/command/5574.md index 441b3afd6..4d4c4ec08 100644 --- a/test/command/5574.md +++ b/test/command/5574.md @@ -3,6 +3,5 @@ No highlighting inside heading: % pandoc -t latex # `foo`{.cpp} ^D -\hypertarget{foo}{% -\section{\texorpdfstring{\texttt{foo}}{foo}}\label{foo}} +\section{\texorpdfstring{\texttt{foo}}{foo}}\label{foo} ``` diff --git a/test/command/6030.md b/test/command/6030.md index e05bf6e7f..0801f9173 100644 --- a/test/command/6030.md +++ b/test/command/6030.md @@ -70,15 +70,13 @@ Three Four ^D -\hypertarget{one}{% -\section{One}\label{one}} +\section{One}\label{one} \begin{frame}{One} One \end{frame} -\hypertarget{two}{% -\subsection{Two}\label{two}} +\subsection{Two}\label{two} \begin{frame}{Two} Two diff --git a/test/command/6033.md b/test/command/6033.md index f831daa49..cc1b212bf 100644 --- a/test/command/6033.md +++ b/test/command/6033.md @@ -32,11 +32,9 @@ - More text. ^D -\hypertarget{one}{% -\section{One}\label{one}} +\section{One}\label{one} -\hypertarget{one-a}{% -\subsection{One-A}\label{one-a}} +\subsection{One-A}\label{one-a} \begin{frame}{One-A} \begin{columns}[T] @@ -64,8 +62,7 @@ \end{itemize} \end{frame} -\hypertarget{one-b}{% -\subsection{One-B}\label{one-b}} +\subsection{One-B}\label{one-b} \begin{frame}{One-B} \begin{itemize} @@ -75,11 +72,9 @@ \end{itemize} \end{frame} -\hypertarget{two}{% -\section{Two}\label{two}} +\section{Two}\label{two} -\hypertarget{two-a}{% -\subsection{Two-A}\label{two-a}} +\subsection{Two-A}\label{two-a} \begin{frame}{Two-A} \begin{itemize} diff --git a/test/command/6107.md b/test/command/6107.md index 8444172ab..2f9d3353c 100644 --- a/test/command/6107.md +++ b/test/command/6107.md @@ -13,8 +13,7 @@ Not much to do about nothing. ## Epilogue {.standout} ^D -\hypertarget{a-circus}{% -\section{A circus!}\label{a-circus}} +\section{A circus!}\label{a-circus} \begin{frame}{Another silly title} \protect\hypertarget{another-silly-title}{} diff --git a/test/command/6360.md b/test/command/6360.md index 3988710bf..794307a83 100644 --- a/test/command/6360.md +++ b/test/command/6360.md @@ -2,5 +2,5 @@ % pandoc -f native -t latex --wrap=none [Link ("test2",[],[]) [Str "link",Space,Str "to",Space,Str "text",Space,Str "test1"] ("#test1","")] ^D -\protect\hypertarget{test2}{\protect\hyperlink{test1}{link to text test1}} +\protect\hypertarget{test2}{\hyperref[test1]{link to text test1}} ``` diff --git a/test/command/7857.md b/test/command/7857.md index 9a4968e88..9fc128b5d 100644 --- a/test/command/7857.md +++ b/test/command/7857.md @@ -10,8 +10,7 @@ my note ok ^D -\hypertarget{section}{% -\section{section}\label{section}} +\section{section}\label{section} \note{my note} |
