Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. documentclass{article}
  2. makeatletter
  3. defDrawPolygon(#1,#2){%
  4. begingroup
  5. draw(#1)
  6. foreach pt in {#2}{--(pt)}--cycle;%
  7. endgroup
  8. }
  9. makeatother
  10.  
  11. usepackage{tikz}
  12.  
  13.  
  14. begin{document}
  15. begin{tikzpicture}
  16. coordinate (A) at (4,0);
  17. coordinate (B) at (2,4);
  18. coordinate (C) at (0,0);
  19. % DrawPolygon(A,...,C) % error
  20. % now error undefinedifpgffor@alphabeticsequence else ifpgffor@assign@parse begingroup
  21. % ! File ended while scanning use of pgffor@@dotscharcheck.
  22. DrawPolygon(A,B,C)
  23. end{tikzpicture}
  24. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement