5

I am using Springer Nature's sn-basic document class. I followed this article to add acronym. It doesn't add the acronym but added 16-17 errors.

\usepackage[acronym]{glossaries}
\makeglossaries
\newacronym{PINN}{PINN}{Physics-informed neural networks}


\begin{document}
\printglossary[type=\acronymtype,title=Acronyms]

Errors:

1. Package xkeyval Error: key `noglossaryindex' undefined.
2. LaTeX hooks Error: Missing \PopDefaultHookLabel.
3. Package xkeyval Error: key `nomain' undefined.
4. Package xkeyval Error: key `nostyles' undefined.
5. Package xkeyval Error: key `notree' undefined.
6. Package xkeyval Error: key `nosuper' undefined.
7. Package xkeyval Error: key `nolong' undefined.

1 Answer 1

6

It's the standard problem: Springer Nature classes load the completely useless program package which does very nasty things.

Disable its loading.

\expandafter\def\csname [email protected]\endcsname{3000/12/31}

\documentclass{sn-jnl}

\usepackage[acronym]{glossaries}

\makeglossaries

\newacronym{PINN}{PINN}{Physics-informed neural networks}


\begin{document}

\gls{PINN}

\printglossary[type=\acronymtype,title=Acronyms]

\end{document}

enter image description here

I see no reason whatsoever for inflicting all users of Springer Nature classes the loading of algorithm2e and program. Besides, the loading order of packages is not the best, because hyperref is called earlier than it should. Protest fiercely.

When running a recent LaTeX version (at least 2020-10-01), you may replace the first cryptic line with the less cryptic

\makeatletter
\disable@package@load{program}{\typeout{Not loading program.sty}}
\makeatother

Leave the second argument empty if you don't want messages about this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .