1

I recently upgraded to MacTeX 2023, and am experiencing this warning when using a custom library (https://github.com/slithy/rpg_module):

640: Undefined control sequence.
l.1640 \pgfutil@protected
                         \def\pgfmathprintnumber{%
? 
))

The error doesn't happen with MacTeX 2019. After experimenting, I was able to narrow it down to this minimum example using vanilla LaTeX:

\documentclass{article}

\usepackage{pgfkeys}

\input{pgfutil-common}
\input{pgfmath.code}

\begin{document}

Test document

\end{document}

That document causes the same warning. If I comment out \input{pgfmath.code}, the error goes away.

Anyone know what's going on here? The library I'm using also has those two input lines in that order. I don't know if removing that second input is actually the proper fix.

1 Answer 1

1

You need pgfrcs as well as pgfkeys for pgfmath. It would be better by far to load the pgfmath package.

That is, it would be better to use

\documentclass{article}

\usepackage{pgfkeys}
\usepackage{pgfmath}

\begin{document}

Test document

\end{document}

This way, if the dependencies change, your code won't break (unless there's a package bug, of course). Individual components of pgf aren't designed to be \input with impunity. That said, pgfmath's dependencies haven't changed: pgfrcs was required as well as pgfkeys in the version I have from TeX Live 2019.

You must log in to answer this question.

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