I just started working on a journal article which is supposed to be submitted according to the sn-jnl template. I therefore downloaded the zip and started adding my content.

Unfortunately I soon discovered that the glossaries package and the todonotes package break the compilation. The error is reproducible even with their Overleaf template.

  • download zip/open overleaf template -> compiles well
  • add \usepackage{glossaries} in the head -> error

The same problem occurs with \usepackage{todonotes}. Does anybody have a solution to this issue?

I consider these packages to be rather common and never had any issues with any other conference/journal template, so I am confused as to why this happens.

I'm aware that there are alternatives to these two, but I'm worried that other (more important) packages are going to raise similar issues.


Incomplete \iffalse; all text was ignored after line 79.

‪/usr/local/texlive/2020/texmf-dist/tex/latex/fp/fp.sty, 25‬
<inserted text> 
The file ended while I was skipping conditional text.
This kind of error happens when you say `\if...' and forget
the matching `\fi'. I've inserted a `\fi'; this might work.

EDIT: Here's a screenshot of what I see, including the first page which is the actual problem (it's garbage)

enter image description here

UPDATE: (Quick) Fix

Thanks to @simon-dispa 's comment, I learned where to look in the sn-jnl.cls. It seems that actually the problem is on line 311: \usepackage{program} causes issues.

The good part: When uncommenting this line, the compilation (and everything else) works smoothly.

Now to the bad part: I have to modify the official Springer template to get things running. I personally do not need it here, but clearly I'm modifying things that I shouldn't, which is not ideal.


1 Answer 1


I also had this problem, and found an answer in another post on Tex.Stockexchange.

For self-containedness, I include here the answer (courtesy of the user David Carlisle)

The class includes the program package which makes some unfortunate choices including globally making | active, it provides a command

\normalbaroutside which you can issue in the preamble then | only gets the special meaning inside program environments.

So the solution is to call \normalbaroutside in the preamble before loading glossaries/tikz/todonotes. The advantage is that this way sn-jnl.cls can remain unchanged.

  • Wowza, that fixed the error with including the 'fp' package in the springer template, as well. Nice.
    – reggie
    Nov 21, 2022 at 15:39

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