Guest User

Untitled

a guest
Jan 16th, 2019
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. documentclass{article}
  2.  
  3. usepackage{tikz}
  4.  
  5. usetikzlibrary{%
  6. backgrounds,%
  7. }
  8.  
  9. tikzset{
  10. medium/.style={line width=2.5pt},
  11. thin/.style={line width=0.5pt},
  12. every picture/.append style={medium},
  13. every scope/.style={medium},
  14. every on background layer/.style={every picture},
  15. }
  16.  
  17. pgfdeclarelayer{background}
  18. pgfdeclarelayer{foreground}
  19. pgfsetlayers{background,main,foreground}
  20.  
  21. begin{document}
  22. 1 begin{tikzpicture}
  23. draw (0,0) -- (1,1);
  24. begin{scope}[on background layer]
  25. draw [red] (0,1) -- (1,0);
  26. end{scope}
  27. draw (0,0) -- (1,0.5);
  28. end{tikzpicture}
  29. quad
  30. 2 begin{tikzpicture}
  31. draw (0,0) -- (1,1);
  32. begin{pgfonlayer}{background}
  33. draw [red] (0,1) -- (1,0);
  34. end{pgfonlayer}
  35. draw (0,0) -- (1,0.5);
  36. end{tikzpicture}
  37. quad
  38. 3 begin{tikzpicture}
  39. draw (0,0) -- (1,1);
  40. begin{scope}
  41. begin{pgfonlayer}{background}
  42. begin{scope}
  43. draw [red] (0,1) -- (1,0);
  44. end{scope}
  45. end{pgfonlayer}
  46. end{scope}
  47. draw (0,0) -- (1,0.5);
  48. end{tikzpicture}
  49. quad
  50. 4 begin{tikzpicture}
  51. draw (0,0) -- (1,1);
  52. begin{pgfonlayer}{foreground}
  53. draw [red] (0,1) -- (1,0);
  54. end{pgfonlayer}
  55. draw (0,0) -- (1,0.5);
  56. end{tikzpicture}
  57. quad
  58. 5 begin{tikzpicture}
  59. draw (0,0) -- (1,1);
  60. begin{pgfonlayer}{foreground}
  61. begin{scope}
  62. draw [red] (0,1) -- (1,0);
  63. end{scope}
  64. end{pgfonlayer}
  65. draw (0,0) -- (1,0.5);
  66. end{tikzpicture}
  67. quad
  68. 6 begin{tikzpicture}
  69. draw (0,0) -- (1,1);
  70. begin{scope}
  71. begin{pgfonlayer}{foreground}
  72. begin{scope}
  73. draw [red] (0,1) -- (1,0);
  74. end{scope}
  75. end{pgfonlayer}
  76. end{scope}
  77. draw (0,0) -- (1,0.5);
  78. end{tikzpicture}
  79. end{document}
Add Comment
Please, Sign In to add comment