Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[tikz]{standalone}
- usetikzlibrary{positioning,fit}
- begin{document}
- begin{tikzpicture}
- node (a) [draw=black] {a};
- node (b) [draw=black,on grid,below=of a] {long text};
- node (p) [draw=black,fit={(a) (b)}] {};
- node (c) [draw=red] {c};
- node (d) [draw=red,below=of c] {d};
- node (q) [right=of p,draw=red,fit={(c) (d)}] {};
- end{tikzpicture}
- end{document}
- documentclass[tikz,margin=3mm]{standalone}
- usetikzlibrary{fit, positioning}
- begin{document}
- begin{tikzpicture}[
- node distance = 8mm and 4 mm,
- every node/.style = {inner sep=1mm, minimum height=1.5em}
- ]
- node (a) [draw=black] {a};
- node (b) [draw=black,below=of a] {long text};
- node (p) [draw=black,fit={(a) (b)}] {};
- node (c) [draw=red,right=of a |- b] {c};
- node (d) [draw=red,below=of c] {d};
- node (q) [draw=red,fit={(c) (d)}] {};%right=of p,
- end{tikzpicture}
- end{document}
Add Comment
Please, Sign In to add comment