Etiqueta Hyperref aparecendo no índice do visualizador de PDF

Etiqueta Hyperref aparecendo no índice do visualizador de PDF

Estou tendo um problema com o hyperref e os rótulos das minhas seções aparecem no índice do meu visualizador de PDF. O documento em si parece bom, mas (por exemplo) quando olho o índice, verei [1.1a] antes do título da seção para os problemas 1.1 e [1.1q] antes do título da seção para as respostas 1.1. Basicamente, quero que os alunos possam clicar no título da seção para pular para as respostas dessa seção e, da mesma forma, clicar no título da seção na seção de respostas para voltar aos problemas.

Estou pesquisando no Google há um bom tempo, mas simplesmente não sei o suficiente sobre hiperref para formular minha pesquisa corretamente. Encontrei algo semelhante, mas tinha a ver com o índice real do LaTeX, que não quero no meu documento. Qualquer ajuda com isso seria muito apreciado! MWE abaixo.

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

Responder1

insira a descrição da imagem aqui

insira a descrição da imagem aqui

Usar os argumentos opcionais \subsubsectionsignifica que o sumário (e, portanto, os marcadores) pode conter qualquer texto que você desejar e remove o hiperlink:

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

Você também pode criar um comando anexado \subsubsectionna forma de:

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

com o qual você pode ligar:

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

para eliminar muitos problemas de ter \subsubsectioncomandos longos.

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

informação relacionada