指向列表中条目的书签

指向列表中条目的书签

考虑以下包含该问题的例子:

\documentclass{article}

\usepackage{enumitem}
\usepackage{bookmark}
\usepackage{hyperref}

\begin{document}

\section{The first section}
A list of entries where different bookmarks point to each entry.
\begin{enumerate}
  \item Bookmark~$1$ has to point at this entry in the list and be
        of `subsection' depth under the first section in the bookmark tree.
  \item Bookmark~$2$ has to point at this entry in the list and be
        of `subsection' depth under the first section in the bookmark tree.
  \item \dots
\end{enumerate}

\end{document}

我该如何实现这个目标?(如果问题不清楚,请告诉我。)

答案1

\documentclass{article}

\usepackage{enumitem}
\usepackage{bookmark}
\usepackage{hyperref}

\begin{document}

\section{The first section}
A list of entries where different bookmarks point to each entry.
\begin{enumerate}
  \item \bookmark[dest=\csname @currentHref\endcsname]{to item 1}Bookmark~$1$ has to point at this entry in the list and be
        of `subsection' depth under the first section in the bookmark tree.
  \item \bookmark[dest=\csname @currentHref\endcsname]{to item 2}Bookmark~$2$ has to point at this entry in the list and be
        of `subsection' depth under the first section in the bookmark tree.
  \item \dots
\end{enumerate}

\end{document}

相关内容