Paste Search Dynamic
Recent pastes
pgfkeys
  1. documentclass{article}
  2. usepackage{tikz}
  3. usetikzlibrary{calc}
  4.  
  5. newcommand{background}[1]{%
  6. begin{tikzpicture}[overlay,remember picture]
  7. fill [#1]
  8.         ($ (current page.north west) + (.7cm,-.7cm) $)
  9.         rectangle
  10.         ($ (current page.south east) + (-.7cm,.7cm) $);
  11. end{tikzpicture}
  12. }
  13.  
  14. newcounter{test}
  15. setcounter{test}{1}
  16. newcommand{chooseColor}{ifnumthetest=1 green else red fi}
  17.  
  18. begin{document}
  19. background{green} % everything is good
  20. newpage
  21. background{color/.expanded=chooseColor} % throwing the error shown below
  22. end{document}
Parsed in 0.001 seconds