3

I’m trying to get to the bottom of an odd issue I’m having when using the glossaries-extra package, specifically its record option which is necessary in order for it to work with the bib2gls tool.

Whenever I use this option in conjunction with polyglossia, it throws the following error:

! Undefined control sequence
<argument> \TrackLangRequireDialectPrefix
                                          \CurrentTrackedTag .ldf
l. 11249 {}

The problem cannot lie with the contents of the glossary because the error even occurs when no glossary is loaded at all.

An MWE:

\documentclass{scrreprt}

\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english} 
% if I delete the \setdefaultlanguage line the error 
% disappears, but using polyglossia without defining a 
% language is kind of pointless. Also other packages such 
% as biblatex really don’t like it

\usepackage[record]{glossaries-extra}

\begin{document}

Random text to prevent an empty output

\end{document}

The document does compile alright, but the error, aside from being seriously annoying, does not seem like something I should just ignore.

After a bit of digging I suspect that the issue somehow lies with the tracklang package (loaded by glossaries-extra) trying to find a language definition file and apparently failing to assign \CurrentTrackedTag (which seems to be a local variable) correctly in the process. So I initially wondered whether I made a mistake in defining my default language, but I followed the polyglossia manual to the letter. In fact it doesn’t seem to matter what language I fill in (as well as whether or not and which additional options I use), or even if I use babel instead of polyglossia, the error is thrown regardless.

Any ideas on how to solve the issue?

(P.S.: I’m using XeLaTeX because I need CJK support.

  • Welcome to TeX.SX! At the moment I can't quite reproduce the error message, but I'm not sure if I forgot to run an additional command. Can you double check that the example reproduces the error in an empty directory and describe which commands you run on it? – moewe Aug 22 '18 at 10:19
  • Anyway it is a known issue with polyglossia that it does not properly expose its language variants to other packages in a meaningful way (I assume many packages would like babel identifiers, but at the moment there is no unified interface on the polyglossia side for any variant detection). It could be that tracklang can not pick up the variant in certain situations and fails to guard against that. If you only write in English (and other Western/European languages), I would use babel instead of polyglossia (you mention the error pops up even then - did you delete the aux files?). – moewe Aug 22 '18 at 10:20
  • 2
    Can you add \listfiles to your MWE and show the result. (It should create a summary of all the packages with their versions at the end of the transcript.) I don't get an error so I suspect you may have an old version of tracklang . – Nicola Talbot Aug 22 '18 at 10:26
  • 1
    @Abun The latest version of tracklang is 1.3.6 2018-05-13. What about the glossaries-extra version? The latest version of that is 1.36 2018-08-18. Both may need updating. – Nicola Talbot Aug 22 '18 at 11:41
  • 2
    @NicolaTalbot Updating solved the issue (for both polyglossia and babel. Awesome, thank you very much! – Abun Aug 22 '18 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.