I am trying to use pgfkeys
to store some text for use later. The end goal is to use a key filter to process options first and then apply them to text before it is stored.
In the MWE below, if it try to store text containing \par
, I get an error when using pgfkeysfiltered
but not when using pgfkeys
, which you can see by uncommenting the commented line. I know I am not really using a key filter in the example below, but this is fairly minimal.
\documentclass{article}
\usepackage{pgfkeys}
\newcommand{\storecontent}{}
\newcommand{\usecontent}{\storecontent}
\pgfkeys{%
/test/temp family/.is family,
/test/store/.code={\renewcommand{\storecontent}{#1}},
/test/store/.belongs to family=/test/temp family,
/pgf/key filters/active families/.install key filter
}
\begin{document}
\pgfkeys{/test/store={first \par test}}
\usecontent
\pgfkeys{/test/temp family/.activate family}
%\pgfkeysfiltered{/test/store={second \par test}}
\usecontent
\end{document}
Is there any way I can resolve this? Or is this intended?