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.

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={},
  see=[see also]{Whitebox},
  nonumberlist
}
\newglossaryentry{Empirical}
{
  name=Empirical models,
  sort=empirical,
  description={\glssee[see also]{Empirical}{Blackbox}},
  see=[see also]{Blackbox},
  nonumberlist
}
\makeglossaries

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

enter image description here

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted
  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},
      see=[see also]{Blackbox},
      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}
    
    Something about \gls{Blackbox}
    
    
    \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.

share|improve this answer
    
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
1  
@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
add comment

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.