# Some glossary (acronym) entries without location (but still with links)

In my master thesis, I have a lots of acronyms. Some of them I use very frequently, while others just once or twice. Some of them I have a "main" definition, most don't have one. (Main definition is \gls[format=hyperbf, counter=subsection]{ACRO}).

So far, for each entry, the location list is the list of all pages where it appears (italic) plus a list of the subsections where it's main definition appears (bold). Everytime, all acronyms in the text have hyperlinks.

What I would like is to get rid of the pages in the location list, but not the "main" definition, but still keep the hyperlinks.

So is it possible to have a command that adds nothing to the location list (like \glsentrytext, NOT like \gls) but still has an hyperlink (NOT like \glsentrytext, like \gls)?

Or, in other words, is there a command that behaves exactly like \gls{ACRO} but that does not add any location (page, section, ...) to the list of location of the ACRO entry?

# * Edit 1:

As said in glossaries-user.pdf and glossaries.pdf, I tried to add in the preamble:

\renewcommand{\glshyperlink}[2][\glsentryname{\@glo@label}]{%
\def\@glo@label{#2}%


With the intention to test it first as is, and then replace \glsentryname with \gls. However, I get this error:

! Use of \@ doesn't match its definition.
of this equation is the definition of th...

? h
If you say, e.g., \def\a1{...}', then you must always
put 1' after \a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.

?


Any Idea?

# * MWE:

I'd like to have exactly the same but with no page numbers in the list of acronyms (only the subsection references).

% If file save under 'mwe.tex', then compile it:

% pdflatex mwe
% makeglossarie mwe
% pdflatex mwe
% makeglossarie mwe
% pdflatex mwe
% pdflatex mwe

\documentclass[pdftex, letterpaper, 12pt, ]{article}

\makeglossaries

\renewcommand*{\pagelistname}{Location \\ }
\renewcommand*{\glsnumberformat}[1]{\textit{#1}}

\newacronym{rhs}{rhs}{right hand side}
\newacronym{lhs}{lhs}{left hand side}
\newacronym{RMS}{RMS}{Root-Mean-Square}
\newacronym{ESA}{ESA}{European Space Agency}

\begin{document}

\section{Test}

\subsection{Blah}
here on the \gls{rhs} of this equation is the definition of the \gls[format=hyperbf, counter=subsection]{RMS}) that is given by the \gls*{ESA}.

\subsection{One more time}
here on the \gls{rhs} of this equation is the definition of the \gls[format=hyperbf, counter=subsection]{RMS}) that is given by the \gls*{ESA}.

\end{document}


# * PDF File produced:

-
Put the three lines you added between \makeatletter and \makeatother –  egreg Feb 12 '12 at 10:02

Ok, after the idea from Holle, and some digging in both glossaries-user.pdf and glossaries.pdf, plus some LaTeX error googling, here is the solution, that works really nicely:

\makeatletter
\def\@glo@label{#2}%
\makeatother


And you're good to go :)

(Edit: it obviously screws a bit things up if you have the [hyperfirst=false] option)

-
Just have a look to the \glshyperlink` command. It creates a link to the glossary but without putting any information to this. See 'glossaries-user.pdf' at page 59.