[pstricks] pstricks.tex doesn't load per-format pgf utility driver

muzimuzhi Z muzimuzhi at gmail.com
Sun Oct 23 08:03:30 CEST 2022


Hi all,

Currently, `pstricks.tex` loads pgfkeys and pgffor using

% lines 77--81
\ifx\pgfkeysloaded\relax\else
  \input pgfutil-common.tex
  \input pgfkeys.code.tex
  \input pgffor.code.tex
\fi


This way, only the common pgf utility driver `pgfutil-common.tex` is
loaded, and the per-format driver `pgfutil-(plain|latex|context).def` is
missing.

This will cause problems with the latest pgf dev (
https://github.com/pgf-tikz/pgf), in which now `\pgfutil at protected`, a
command defined only in per-format driver, is needed by `pgffor`. See commit

https://github.com/pgf-tikz/pgf/commit/5d099a8399436f46fba0ea464b54c301b1656abe
and example below

\documentclass{article}
\usepackage{pstricks}
\begin{document}
\end{document}


! Undefined control sequence.
l.1640 \pgfutil at protected
                         \def\pgfmathprintnumber{%

A simple workaround would be to load pgffor in `pstricks.tex` by

% no need to provide \ProvidesPackageRCS

\ifx\pgfkeysloaded\relax\else
  \ifdefined\@latexerr % format is latex
    \RequirePackage{pgffor} % pgffor depends on pgfkeys
  \else % format is plaintex
    \input pgffor.tex
  \fi
\fi



best regards,
Yukai Chou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/pstricks/attachments/20221023/3f9cf797/attachment.html>


More information about the PSTricks mailing list.