I wanted to compile an old document on a new PC, so basically I switched from texlive 2021 to an up-to-date version of texlive 2023 for the compilation of a longer document (includes glossaries-extra among many other packages). This lead to the following error, which I have reproduced in a quite small example. But I have no idea what to do about it....
I use glossaries-extra for abbreviations (and other stuff). At some point in the document, I want to access only small cap versions, capitalized versions, or all cap versions. The following code uses the three macros \glsfmtname, \Glsfmtname, and \GLSfmtname to do that. The use of the last one gives an error when \GLSfmtname tries to use the macro \GLSxtrtitlename. But not always, only under two conditions, as far as I can tell: 1) The document class has to be e.g. book or scrbook (I also tried article and didn't observe it). 2) There has to be at least one \chapteror \section or similar in the document, otherwise it compiles just fine.
\documentclass{book} % also for scrbook
%\documentclass{article} % NOT for article! (has no chapter, but same behavior for book+\section)
\usepackage{glossaries-extra}
\newabbreviation{xxx}{asa}{a simple abbreviation}
\begin{document}
%\chapter{A chapter}
\section{A section} % uncomment for error
\gls{xxx}
\glsfmtname{xxx}
\Glsfmtname{xxx}
\GLSfmtname{xxx} % <- error: \GLSxtrtitlename undefined
\end{document}
I get the error message:
! Undefined control sequence. \GLSxtrtitlename {xxx} l.14 \GLSfmtname{xxx}
?
Did I miss some setting? Or can this be a bug? Thank you for your help!