Guest User

Untitled

a guest
Oct 18th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. % A family tree
  2. % or: an organisational chart
  3. % Author: Stefan Kottwitz , http://texblog.net
  4. documentclass{article}
  5. usepackage{tikz}
  6. %
  7. usetikzlibrary{trees}
  8. begin{document}
  9. begin{tikzpicture}[
  10. man/.style={rectangle,draw,fill=blue!20},
  11. woman/.style={rectangle,draw,fill=red!20,rounded corners=.8ex},
  12. grandchild/.style={grow=down,xshift=1em,anchor=west,
  13. edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}},
  14. first/.style={level distance=6ex},
  15. second/.style={level distance=12ex},
  16. third/.style={level distance=18ex},
  17. level 1/.style={sibling distance=5em}]
  18. % Parents
  19. coordinate
  20. child[grow=left] {node[man,anchor=east]{Jim}}
  21. child[grow=right] {node[woman,anchor=west]{Jane}}
  22. child[grow=down,level distance=0ex]
  23. [edge from parent fork down]
  24. % Children and grandchildren
  25. child{node[man] {Alfred}
  26. child[grandchild,first] {node[man]{Joe}}
  27. child[grandchild,second] {node[woman]{Heather}}
  28. child[grandchild,third] {node[woman] {Barbara}}}
  29. child{node[woman] {Berta}
  30. child[grandchild,first] {node[man]{Howard}}}
  31. child {node[man] {Charles}}
  32. child {node[woman]{Doris}
  33. child[grandchild,first] {node[man]{Nick}}
  34. child[grandchild,second] {node[woman]{Liz}}};
  35. end{tikzpicture}
  36. end{document}
Add Comment
Please, Sign In to add comment