Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[12pt]{article}
- usepackage{tikz}
- usepackage{etoolbox}
- newcommand{specialsave}[1]{
- pgfkeys{
- /specialstore/place/.cd,
- a/.initial,
- c/.initial,#1, % there cannot be a newline before #1
- c/.get=cvalA, % this must come after #1, otherwise it won't get the values that are set
- }
- edefcvalB{pgfkeysvalueof{/specialstore/place/c}}
- defcompareval{pgfkeysnovalue}
- ifdefequal{cvalA}{compareval}{c is empty by comparison A}{c is non-empty by comparison A}
- ifdefequal{cvalB}{compareval}{c is empty by comparison B}{c is non-empty by comparison B}
- }
- begin{document}
- specialsave{
- a=the values of a,
- }
- \
- specialsave{
- a=the values of a,
- c
- }
- \
- specialsave{
- a=the values of a,
- c=
- }
- \
- specialsave{
- a=the values of a,
- c={}
- }
- end{document}
- c is empty by comparison A
- c is non-empty by comparison B
- c is empty by comparison A
- c is non-empty by comparison B
- c is non-empty by comparison A
- c is non-empty by comparison B
- c is non-empty by comparison A
- c is non-empty by comparison B
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement