
Estoy tratando de ser un poco elegante con elacrónimopaquete. Tengo varios acrónimos definidos (dejo un ejemplo a continuación) y me gustaría hacer un enlace a la definición del acrónimo de mi texto, pero para la primera letra del acrónimo en lugar de todo.
Entonces mi acrónimo es "S-wave" y me gustaría encontrar alguna manera de escribir "S" y vincularlo al acrónimo.
\documentclass{article}
\usepackage{hyperref}
\usepackage{acronym}
\usepackage{lipsum}
\begin{document}
\acused{swave}\acused{pwave}\acused{dwave} % mark as used for this example
I'd like to have the `S' linked to the entry for the acronym `S-wave' in the following sentence.
The system comprises of both S- and \ac{pwave} components. By contrast, the \ac{dwave} contribution is negligible.
\lipsum[3]
\section*{List of acronyms}
\begin{acronym}
\acro{swave}[S-wave]{the $K\pi$ system in a scalar, $J=0$ state}
\acro{pwave}[P-wave]{the $K\pi$ system in a vector, $J=1$ state}
\acro{dwave}[D-wave}{the $K\pi$ system in a tensor, $J=2$ state}
\end{acronym}
\end{document}
Respuesta1
Puedes usar hyperref
's \hyperlink{link target}{link text}
:
\hyperlink{swave}{S}
Un pequeño beneficio es utilizar acronym
la macro interna \AC@hyperlink{link target}{link text}
. Esto tiene el pequeño beneficio de que da error si hyperref
no se carga.
Entonces lo único que necesitas es un envoltorio adecuado.
\makeatletter
\newcommand*\aclink{\AC@hyperlink}
\makeatother
Código completo:
\documentclass{article}
\usepackage{hyperref}
\usepackage{acronym}
\usepackage{lipsum}
\makeatletter
\newcommand*\aclink{\AC@hyperlink}
\makeatother
\begin{document}
\acused{swave}\acused{pwave}\acused{dwave} % mark as used for this example
I'd like to have the `S' linked to the entry for the acronym `S-wave' in the
following sentence.
The system comprises of both \aclink{swave}{S}- and \ac{pwave}
components. By contrast, the \ac{dwave} contribution is negligible.
% or:
The system comprises of both \hyperlink{swave}{S}- and \ac{pwave}
components. By contrast, the \ac{dwave} contribution is negligible.
\lipsum[3]
\section*{List of acronyms}
\begin{acronym}
\acro{swave}[S-wave]{the $K\pi$ system in a scalar, $J=0$ state}
\acro{pwave}[P-wave]{the $K\pi$ system in a vector, $J=1$ state}
\acro{dwave}[D-wave]{the $K\pi$ system in a tensor, $J=2$ state}
\end{acronym}
\newpage\null % add an empty page so we can see the links go to the right place
\end{document}