Is there any LaTeX package that can be used to draw family tree (hopefully it's relatively easy)?
Something like this:
The rectangle means men, and rounded rectangle means women.
Oh the left, there are numbers which are meant to indicate the number of the generation.
General ⇒ Drawing a Family Tree
Drawing a Family Tree
- Attachments
-
- family.png (15.93 KiB) Viewed 16524 times
- Stefan Kottwitz
- Site Admin
- Posts: 10308
- Joined: Mon Mar 10, 2008 9:44 pm
Drawing a Family Tree
Hi,
you could use TikZ for that. Have a look at the TikZ tree examples. In the TikZ example gallery you can find many more examples.
Stefan
you could use TikZ for that. Have a look at the TikZ tree examples. In the TikZ example gallery you can find many more examples.
Stefan
LaTeX.org admin
- Stefan Kottwitz
- Site Admin
- Posts: 10308
- Joined: Mon Mar 10, 2008 9:44 pm
Drawing a Family Tree
I created an example. I used styles for rectangles and rounded rectangles and for color, of course you can change it to gray. Adjust styles and distances how you like it, you may use this as a start.
Stefan
Code: Select all
Code, edit and compile here:
\documentclass{minimal}\usepackage{tikz}\usetikzlibrary{trees}\begin{document}\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]{Jim}}child[grow=right] {node[woman,anchor=west]{Jane}}child[grow=down,level distance=0ex][edge from parent fork down]% Children and grandchildrenchild{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}}};\end{tikzpicture}\end{document}
LaTeX.org admin
-
- Posts: 1
- Joined: Wed Sep 22, 2021 7:59 am
Drawing a Family Tree
I'm working on a family tree project and found this helpful package built for the task:
https://www.ctan.org/tex-archive/macros ... ealogytree
https://www.ctan.org/tex-archive/macros ... ealogytree