Etiqueta Hyperref que aparece en la tabla de contenido del visor de PDF

Etiqueta Hyperref que aparece en la tabla de contenido del visor de PDF

Tengo un problema con la hiperreferencia y las etiquetas de mis secciones aparecen en la tabla de contenido de mi visor de PDF. El documento en sí se ve bien, pero (por ejemplo) cuando miro la tabla de contenido veré [1.1a] antes del título de la sección para los problemas 1.1 y [1.1q] antes del título de la sección para las respuestas 1.1. Básicamente, quiero que los estudiantes puedan hacer clic en el título de la sección para saltar a las respuestas de esa sección y, de manera similar, hacer clic en el título de la sección en la sección de respuestas para regresar a los problemas.

He estado buscando en Google durante bastante tiempo, pero no sé lo suficiente sobre hyperref para siquiera formular mi búsqueda correctamente. Encontré algo similar, pero tenía que ver con la tabla de contenidos de LaTeX real, que no quiero en mi documento. ¡Cualquier ayuda con esto será muy apreciada! MWE a continuación.

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

Respuesta1

ingrese la descripción de la imagen aquí

ingrese la descripción de la imagen aquí

Usar los argumentos opcionales \subsubsectionsignifica que el TOC (y por lo tanto los marcadores) puede tener cualquier texto que desee y elimina el hipervínculo:

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

También puede crear un comando que se adjunte \subsubsectiona lo largo del formulario:

\newcommand\mysubsubsection[2]{\subsubsection[#1]{\hyperref[#2]{#1}}}

que luego puedes llamar con:

\mysubsubsection{\S 1.1 Real Numbers and the Rectangular Coordinate System}{1.1a}

para eliminar demasiadas molestias al tener que tener \subsubsectioncomandos largos.

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

información relacionada