0

TLDR; Assume glossary entries with B-[see]-A, and C-[see]-B, when B is referenced in text the glossary shows C and B (!?). How can I make the glossary show A and B and not C?

It seems that the cross reference engine loops in cross-reference dependencies using [see] and [seealso] in an inverted manner. I have found no documentation on this particular situation. With the example above I would assume the glossary to show B and A, i.e. the term I referenced and the terms referenced by the term I referenced. Rather than terms referencing the terms I referenced (read slowly :-) ).

My actual case is that I use a very very large glossary, which I intentionally built up with [see] and [seealso] going in the direction towards the most general term (my intention was that a pub science text which only referenced the most general terms would not automagically copy in all the more advanced terms and concepts).

See below example, which illustrated that cross-references seem to "go the wrong way" (in my opinion, i reference from higher to lower number, and have some references between "concepts"), by showing

  • l2 (referenced in text)
  • l3 (not referenced at all, but references l2 by cross-ref [see])
  • o2 (referenced directly by l2)
  • o3 (not referenced at all, references o2 by cross-ref [seealso])

I would like to show:

  • l2 (referenced in text)
  • l1 (referenced by l2 by cross-ref [see])
  • o2 (referenced directly by l2)
  • o1 (referenced by o2 by cross-ref [seealso])

Note that m2 does not show, and seems to behave as I would expect it to (m2 references l2 via \gls in the description, I would assume that \gls in description behaves as [see]).

MWE: (using hyperref with colorlinks to show the confusion created by having a link with no proper visible target)

\documentclass[a4paper]{article}

\usepackage[colorlinks]{hyperref}
\usepackage[automake]{glossaries-extra}

\makeglossaries{}

\newglossaryentry{l1}
{
        name=level1,
        description={Level 1}
}
\newglossaryentry{l2}
{
        name=level2,
        description={Level 2, not like \gls{o2} at all.},
        see={l1}
}
\newglossaryentry{l3}
{
        name=level3,
        description={Level 3},
        see={l2}
}
\newglossaryentry{o1}
{
        name=other1,
        description={Other 1}
}
\newglossaryentry{o2}
{
        name=other2,
        description={Other 2},
        seealso={o1}
}
\newglossaryentry{o3}
{
        name=other3,
        description={Other 3},
        see={o2}
}
\newglossaryentry{m2}
{
        name=m2,
        description={M2, see \gls{l2}}
}

\begin{document}
  I reference \gls{l2}, but none of the others directly in the text.

  \printglossaries

\end{document}

example image

(Tested glossaries 2019/01/06 v4.42 and glossaries 2020/03/19)

1 Answer 1

0

According to @NicolaTalbot (see https://www.dickimaw-books.com/bugtracker.php?action=view&key=163) the issue in documented and known for non bib2gls-usage.

I.e., the solution is to switch to using .bib files for glossaries.

The easiest way to to this is to use the provided convertgls2bib-script.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .