\documentclass{article}
\usepackage{tikz}
%\pgfkeys{/tikz/scale/.show code}
\pgfkeys{tikz/.cd,
scale/.append code={\pgfgettransformentries\scale\ab\ba\bb\xhsift\yshift},
%scale/.initial=1, %bad
%scale/.default=1, %bad
%scale = 1, %bad
}
%\tikzset{/tikz/scale=1} % bad
\begin{document}
% doesn't work
%\begin{tikzpicture}
% \node {*\scale*} ;
%\end{tikzpicture}
% work
\begin{tikzpicture}
\pgfkeys{/tikz/scale = 2}
\node {*\scale*} ;
\end{tikzpicture}
\end{document}
无法为 pgfkey 设置默认值、初始值或第一个值
•
pgfkeys