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

Integer sort method should cast to int #11

Closed
nlct opened this issue Oct 10, 2021 · 1 comment
Closed

Integer sort method should cast to int #11

nlct opened this issue Oct 10, 2021 · 1 comment

Comments

@nlct
Copy link
Owner

nlct commented Oct 10, 2021

If an integer sort method is used (integer or integer-reverse) and the sort value is decimal, the sort value ends up as 0. It would be more appropriate to cast the decimal value to an integer. MWE:

\documentclass{article}

\begin{filecontents}{\jobname.bib}
@index{12345,name={1234.5}}
@index{123456,name={12345.6}}
@index{456,name={4.56}}
@index{-3456,name={-34.56}}
@index{123,name={123}}
\end{filecontents}

\usepackage[record]{glossaries-extra}

\GlsXtrLoadResources[sort=integer,selection=all]

\begin{document}
\printunsrtglossaries
\end{document}
@nlct
Copy link
Owner Author

nlct commented Oct 10, 2021

Fixed in commit 2110973

@nlct nlct closed this as completed Oct 10, 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