diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/pgfkeyx/pgfkeyx-test1.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/pgfkeyx/pgfkeyx-test1.tex | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfkeyx/pgfkeyx-test1.tex b/Master/texmf-dist/doc/latex/pgfkeyx/pgfkeyx-test1.tex new file mode 100644 index 00000000000..70915744aae --- /dev/null +++ b/Master/texmf-dist/doc/latex/pgfkeyx/pgfkeyx-test1.tex @@ -0,0 +1,52 @@ +\documentclass{article} +\usepackage{pgfkeys} +\usepackage{pgfkeyx} +\makeatletter + +\begingroup +\def\iden#1{#1} +\catcode`\/=13 +\catcode`\,=13 +\catcode`\==13 +\iden{\endgroup + \pgfkeys{% + / my family / .is family, + /my family/my keys/.cd, + keya / .code = \def\keyavalue{#1}, + keya/.default = {keya-default}, + keyb / .code = \def\myvalueb{#1}, + keyb /.default=keyb-default, + .normal code=\def\x#1{#1}, + keyc/.code=\pgfqkeysalso\pgfkeyscurrentpath{#1}, + keyc/.value required, + keyd/.is if with no callback = true, + keye/.is if with 1 callback = {true}{\def\x##1{##1-True-#1}}, + keyf/.is if with 2 callbacks = + {true}{\def\x##1{##1-True-#1}}{\def\x##1{##1-False-#1}}, + }% +} + +\pgfkeys{% + /my family/my keys/.cd, + keya={x}, + keyb=aa, + keyc = {keya=aa, keyb=bb}, +} + +\pgfkeys{% + /my family/my keys/.cd, + keya/.restore default, + .restore key defaults={keya,keyb} +} + +\makeatother + +\begin{document} +\pgfkeys{% + /my family/my keys/keyf=true, +} +\ifkeyf + \texttt{`keyf'} is \textsf{true}. +\fi +%\show\x +\end{document} |