
나는 좀 화려하게 보이려고 노력 중이야.두문자어패키지. 나는 여러 개의 약어를 정의했고(아래 예를 덤프합니다) 내 텍스트에서 약어 정의에 대한 링크를 만들고 싶지만 전체가 아닌 약어의 첫 글자에 대한 링크를 만들고 싶습니다.
그래서 내 약어는 "S-wave"이고 "S"를 쓰고 이를 약어에 연결하는 방법을 찾고 싶습니다.
\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}
답변1
hyperref
다음을 사용할 수 있습니다 \hyperlink{link target}{link text}
.
\hyperlink{swave}{S}
약간의 이점은 acronym
의 내부 매크로를 사용하는 것입니다 \AC@hyperlink{link target}{link text}
. hyperref
로드되지 않은 경우 오류가 발생한다는 작은 이점이 있습니다 .
그때 필요한 것은 적절한 포장지뿐입니다.
\makeatletter
\newcommand*\aclink{\AC@hyperlink}
\makeatother
전체 코드:
\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}