Guest User

Untitled

a guest
Nov 20th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. begin{filecontents}{jobname.cls}
  2. ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
  3. RequirePackage{pgfopts}
  4. pgfkeys{
  5. testproj/.cd,
  6. mystuff/.store in = myValue,
  7. mystuff = {} % <-- Set default to empty
  8. }
  9. ProcessPgfOptions{/testproj}
  10. LoadClass[myValue]{scrartcl} % article is working
  11. endinput
  12. end{filecontents}
  13. documentclass[mystuff={hello=SE,test=1}]{jobname}
  14. %pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
  15. begin{document}
  16. myValue: myValue
  17. end{document}
  18.  
  19. begin{filecontents}{jobname.cls}
  20. ProvidesClass{jobname}[2018-11-20 v1.0 SE Test package]
  21. RequirePackage{pgfopts}
  22. pgfkeys{
  23. testproj/.cd,
  24. mystuff/.store in = myValue,
  25. mystuff = {} % <-- Set default to empty
  26. }
  27. letzzz @expandtwoargs
  28. def@expandtwoargs#1#2#3{%
  29. edeftmp@zz{noexpandzzznoexpand#1{noexpanddetokenize{#2}}{noexpanddetokenize{#3}}}%
  30. tmp@zz}
  31. ProcessPgfOptions{/testproj}
  32. LoadClass[myValue]{scrartcl} % article is working
  33. let@expandtwoargszzz
  34. endinput
  35. end{filecontents}
  36. documentclass[mystuff={hello=SE,test=1}]{jobname}
  37. %pgfkeys{/testproj/mystuff = {hello=SE}} % <-- working as aspected
  38. begin{document}
  39. myValue: myValue
  40. end{document}
Add Comment
Please, Sign In to add comment