# strange behaviour with glossaries see key

I have been baffled by exactly how to use the see key of the glossaries package.

Section 8 of the manual writes:

Note that in this case, the entry with the see key will automatically be added to the glossary, but the cross-referenced entry won’t.

Contrary to what the manual says, specifying a see key does not add the automatically add the entry to the glossaries as my MWE shows. I got one of the entry to show up by using \glssee within the description key, but it fails to generate the text see also. I can manually write the cross-reference within the description key, but I am curious as to why the see key doesn't seem to do what the manual says. What gives?

\usepackage[notree,shortcuts]{glossaries}

\newglossaryentry{Blackbox}
{
name=Blackbox models,
sort=blackbox,
description={--- In system identification, the term \emph{blackbox} modelling refers to the process of modelling a system through non-parametric techniques, without knowledge of physical inner workings of the system, resulting in an \emph{empirical} model}
}
\newglossaryentry{Whitebox}
{
name=Whitebox models,
sort=whitebox,
description={--- In system identification, the term \emph{whitebox} modelling refers to the process of modelling a system through first principles, laws of physics and explicit assumed relationships between the input and output through prior knowledge of the system, resulting in a \emph{mechanistic} model}
}
\newglossaryentry{Mechanistic}
{
name=Mechanistic models,
sort=mechanistic,
description={},
nonumberlist
}
\newglossaryentry{Empirical}
{
name=Empirical models,
sort=empirical,
nonumberlist
}
\makeglossaries

\begin{document}
Something about \gls{Blackbox} and \gls{Whitebox}
\newpage
\printglossary[title={Glossaries}]
\end{document}


-

1. To make a cross-referencing item appear even without citing it, it needs a chance to be written to the glossary, so put \makeglossaries before the entry definition.

2. The \glssee is to be used outside of the actual definitions. The following works:

\documentclass{article}

\usepackage[notree,shortcuts]{glossaries}
\makeglossaries         %% Put that here, so entries can be written to the glossary

\newglossaryentry{Blackbox}
{
name=Blackbox models,
sort=blackbox,
description={--- In system identification, the term \emph{blackbox} modelling refers to the process of modelling a system through non-parametric techniques, without knowledge of physical inner workings of the system, resulting in an \emph{empirical} model}
}
\newglossaryentry{Empirical}
{
name=Empirical models,
sort=empirical,
description={Empirical descr},
nonumberlist
}

%\glssee[see also]{Empirical}{Blackbox} %% We need that to include Empirical when just citing Blackbox; or use the 'see' key in Empirical; put it after \makeglossaries and the entry definitions

\begin{document}

\newpage
\printglossary[title={Glossaries}]
\end{document}


In this case, both Empirical and Blackbox show up. Alternatively, use the \glssee instead of the see key in Empirical.

-
Sorry I don't see how I read it wrong: "Note that in this case, the entry with the see key will automatically be added to the glossary, but the cross-referenced entry won’t" In my case, the entry with the see key is Empirical, the cross-referenced entry is blackbox. The former, as the wording suggest, should be added to the glossaries automatically. If I did not cite \gls{blackbox}, then the wording would suggest blackbox won't be added to the glossaries, since blackbox is the cross-referenced entry. This I haven't tried –  Mobius Pizza Dec 27 '12 at 12:24
Are you suggeesting "see" key does not function when nonumberlist is used? I thought it would print the description for Empirical as "See also blackbox" and give a hyperlink (if hyperref is loaded) to the glossary entry of blackbox. In another words, where is the see also text and how to bring it up? –  Mobius Pizza Dec 27 '12 at 12:28
@MobiusPizza I misread your problem, and updated my answer. –  mafp Dec 27 '12 at 14:53
Thanks. When I compiled your answer, I still don't see any automatically added text of "see also"? Do I have to add it manually to description of Empirical? If so, what is the point of the optional argument [see also]? –  Mobius Pizza Dec 28 '12 at 0:13
@MobiusPizza To see the "see also" part in Empirical, the Empirical entry needs nonumberlist=false, or just no entry of nonumberlist. Then you get a reference to Blackbox, even hyperlinked when using hyperref. –  mafp Dec 28 '12 at 0:26