指向清單中條目的書籤

指向清單中條目的書籤

考慮以下包含問題的範例:

\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}

相關內容