1

The code

\documentclass{article}

\usepackage{program} % from sn-jnl.cls
\usepackage{tikz-cd}

\begin{document}
test
\end{document}

yields the error Missing \endcsname inserted. ...eoperator{||}{or} {2}{infix} {200} in file pgfmathparser.code.tex of my texlive installation.

The error is gone when the \usepackage lines are swapped. However, in my actual use case, I cannot change the order, because \usepackage{program} is part of a publisher's .cls file that I have to use unaltered.

How can I fix this document without swapping these lines?

I am aware of the answer of Conflict between tikz-pgf and program , but don't know whether this could help me here.

(I can give more details on my environment if needed, but I see this on Windows and Linux.)

3
  • 2
    program is a menace, as is the fact that sn-jnl.cls includes it. Put \catcode`\|=12 after the package to restore | Oct 19, 2022 at 10:48
  • @DavidCarlisle Great, that fixed it! Do you want to make your comment into an answer for the rep points? Oct 19, 2022 at 10:53
  • 1
    actually I gave a better answer here tex.stackexchange.com/questions/619280/… Oct 19, 2022 at 11:20

1 Answer 1

2

program unfortuately makes | globally active, you can put

\catcode`\|=12 

after the package to restore |

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