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.

The weirdest thing happened to me today:

I was looking for a way to link from an abbreviation to a glossary entry and found this answer. When emulating it in my code, it did not work - pdflatex would ignore the see attribute.

Fiddling around, I discovered that this only happens when the glossaries package is included with the nonumberlist attribute - something that should have no influence whatsoever on links.

Minimal code example:

\documentclass{article}
\usepackage{hyperref}

\usepackage[nonumberlist, acronym]{glossaries}

\makeglossaries

%%% define the acronym and use the see= option
\newglossaryentry{css}{type=\acronymtype, name={CSS}, description={Cascading Style Sheets}, first={Cascading Style Sheets (CSS)}, see=[Glossary:]{cssg}}
\newglossaryentry{cssg}{name={Cascading Style Sheets},
                     description={A language for specifying presentation      attributed of XML documents.}}

\begin{document}

\glsaddall

% Acronyms
\printglossary[type=\acronymtype]

% Glossary
\printglossary[style=altlist,title=Glossary]

\end{document}

How can I fix this? And why is this even happening?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

This is documented behaviour. Quoting from the manual:

nonumberlist This option will suppress the associated number lists in the glossaries (see also Section 5).

seeautonumberlist If you suppress the number lists with nonumberlist, described above, this will also suppress any cross-referencing information supplied by the see key in \newglossaryentry or \glssee. If you use seeautonumberlist, the see key will automatically implement nonumberlist=false for that entry. (Note this doesn’t affect \glssee.) For further details see Section 8.

So a possible solution is to also set seeautonumberlist. This may have the undesired effect that the acronym entry now gets the page number that you wanted to avoid with nonumberlist in the first place:

% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
\documentclass{article}
\usepackage{hyperref}

\usepackage[nonumberlist,seeautonumberlist,acronym]{glossaries}

\makeglossaries

%%% define the acronym and use the see= option
\newglossaryentry{css}{
  type=\acronymtype,
  name={CSS},
  description={Cascading Style Sheets},
  first={Cascading Style Sheets (CSS)},
  see=[Glossary:]{cssg}
}
\newglossaryentry{cssg}{
  name={Cascading Style Sheets},
  description={A language for specifying presentation attributed of XML documents}
}

\begin{document}

\glsaddall

% Acronyms
\printglossary[type=\acronymtype]

% Glossary
\printglossary[style=altlist,title=Glossary]

\end{document}

An alternative is to add the reference manually to the description of the acronym. This way you also don't get the page number in the acronym entry:

% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
\documentclass{article}
\usepackage{hyperref}

\usepackage[nonumberlist,acronym]{glossaries}

\makeglossaries

%%% define the acronym
\newglossaryentry{css}{
  type=\acronymtype,
  name={CSS},
  description={Cascading Style Sheets. \textit{Glossary:} \gls{cssg}},
  first={Cascading Style Sheets (CSS)}
}
\newglossaryentry{cssg}{
  name={Cascading Style Sheets},
  description={A language for specifying presentation attributed of XML documents}
}

\begin{document}

\glsaddall

% Acronyms
\printglossary[type=\acronymtype]

% Glossary
\printglossary[style=altlist,title=Glossary]

\end{document}
share|improve this answer

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.