Guest User

Untitled

a guest
Jan 18th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. documentclass[tikz]{standalone}
  2. usetikzlibrary{positioning,fit}
  3.  
  4. begin{document}
  5.  
  6. begin{tikzpicture}
  7. node (a) [draw=black] {a};
  8. node (b) [draw=black,on grid,below=of a] {long text};
  9. node (p) [draw=black,fit={(a) (b)}] {};
  10.  
  11. node (c) [draw=red] {c};
  12. node (d) [draw=red,below=of c] {d};
  13. node (q) [right=of p,draw=red,fit={(c) (d)}] {};
  14. end{tikzpicture}
  15. end{document}
  16.  
  17. documentclass[tikz,margin=3mm]{standalone}
  18. usetikzlibrary{fit, positioning}
  19.  
  20. begin{document}
  21.  
  22. begin{tikzpicture}[
  23. node distance = 8mm and 4 mm,
  24. every node/.style = {inner sep=1mm, minimum height=1.5em}
  25. ]
  26. node (a) [draw=black] {a};
  27. node (b) [draw=black,below=of a] {long text};
  28. node (p) [draw=black,fit={(a) (b)}] {};
  29.  
  30. node (c) [draw=red,right=of a |- b] {c};
  31. node (d) [draw=red,below=of c] {d};
  32. node (q) [draw=red,fit={(c) (d)}] {};%right=of p,
  33. end{tikzpicture}
  34. end{document}
Add Comment
Please, Sign In to add comment