Example: A family tree

Published 2011-12-31 | Author: Stefan Kottwitz

Posted for discussing and improving on TeX.SX.

Download as: [PDF] [TEX]  •  [Open in writeLaTeX]

A family tree

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de.

% A family tree
% or: an organisational chart
% Author: Stefan Kottwitz , http://texblog.net
  woman/.style={rectangle,draw,fill=red!20,rounded corners=.8ex},
    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
      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}
      child[grandchild,first] {node[man]{Joe}}
      child[grandchild,second] {node[woman]{Heather}}
      child[grandchild,third] {node[woman] {Barbara}}}
    child{node[woman] {Berta}
      child[grandchild,first] {node[man]{Howard}}}
    child {node[man] {Charles}}
    child {node[woman]{Doris}
      child[grandchild,first] {node[man]{Nick}}
      child[grandchild,second] {node[woman]{Liz}}};


  • #1 yanhua, December 28, 2012 at 2:55 p.m.

    Could some one explain that child[grow=down,level distance=0ex] is needed?

Adding comments is currently not enabled.



Preorder discount 35%
coupon code LXCB35

LaTeX Beginners Guide

Limited discount 50%
coupon code tDRet6Y

click here to read whole story

Creative Commons License