[Tex/LaTex] RestoreAcronyms throw errors Undefined control sequence \gls

glossaries

when using \RestoreAcronyms from glossaries-extra all \gls works as previously in glossaries but I get "Undefined control sequence \gls" errors

MWE:

\documentclass[a4paper, 12pt]{memoir}
\usepackage{glossaries-extra}
\RestoreAcronyms
\newacronym{label}{acronyme}{Definition}
\newacronym[plural={acronyme pluriel},first={texte à afficher à la première occurrence},firstplural={idem, mais au pluriel}]{label2}{acronyme}{Définition}
\makeglossaries
\begin{document}
\gls{label} foo
\gls{label} foo
\gls{label2} foo
\gls{label2} foo
\printglossary
\end{document}

My ultimate goal was to use \Glsfmtfull in headings as recommended but keeping the same behaviour of acronyms defined with \newacronym{label}{acronyme}{Definition} : in glossaries-extra without RestoreAcronyms, label (from my MWE) will never be seen "full (short)" at first display but label2 yes. I rather prefer to don't change my whole glossary file!

Best Answer

My ultimate goal was to use \Glsfmtfull in heading

I will fix have now fixed this bug (v1.07), but if that's your goal, then there's no point using \RestoreAcronyms because all the new commands like \Glsfmtfull are designed to work with glossaries-extra's new abbreviation mechanism and don't work with the original glossaries acronym mechanism.

I'm guessing that what you actually want is:

\documentclass[a4paper, 12pt]{memoir}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{glossaries-extra}

\makeglossaries

\setabbreviationstyle[acronym]{long-short}

\newacronym{label}{acronyme}{Definition}
\newacronym[plural={acronyme pluriel},first={texte à afficher à la
première occurrence},firstplural={idem, mais au
pluriel}]{label2}{acronyme}{Définition}

\begin{document}
\gls{label} foo
\gls{label} foo
\gls{label2} foo
\gls{label2} foo
\printglossary
\end{document}

This produces:

image of result

Related Question