slithy / rpg_module

rpg-mod­ule: a LaTeX class for type­set­ting RPG adventure modules in the style of D&D mod­ules from the 1980s
LaTeX Project Public License v1.3c
37 stars 12 forks source link

Compilation warning: undefined control sequence (pgfutil/pgfmathprintnumber) #12

Closed tunesmith closed 8 months ago

tunesmith commented 8 months ago

I recently upgraded to MacTeX 2023, and now whenever I typeset a document that uses rpg-module, I get the following warning:

[...]
/usr/local/texlive/2023/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex:1
640: Undefined control sequence.
l.1640 \pgfutil@protected
                         \def\pgfmathprintnumber{%
? 
)) (/Users/curt/Library/texmf/tex/latex/rpg_module/rpg-1e-stats.sty
[...]

I've tried reviewing rpg-module.cls and rpg-1e-stats.sty, but haven't found the problem yet... any ideas?

Full error output attached. The test latex document looks like this:

\documentclass[letterpaper,serif,1e]{rpg-module}
\begin{document}

Test document

\end{document}

testerr.txt

slithy commented 8 months ago

Could be Tikz is not fully installed.

What happens if you don't use rpg-module but just include PGF?

\documentclass{article}

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

\begin{document}

Test document

\end{document}
tunesmith commented 8 months ago

Yeah, it's something to do with that. I get the same error.

This works:

\documentclass{article}

\usepackage{pgfkeys}
\input{pgfutil-common}
%\input{pgfmath.code}

\begin{document}

Test document

\end{document}

Not sure what the resolution should be, though?

slithy commented 8 months ago

I'm guessing a bit, but this could be due to the changes with Shell Escape (see https://tug.org/mactex/TeXLive2023+Changes.pdf).

As I don't have the same installation as you, I can't reproduce the problem to investigate further. Could you post the MWE above on LaTeX StackExchange and see if someone there can help?

tunesmith commented 8 months ago

Here's the question I asked: https://tex.stackexchange.com/questions/706967/pgfkeys-undefined-control-sequence

For what it's worth, I tried commenting out \input{pgfmath.code} in my own instance of rpg-module, and ran 'make' - I can compile my modules without that warning happening now, but I don't really know what pgfkeys and pgfmath.code are supposed to do so I don't have a sense of if I actually broke something else.

slithy commented 8 months ago

Thanks for following up on that, I have implemented the fix suggested on StackExchange and pushed to main. Closing the issue.

The PGF module provides a set of macros to manage key-value pairs. It is used for the statblocks. I honestly can't remember why \input was used instead of \RequirePackage.