![PDF 뷰어의 목차에 나타나는 Hyperref 레이블](https://rvso.com/image/461905/PDF%20%EB%B7%B0%EC%96%B4%EC%9D%98%20%EB%AA%A9%EC%B0%A8%EC%97%90%20%EB%82%98%ED%83%80%EB%82%98%EB%8A%94%20Hyperref%20%EB%A0%88%EC%9D%B4%EB%B8%94.png)
하이퍼참조에 문제가 있고 PDF 뷰어의 목차에 섹션 레이블이 표시되는 문제가 있습니다. 문서 자체는 괜찮아 보이지만 (예를 들어) 목차를 보면 1.1 문제의 경우 섹션 제목 앞에 [1.1a]가 표시되고 1.1 답변의 경우 섹션 제목 앞에 [1.1q]가 표시됩니다. 기본적으로 저는 학생들이 섹션 제목을 클릭하여 해당 섹션의 답변으로 이동할 수 있고, 마찬가지로 답변 섹션의 섹션 제목을 클릭하여 문제로 돌아갈 수 있기를 바랍니다.
나는 오랫동안 인터넷 검색을 해왔지만 검색을 올바르게 공식화할 만큼 하이퍼참조에 대해 충분히 알지 못합니다. 비슷한 것을 찾았지만 실제 LaTeX 목차와 관련이 있었기 때문에 내 문서에서는 원하지 않았습니다. 이에 대한 도움을 주시면 대단히 감사하겠습니다! 아래 MWE.
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage[hidelinks]{hyperref}
\setcounter{secnumdepth}{0}
\begin{document}
\subsubsection{\hyperref[1.1a]{\S 1.1 Real Numbers and the Rectangular Coordinate System}}
\label{1.1q}
\begin{enumerate}
\item Find the distance between the points $P_1=(3,-4)$ and $P_2=(5,4)$.
\item Find the midpoint of the line segment joining the points $P_1=(3,-4)$ and $P_2=(5,4)$.
\end{enumerate}
\newpage
\subsubsection{\hyperref[1.1q]{\S 1.1 Real Numbers and the Rectangular Coordinate System}}
\label{1.1a}
\begin{enumerate}
\item $\text{Distance} = 2\sqrt{17}$
\item Midpoint: $(4,0)$
\end{enumerate}
\end{document}
답변1
선택적 인수를 사용하면 \subsubsection
목차(및 책갈피)에 원하는 텍스트가 무엇이든 포함될 수 있고 하이퍼링크가 제거된다는 의미입니다.
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage[hidelinks]{hyperref}
\setcounter{secnumdepth}{0}
\begin{document}
\subsubsection[\S 1.1 Real Numbers and the Rectangular Coordinate System]{\hyperref[1.1a]{\S 1.1 Real Numbers and the Rectangular Coordinate System}}
\label{1.1q}
\begin{enumerate}
\item Find the distance between the points $P_1=(3,-4)$ and $P_2=(5,4)$.
\item Find the midpoint of the line segment joining the points $P_1=(3,-4)$ and $P_2=(5,4)$.
\end{enumerate}
\newpage
\subsubsection[{\S 1.1 Real Numbers and the Rectangular Coordinate System}]{\hyperref[1.1q]{\S 1.1 Real Numbers and the Rectangular Coordinate System}}
\label{1.1a}
\begin{enumerate}
\item $\text{Distance} = 2\sqrt{17}$
\item Midpoint: $(4,0)$
\end{enumerate}
\end{document}
\subsubsection
다음과 같은 형식으로 연결되는 명령을 생성할 수도 있습니다 .
\newcommand\mysubsubsection[2]{\subsubsection[#1]{\hyperref[#2]{#1}}}
그런 다음 다음을 사용하여 전화할 수 있습니다.
\mysubsubsection{\S 1.1 Real Numbers and the Rectangular Coordinate System}{1.1a}
긴 명령을 입력해야 하는 번거로움을 없애기 위해 \subsubsection
.
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage[hidelinks]{hyperref}
\setcounter{secnumdepth}{0}
\newcommand\mysubsubsection[2]{\subsubsection[#1]{\hyperref[#2]{#1}}}
\begin{document}
\mysubsubsection{\S 1.1 Real Numbers and the Rectangular Coordinate System}{1.1a}
\label{1.1q}
\begin{enumerate}
\item Find the distance between the points $P_1=(3,-4)$ and $P_2=(5,4)$.
\item Find the midpoint of the line segment joining the points $P_1=(3,-4)$ and $P_2=(5,4)$.
\end{enumerate}
\newpage
\mysubsubsection{\S 1.1 Real Numbers and the Rectangular Coordinate System}{1.1q}
\label{1.1a}
\begin{enumerate}
\item $\text{Distance} = 2\sqrt{17}$
\item Midpoint: $(4,0)$
\end{enumerate}
\end{document}