Code: Select all
Code, edit and compile here:
\documentclass{beamer}\usepackage{tikz}\usepackage{verbatim}%\usepackage[active,tightpage]{preview}%\PreviewEnvironment{tikzpicture}%\setlength\PreviewBorder{15pt}%\usetheme{default}\usetikzlibrary{trees}\begin{document}\begin{frame}{Hello}A fictionary family tree\begin{center}\begin{tikzpicture}[man/.style={rectangle,draw,fill=blue!20},woman/.style={rectangle,draw,fill=red!20,rounded corners=.8ex},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\coordinatechild[grow=left] {node[man,anchor=east]{Cyrus the Great}}child[grow=right] {node[woman,anchor=west]{Elizabeth}}child[grow=down,level distance=0ex][edge from parent fork down]% Children and grandchildrenchild{node[man] {John the Conqueror}}child{node[man] {Ivan the Terrible}}child {node[woman] {Joanne of Arc}}child {node[man] {Richard Lionheart}}child {node[woman]{Mata Hari}};\end{tikzpicture}\end{center}\end{frame}
1. How to insert linebreaks into the nodes?
2. How to adjust the fonst size?
3. How to adjust the distance between nodes?
Thank you