# Bug Tracker

ID 207🔗 Peter Müller 2022-07-27 00:54:47 2022-08-01 09:51:00 Closed (Not a Bug) glossaries-extra 1.48 wrong page order

## Description

Feeding
\documentclass{book}%%% for debugging only. For production, I use svmono.
\usepackage{amssymb}
\usepackage[makeindex,toc,nogroupskip,nomain]{glossaries-extra}%%% similar issue with glossaries
\newglossary[nlg]{notation}{not}{ntn}{Notation}
\makeglossaries
\newglossaryentry{not:powerset}{type=notation, name={$$\mathfrak{P}$$}, text={\mathfrak{P}}, sort={powerset}, description={The power set of a set $$Z$$ is denoted by $$\mathfrak{P}(Z)$$.}}
\begin{document}
\pagenumbering{Roman}$$\gls{not:powerset}$$
\newpage
\pagenumbering{arabic}$$\gls{not:powerset}$$
\printglossaries
\end{document}

to a loop over pdflatex mwe && makeglossaries mwe results in a wrong page order in the glossary when using TeXLive 2022 (as opposed to TeXLive 2021, where the order was o.k.):

“𝔓 The power set of a set 𝑍 is denoted by 𝔓(𝑍). 1, I”

The page order in the third column should be “I, 1” rather than “1, I” because the Roman-numbered pages occur before the arabic-numbered pages in the document. Is this a bug or a feature of glossaries-extra? How do I get the page order right?

## MWE

\documentclass{book}%%% for debugging only. For production, I use svmono.
\usepackage{amssymb}
\usepackage[makeindex,toc,nogroupskip,nomain]{glossaries-extra}%%% similar issue with glossaries
\newglossary[nlg]{notation}{not}{ntn}{Notation}
\makeglossaries
\newglossaryentry{not:powerset}{type=notation, name={$$\mathfrak{P}$$}, text={\mathfrak{P}}, sort={powerset}, description={The power set of a set $$Z$$ is denoted by $$\mathfrak{P}(Z)$$.}}
\begin{document}
\pagenumbering{Roman}$$\gls{not:powerset}$$
\newpage
\pagenumbering{arabic}$$\gls{not:powerset}$$
\printglossaries
\end{document}


## Evaluation

It’s makeindex that orders the page list, so it’s not a bug in glossaries (or glossaries-extra). I seem to recall seeing a message on the TeX Live mailing list about makeindex and page numbers but I can’t remember the details. I’m away at the moment and will check when I get back.

Update (2022-08-01): the message I was thinking about was makeindex broken in TL22, which isn't the same as this.

According to the makeindex manual the default page precedence order is rnaRA (which means lowercase Roman, numeric, lowercase alphabetical, uppercase Roman and uppercase alphabetical), so "1, I" is correct for that setting. The makeindex style information is written to the .ist file by the \makeglossaries command, but that command doesn't normally set the page_precedence value so it should use makeindex's default.

This means that the output you are getting is correct for the default settings. I don't know why it was producing a different result for TL2021. You can change the order of precedence to match your preference. For example, the following sets it to RrnaA (uppercase Roman, lowercase roman, numeric, lowercase alphabetical, uppercase Alphabetical):

\documentclass{book}
\usepackage{amssymb}
\usepackage[makeindex,toc,nogroupskip,nomain]{glossaries-extra}
\newglossary[nlg]{notation}{not}{ntn}{Notation}

\GlsSetWriteIstHook{%
\write\glswrite{page_precedence "RrnaA"}%
}

\makeglossaries
\newglossaryentry{not:powerset}{type=notation, name={$$\mathfrak{P}$$}, text={\mathfrak{P}}, sort={powerset}, description={The power set of a set $$Z$$ is denoted by $$\mathfrak{P}(Z)$$.}}
\begin{document}
\pagenumbering{Roman}$$\gls{not:powerset}$$
\newpage
\pagenumbering{arabic}$$\gls{not:powerset}$$
\printglossaries
\end{document}

Note that if you switch to another indexing method at a later date, you can't use page_precedence as it's specific to makeindex. (Xindy also has an order of precedence whereas bib2gls and \makenoidxglossaries always use the document order.)

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.

Comment:

You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

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

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

You can use the Preview button to review your message formatting before submitting.