I've found the question Default value for a key defined with pgfkeys which works fine. But I would like to define an .is choice
key with a default value, and I can't seem to get things to work.
I've tried something along the following lines
\makeatletter
\def\ae@subcolumn@width{\columnwidth/2}
\def\ae@subcolumn@height{\textheight}
\def\ae@par@style{CIAO MOON}
\pgfkeys{/ae/sub/column/.cd,
width/.store in=\ae@subcolumn@width,
height/.store in=\ae@subcolumn@height,
par style/.code/.default={\def\ae@par@style{HELLO WORLD}},
par style/.is choice,
par style/raggedright/.code={\let\ae@par@style\raggedright},
}
\newenvironment{aesubcol}[1]
{%%
\pgfkeys{/ae/sub/column/.cd,#1}%%
\begin{minipage}[t][\ae@subcolumn@height]{\ae@subcolumn@width}%%
\ae@par@style
}{%%
\end{minipage}}
\makeatother
I've also tried setting the default value using
par style/.default={\def\ae@par@style{HELLO WORLD}},
or
par style/.default/.code={\def\ae@par@style{HELLO WORLD}},
But none of these have the desired effect.
How can I set a default value for a choice key?