-
Notifications
You must be signed in to change notification settings - Fork 26
/
tree-break_text_lines+tree.tex
40 lines (36 loc) · 1.05 KB
/
tree-break_text_lines+tree.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
% https://tex.stackexchange.com/a/50906/173708
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\begin{tikzpicture}[
man/.style={rectangle,
draw,
fill=blue!20,
align=center},
woman/.style={rectangle,
draw,
fill=red!20,
rounded corners=.8ex,
align=center},
grandchild/.style={grow=down,
xshift=1em,
anchor=west,
edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}},
first/.style={level distance=6ex},
second/.style={level distance=12ex},
third/.style={level distance=18ex},
level 1/.style={sibling distance=5em}]
% Parents
\coordinate
child[grow=left] {node[man,anchor=east]{Jim}}
child[grow=right] {node[woman,anchor=west]{Jane}}
child[grow=down,level distance=0ex]
[edge from parent fork down]
% Children and grandchildren
child{node[man] {Alfred \\ 05-04-83}}
child{node[woman] {Berta \\ 05-04-99}}
child {node[man] {Charles \\ 05-04-77}}
child {node[woman]{Doris \\ 05-04-80}};
\end{tikzpicture}
\end{document}