summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/yquant/yquant-langhelper.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-05-07 20:37:34 +0000
committerKarl Berry <karl@freefriends.org>2022-05-07 20:37:34 +0000
commita576e8f190f9ee34a3239738aeb3984b4ff43e57 (patch)
tree9f4567df155d19dc579fc0d5cc94cf8f3136d6cf /Master/texmf-dist/tex/latex/yquant/yquant-langhelper.tex
parentb7374e712f4af6ef86668d625de13634d547b27d (diff)
yquant (7may22)
git-svn-id: svn://tug.org/texlive/trunk@63247 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/yquant/yquant-langhelper.tex')
-rw-r--r--Master/texmf-dist/tex/latex/yquant/yquant-langhelper.tex45
1 files changed, 19 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/yquant/yquant-langhelper.tex b/Master/texmf-dist/tex/latex/yquant/yquant-langhelper.tex
index 56b671fb85a..c8b96250ddb 100644
--- a/Master/texmf-dist/tex/latex/yquant/yquant-langhelper.tex
+++ b/Master/texmf-dist/tex/latex/yquant/yquant-langhelper.tex
@@ -52,40 +52,33 @@
% we need to capture every non-attribute (which means filtering them out).
\expandafter\ifyquant@beginswith\expandafter{\pgfkeyscurrentkey}{/yquant/attrs/}{%
% the key is in /yquant/attrs. Does it actually exist (but not as a handler, which would define non-existing keys)?
- \if\pgfkeyscasenumber1%
- \pgfkeysfiltercontinuetrue%
- \else%
- \if\pgfkeyscasenumber2%
+ \ifnum\pgfkeyscasenumber=3 % handler
+ % handlers are tricky. The existence does not rely on the question whether the key itself exists, but the handler. This is not what we want for attributes. We strip the handler (the handler is in \pgfkeyscurrentname, while the original key is fully contained in \pgfkeyscurrentpath) and check whether it existed (think of handlers such as .expanded, which for sure should be valid, while we don't want to define new arguments).
+ \pgfkeysifassignable{\pgfkeyscurrentkey}{%
+ % case 1 and 2
\pgfkeysfiltercontinuetrue%
- \else%
- % 0 or 3 for our case means non-existing - now we need to check whether we can find it in the global attributes.
- \pgfkeysifassignable{/yquant/global attrs/\pgfkeyscurrentkeyRAW}{%
+ }{%
+ % don't have to worry about option 3, so this is 0. But maybe this was actually a global attribute? Again, we have to discard our handler. Note that this change to the current-macros will affect further processing!
+ \edef\pgfkeyscurrentkey{/yquant/global attrs/\pgfkeyscurrentkeyRAW}%
+ \pgfkeyssplitpath%
+ \pgfkeysifassignable{\pgfkeyscurrentpath}{%
\pgfkeysfiltercontinuetrue%
}{%
- % it is not, so it is not a known attribute for this operator. Filter.
\pgfkeysfiltercontinuefalse%
}%
- \fi%
- \fi%
- }{%
- % the key is not in /yquant/attrs. Is it a global attribute (usually, the user should not access this explicitly, but let's be tolerant here)?
- \expandafter\ifyquant@beginswith\expandafter{\pgfkeyscurrentkey}{/yquant/global attrs/}{%
- % the key is in /yquant/global attrs. Does it actually exist?
- \if\pgfkeyscasenumber1%
- \pgfkeysfiltercontinuetrue%
- \else%
- \if\pgfkeyscasenumber2%
+ }%
+ \else%
+ \ifnum\pgfkeyscasenumber=0 % unknown
+ % non-existing - now we need to check whether we can find it in the global attributes.
+ \pgfkeysifassignable{/yquant/global attrs/\pgfkeyscurrentkeyRAW}%
\pgfkeysfiltercontinuetrue%
- \else%
- % no - that's it.
+ % it is not, so it is not a known attribute for this operator. Filter.
\pgfkeysfiltercontinuefalse%
- \fi%
+ \else% command key or contains value
+ \pgfkeysfiltercontinuetrue%
\fi%
- }{%
- % the key is no known attribute
- \pgfkeysfiltercontinuefalse%
- }%
- }%
+ \fi%
+ }\relax%
},%
/yquant/attr filter/.style={%
/pgf/key filters/attr filter/.install key filter,%