Is there a general way to pass a <key list>
contained inside a macro to the \pgfkeys
command, in order to process it in the usual way? In simple examples, \expandafter
helps but I do not really know how to go in more complicated situations. In particular, how should I do, if I want to pass to \pgfkeys
some keys explicitly and some through a macro?
\documentclass[varwidth,border=1mm]{standalone}
\usepackage{pgf}
\def\x{g/a=1,g/b=2}
\def\y{a=3,b=4}
\pgfkeys{%
/g/.is family, /g,
a/.code={(a is #1)},
b/.code={(b is #1)},
c/.code={(c is #1)}
}
\begin{document}
%\pgfkeys{\x} % CLEARLY FAILING
\expandafter\pgfkeys\expandafter{\x} \\
%\pgfkeys{\x,g/c=7} % CLEARLY FAILING
\expandafter\pgfkeys\expandafter{\x,g/c=7} \\
%\pgfkeys{g,c=5,\y} % CLEARLY FAILING
%\pgfqkeys{/g}{c=5,\y} % CLEARLY FAILING
\pgfkeys{g,c=5,a=3,b=4} \\ % <-- What I'd like to get from
\pgfqkeys{/g}{c=5,a=3,b=4} % <-- the previous two lines
\end{document}
I stumbled on this aspect applying what described in the 86.6.3 Handlers For Unprocessed Keys section of the pgf
manual, trying to process again with \pgfkeys
the filtered out keys saved into the \remainingoptions
macro.
\usepackage{pgf}
to your preamble./pgf/key filter handlers/append filtered to={<macro>}
handler does. And I would like to process then those keys via\pgfkeys
.