Bug Tracker

ID:163 🔗
Status:Closed (Not a Bug)
Category:glossaries
Version:4.43
Date:2020-06-23 09:21:26
Summary:Inverted crossref (see and seealso) behavior

Report

It seems cross-references (i.e. "see" and "seealso" attributes of glossaryentries) are inverted (relative behavior of \gls) when building the glossary. Example: These glossary entries exist and are referencing each other in the following way: Output in glossary: Expected output in glossary: See fuller description at [TeX.SX Link]

MWE

\documentclass[a4paper]{article}

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

\makeglossaries{}

\newglossaryentry{item1see}
{
        name=item1see,
        description={Item 1 see}
}
\newglossaryentry{item1seealso}
{
        name=item1seealso,
        description={Item 1 seealso}
}
\newglossaryentry{item1gls}
{
        name=item1gls,
        description={Item 1 gls}
}
\newglossaryentry{item2}
{
        name=item2,
        description={Item2 2, not like \gls{item1gls} at all.},
        see={item1see},
        seealso={item1seealso}
}
\newglossaryentry{item3see}
{
        name=item3see,
        description={Item 3 see},
        see={item2}
}
\newglossaryentry{item3seealso}
{
        name=item3seealso,
        description={Item 3 seealso},
        seealso={item2}
}

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

  \printglossaries

\end{document}

Evaluation

This is the documented behaviour of the see and seealso keys. The description of the see key in chapter 4 of the glossaries user manual starts as follows (emphasis in the original):
see Cross-reference another entry. Using the see key will automatically add this entry to the glossary, but will not automatically add the cross-referenced entry.
As mentioned in the glossaries manual, the see key essentially provides a convenient shortcut that performs
\glssee[tag]{label}{xr-label list}
after the entry has been defined. It's this command that performs the indexing.

If you want to avoid this automatic indexing, consider using bib2gls instead, which provides much better handling of these cross-references.

Add comment or return to search results.

Watch This Report

If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes" button. (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional.)
E mail:
Confirm E mail:
Confirm Bug ID:

To unsubscribe from all notifications use the notifications page.

Comment

You can append a comment to the report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional. If provided, it will be shown with the comment.)
Confirm Bug ID:

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace text[/tt]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

Click on the Preview button to preview the message.

Return to search results.