Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgfutil-plain.def has dulicate def'n of \pgfmath@tempdima #1384

Open
mwette opened this issue Feb 16, 2025 · 1 comment
Open

pgfutil-plain.def has dulicate def'n of \pgfmath@tempdima #1384

mwette opened this issue Feb 16, 2025 · 1 comment
Labels

Comments

@mwette
Copy link

mwette commented Feb 16, 2025

Brief outline of the bug

I'm using texlive on Ubuntu. The distribution id is 2024.20240706. In the file pgfutil-plain.def, near line 230, I happened to see the following code. I'm guessing the second line is an unintentional duplicate. Maybe intention was to define dimb ?

\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempcnta\pgfutil@tempcnta
\let\pgfmath@tempcntb\pgfutil@tempcntb

Minimal working example (MWE)

N/A

@muzimuzhi
Copy link
Member

muzimuzhi commented Feb 17, 2025

Each of the format drivers pgfutil-plain.def, pgfutil-latex.def, and pgfutil-context.def contains the same issue, which was introduced by 6b8752d (fixed math loading order problem, 2012-03-30).

Relevant lines in format drivers

\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempcnta\pgfutil@tempcnta
\let\pgfmath@tempcntb\pgfutil@tempcntb

\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempcnta\pgfutil@tempcnta
\let\pgfmath@tempcntb\pgfutil@tempcntb

\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempcnta\pgfutil@tempcnta
\let\pgfmath@tempcntb\pgfutil@tempcntb

Nowadays I doubt whether all the four \let\pgfmath@temp...\pgfutil@temp... in format drivers are necessary or not.

In pgfmath, these four temp registers are created in pgfmathutil.code.tex,

\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempdimb\pgfutil@tempdimb
\let\c@pgfmath@counta\c@pgf@counta
\let\c@pgfmath@countb\c@pgf@countb
\let\c@pgfmath@countc\c@pgf@countc
\let\c@pgfmath@countd\c@pgf@countd
\let\pgfmath@tempcnta\pgfutil@tempcnta
\let\pgfmath@tempcntb\pgfutil@tempcntb

which is always loaded after format driver, even when pgfmath is used on its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants