Skip to content

Commit

Permalink
replace \baz with \pgf@after
Browse files Browse the repository at this point in the history
  • Loading branch information
hansonchar committed Jun 27, 2024
1 parent 22364a7 commit ec021c2
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -213,21 +213,19 @@
\edef#3{#3!}%
\pgfdebug{line 214/pgf@@tryextensions: finalize to 3="#3"}%
\else%
\edef\foo{#3}%
\edef\bar{#3!}%
\pgfdebug{line 216/pgf@@tryextensions: trying with "[#1!]{#3}", foo="\foo", bar="\bar"}%
\edef\pgf@saved{#3}%
\edef\pgf@before{#3!}%
\pgfdebug{line 216/pgf@@tryextensions: trying with "[#1!]{#3}", pgf@saved="\pgf@saved", pgf@before="\pgf@before"}%
\pgf@@tryextensions[#1!]{#3}%
\pgfdebug{line 220/pgf@@tryextensions: 3="#3", foo="\foo", bar="\bar"}%
\edef\baz{#3}%
\newlength{\lenbar}\settowidth{\lenbar}{\bar}
\newlength{\lenbaz}\settowidth{\lenbaz}{\baz}
\ifdim\lenbar=\lenbaz%
\pgfdebug{line 220/pgf@@tryextensions: 3="#3", pgf@saved="\pgf@saved", pgf@before="\pgf@before"}%
\edef\pgf@after{#3}%
\ifx\pgf@before\pgf@after%
% https://tex.stackexchange.com/questions/451/when-to-use-edef-noexpand-and-expandafter
\edef#3{\csname foo\endcsname}%
\edef#3{\csname pgf@saved\endcsname}%
\pgfdebug{line 226/pgf@@tryextensions: trying with "[#2]{#3}"}%
\pgf@@tryextensions[#2]{#3}%
\else%
\pgfdebug{line 229/pgf@@tryextensions: (foo="\foo") different bar="\bar", baz="\baz"}%
\pgfdebug{line 229/pgf@@tryextensions: (pgf@saved="\pgf@saved") different pgf@before="\pgf@before", baz="\pgf@after"}%
\fi%
\fi%
}%
Expand Down

0 comments on commit ec021c2

Please sign in to comment.