TransWikia.com

Equivalent of glsresetall in glossaries-extra

TeX - LaTeX Asked on May 11, 2021

I have switched from the glossaries package to glossaries-extra to enable some link counting in my document.
However, now my glsresetall commands no longer work.
What is the equivalent in glossaries-extra?

Thanks for any help.

Edit: Minimum Working Example

Here is a MWE. I’ve included a toggle (use-glos-extra) to show the working version using glossaries, and the desired version with glossaries-extra.

At the start of both chapters, it should read

Discussing artificial intelligence (AI), then talking about AI

But, using glossaries-extra, both chapters immediately read

Discussing AI, then talking about AI.

documentclass[oneside]{scrbook}

usepackage{glossaries}

providetoggle{use-glos-extra}
settoggle{use-glos-extra}{true}
iftoggle{use-glos-extra}{
    % GLOSSARIES-EXTRA package
    usepackage{glossaries-extra}
}
{
    %% GLOSSARIES pacakge
    usepackage{glossaries}
}

makeglossaries
newacronym{ai}{AI}{artificial intelligence}
pretochapterglsresetall

begin{document}
printglossaries

chapter{First chapter}
Discussing gls{ai},  then talking about gls{ai}.

chapter{Second chapter}
Discussing gls{ai},  then talking about gls{ai}.

end{document}

One Answer

You can restore the behavior of glsreset commands with glossaries-extra using RestoreAcronyms. However, this will disable some functionality of glossaries-extra. Code:

makeglossaries
RestoreAcronyms
newacronym{ai}{AI}{artificial intelligence}
pretochapterglsresetall

Alternatively, you can load glossaries-extra with the [acronym] option, and set an explicit acronym style. Code:

usepackage[acronym]{glossaries-extra}
setabbreviationstyle[acronym]{long-short}

In this case RestoreAcronyms is not needed.

For more information about the effects of both options see the manual of glossaries-extra, section 2.9 Acronym Style Modifications.

Correct answer by Marijn on May 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP