
Estou tentando ser um pouco sofisticado com oacrônimopacote. Tenho várias siglas definidas (deixo um exemplo abaixo) e gostaria de fazer um link para a definição da sigla do meu texto, mas para a primeira letra da sigla e não para a coisa toda.
Então, minha sigla é "S-wave" e gostaria de encontrar uma maneira de escrever "S" e vinculá-lo à sigla.
\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}
Responder1
Você pode usar hyperref
:\hyperlink{link target}{link text}
\hyperlink{swave}{S}
Um pequeno benefício é usar acronym
a macro interna do \AC@hyperlink{link target}{link text}
. Isso tem o pequeno benefício que dá erro se hyperref
não for carregado.
A única coisa que você precisa é de um invólucro adequado
\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}