Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}%
\@glslink{glo:#2}{#1}}

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.
\\glshyperlink [#1]#2->\def \@glo@label{#2}\@gls
                                                link{glo:#2}{#1}
l.37 here on the \glshyperlink{rhs}
                                    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}

\usepackage[pdftex, breaklinks=true, ]{hyperref}
\usepackage[acronym, style=super3colheader, counter=page, hyperfirst=true, ]{glossaries} 
\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}

\glsaddall

\printglossary[type=\acronymtype, style=long3colheader, numberedsection=false, nonumberlist=false, ]

\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:

PDF File produced

share|improve this question
    
Put the three lines you added between \makeatletter and \makeatother –  egreg Feb 12 '12 at 10:02

2 Answers 2

up vote 3 down vote accepted

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:

In you preamble, add:

\makeatletter
\renewcommand*{\glshyperlink}[2][\gls{\@glo@label}]{%
\def\@glo@label{#2}%
\@glslink{glo:#2}{#1}}
\makeatother

And you're good to go :)

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

share|improve this answer

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.

share|improve this answer
    
Thank you so much. –  Christophe Feb 12 '12 at 9:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.