Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selection=all doesn't include see and seealso lists in location field #9

Closed
nlct opened this issue Oct 6, 2021 · 0 comments
Closed

Comments

@nlct
Copy link
Owner

nlct commented Oct 6, 2021

Example document:

% arara: pdflatex
% arara: bib2gls
% arara: pdflatex
\documentclass{article}

\usepackage[record]{glossaries-extra}

\begin{filecontents}{\jobname.bib}
@entry{sample1,name={sample1},description={one}}
@entry{sample2,name={sample2},description={two},see={sample1}}
@entry{sample3,name={sample3},description={three}}
@entry{sample4,name={sample4},description={four},seealso={sample3}}
@entry{sample5,name={sample5},description={five}}
@entry{sample6,name={sample6},description={six},alias={sample5}}
\end{filecontents}

\GlsXtrLoadResources
[
  selection=all,
  %selection=recorded and ancestors,
  %selection=recorded no deps,
  %selection=recorded and deps,
  %selection=recorded and deps and see,
  %selection=recorded and deps and see not also
]

\begin{document}
\gls{sample1}
\gls{sample2}
\gls{sample4}
\printunsrtglossaries
\end{document}

Only the "and deps" selection options will add the see and seealso information to the location lists. (The alias will always be added unless suppressed with an option such as alias=omit.) This makes sense for selection criteria such as recorded and ancestors or recorded no deps since it can lead to broken links as there's no guarantee that the cross-referenced entries are selected, but selection=all selects all entries so it makes more sense for that option to add the see and seealso lists to the locations.

Note (unless otherwise suppressed via other settings) all selection options will save the cross-reference information in the relevant field so if it isn't automatically added to the location list (or the location list is suppressed) it's still possible to add the information. For example, to add it to the post-description hook for the general category:

\glsdefpostdesc{general}{%
 \ifglshasfield{see}{\glscurrententrylabel}
 {, \glsxtrusesee{\glscurrententrylabel}}%
 {%
   \ifglshasfield{seealso}{\glscurrententrylabel}
   {, \glsxtruseseealso{\glscurrententrylabel}}%
   {%
     \ifglshasfield{alias}{\glscurrententrylabel}
     {, \glsxtrusesee{\glscurrententrylabel}}%
     {%
     }%
   }%
 }%
}

This will be fixed in v2.8 but it's possible there may be documents that are relying on the old behaviour. If so, you can suppress the cross-reference lists with see=omit,seealso=omit.

@nlct nlct closed this as completed Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant