I'm learning pgfkeys and trying to use it for key-value argument handling.
I'm trying to set a style using it. For it, I defined a macro \mystyle to handle it, and use the same technique as in here to solve the execution of the style. Now, if I want to add more code to the argument using .append, the macro doesn't reflect the changes on it.
\documentclass{article}
\usepackage{tikz}
\pgfkeys{
/test/.cd,
my style/.store in=\mystyle,
my style/.default={draw,color=cyan,},
my style,
% helpers to get execution on styles
% https://tex.stackexchange.com/a/85647/7561
/tikz/.cd,
execute style/.style = {#1},
execute macro/.style = {execute style/.expand once=#1},%
}
\newcommand{\makenode}[2][]{
\pgfkeys{/test/.cd,#1}
\begin{tikzpicture}
\node[execute macro=\mystyle]{#2};
\end{tikzpicture}
}
\pagestyle{empty}
\begin{document}
\makenode{testing}
\makenode[my style={draw,color=blue,line width=5pt,}]{testing blue}
% this should be yellow, with thin line
\makenode[my style/.append={color=yellow,line width=1pt}]{testing blue}
\end{document}
From what I understood from the manual, the argument should be appended to the value of the key. So if I have in the value <something>, and I do <key>/.append={<more>}, the value in <key> should be <something><more>. But that isn't happening.
What am I missing?
