Guest User

Untitled

a guest
May 25th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{pgfplots}
  3. usepackage{etoolbox}
  4.  
  5. begin{document}
  6.  
  7. %Define macro
  8. defmyMacro{
  9.  
  10. %Check for multipart variable definition
  11. ifdef{VariableOne}{
  12. ##1
  13.  
  14. ##2
  15.  
  16. ##3
  17. }{}
  18.  
  19. #1
  20. }
  21.  
  22. %Define multipart variable
  23. defVariableOne#1#2#3{
  24. {1}
  25. {2}
  26. {3}
  27. }
  28. myMacro{4}
  29. end{document}
  30.  
  31. documentclass{article}
  32. usepackage{pgfplots}
  33. usepackage{etoolbox}
  34.  
  35.  
  36. begin{document}
  37. defmyMacro#1{
  38. ifdef{VariableOne}{
  39. foreach x/y/z in VariableOne{
  40. x
  41.  
  42. y
  43.  
  44. z
  45. }
  46. }{}
  47.  
  48. #1
  49. }
  50.  
  51. defVariableOne{1/2/3}
  52.  
  53. myMacro{4}
  54. end{document}
Add Comment
Please, Sign In to add comment