喂食
\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}
使用 TeXLive 2022 时,循环会导致pdflatex mwe && makeglossaries mwe
词汇表中的页面顺序错误(与 TeXLive 2021 相比,顺序正常):
第三列的页码顺序应为“I, 1”而不是“1, I”,因为文档中罗马数字页码出现在阿拉伯数字页码之前。这是 glossaries-extra 的缺陷还是功能?我该如何正确设置页码顺序?
答案1
makeindex
对页码的顺序做了一些更改。您可以在文件page_precedence
中更改顺序.ist
。例如,对于词汇表,您可以这样做:
\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}
\GlsSetWriteIstHook{%
\write\glswrite{page_precedence "Rn"}% Roman then numbers
}
\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}