I defined a pgf key with a default value. In the following code I can overwrite its value in the default argument I created but I can't change the value using the pgfsetkeyvalue
macro.
\documentclass{article}
\usepackage{fontspec}
\usepackage{tikz}
\pgfkeys{
/titleblock/.is family, /titleblock,
titlesize/.default = 48,
titlesize/.store in = \titlesize,
titlesize
}
\newcommand{\titleblock}[1][]{%
\pgfkeys{/titleblock/.cd, #1}%
\node[align=left, inner sep=0mm, outer sep=0mm,
font={\fontsize{\titlesize}{2\titlesize}\selectfont}]
(title)
at (0,0)
{This is my test title};
}
\begin{document}
\begin{tikzpicture}
\titleblock
\end{tikzpicture}
\begin{tikzpicture}
\titleblock[titlesize=25pt]
\end{tikzpicture}
\pgfkeyssetvalue{/titleblock/titlesize}{10}
\begin{tikzpicture}
\titleblock
\end{tikzpicture}
\end{document}
Is there anyway that I can change this value without using the optional argument of \titleblock
?