\glsentryfull with link

\glsentryfull with link

I have the following code:

\documentclass{article}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}

\newacronym{T}{T}{Test}

\begin{document}
    \gls{T}

    \gls{T}

    \glsentryfull{T}
\end{document}

Which gives the following output:

enter image description here

In my actual text, a government agency is mentioned early in the text (so its name and acronym are shown), but then I later have a description of various agencies, and want that agency's name and acronym to appear again, even though the acronym has already been defined. So I've used \glsentryfull{}. However, I'd like this to be hyperref'ed as well.

Is there a way to make \glsentryfull{T} also generate a link, preferably so as to look identical to the first \gls? Use of glossaries-extra is perfectly fine.

답변1

With just the base glossaries package use \acrfull:

\documentclass{article}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}

\newacronym{T}{T}{Test}

\begin{document}
    \gls{T}

    \gls{T}

    \acrfull{T}
\end{document}

Test (T) T Test (T)

Note there's a minor difference if you use \setacronymstyle:

\documentclass{article}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}

\setacronymstyle{long-short}
\newacronym{T}{T}{Test}

\begin{document}
    \gls{T}

    \gls{T}

    \acrfull{T}
\end{document}

Test (T) T Test (T)

In the first case \acrfull has two hyperlinks and in the second it only has one.

With glossaries-extra use \glsxtrfull:

\documentclass{article}
\usepackage{hyperref}
\usepackage[acronym]{glossaries-extra}

\setabbreviationstyle[acronym]{long-short}
\newacronym{T}{T}{Test}

\begin{document}
    \gls{T}

    \gls{T}

    \glsxtrfull{T}
\end{document}

This has the same result as the second case.

Test (T) T Test (T)

관련 정보