Advance notification of change to glossaries .glsdefs file format

17 views
Skip to first unread message

Nicola Talbot

unread,
Sep 18, 2021, 9:45:49 AMSep 18
to
If any developer has an editor plugin or script that tries to parse the
glsdefs files created by glossaries.sty (typically to pick up entry
labels for autocomplete), the next version of glossaries (v4.47) will be
changing the format slightly in order to fix a bug.

This file is created if you define entries within the document
environment or if you use glossaries-extra.sty with the package option
docdef=atom. Examples:

\documentclass{article}
\usepackage{glossaries}

\begin{document}
\newglossaryentry{test}{name={test},description={sample}}
\gls{test}.
\end{document}

or

\documentclass{article}
\usepackage[docdef=atom]{glossaries-extra}

\newglossaryentry{test}{name={test},description={sample}}

\begin{document}
\gls{test}.
\end{document}

Currently this will write the data for each entry in the .glsdefs file as:

\ifglsentryexists{<label>}{}%
{%
\gls@defglossaryentry{<label>}%
{%
<key value list>
}%
}%

The new format will be:

\glsdefs@newdocentry{<label>}%
{%
<key value list>
}%

This new internal command means that any future modifications will
hopefully not require any further changes in the file format.

So if, for example, you are using the regular expression

^\\gls@defglossaryentry\{(.+)\}%$

then you'd need to change it to

^\\(:?gls@defglossaryentry|glsdefs@newdocentry)\{(.+)\}%$

(If you are instead using the `writeglslabels` package option to pick up
the labels, there will also be a bug fix to remove the spurious
\glolist@ on the last line of the glslabels file.)

Regards
Nicola Talbot
--
Home: http://www.dickimaw-books.com/
Creating a LaTeX Minimal Example:
http://www.dickimaw-books.com/latex/minexample/
Reply all
Reply to author
Forward
0 new messages