8

I have genealogy trees too large to fit to a single page but I should be able to break them down to smaller chunks and cross-reference to other pages. How do I typeset those references so that they do not use a bounding box and consume only the space needed for the text?

I have a source code and two pictures to explain what I need. The first picture shows what my example gets me. The second picture shows what I want:

1:

This is a chart produced by code I show here

2:

This is what I want my chart to look like

This is the code that produces the first example:

\documentclass[a4]{book}
\usepackage[all]{genealogytree}
\begin{document}
\begin{tikzpicture}
\gtrset{
  template=database pole,
  level size=1cm,  
}
\genealogytree{
  child{
    g{male,name=father}
    p{female,name=mother}
    c{male,name=page~\pageref{nextpage}} % <== How to change this?
  }
}
\end{tikzpicture}
\clearpage
\label{nextpage}
\null
\end{document}

Very importantly, I need the reference to take up less vertical space than level size as it often fits to the bottom of the page where there's not enough room for another full-sized level.

1 Answer 1

8

You can set a special style for these references, like this:

\documentclass[a4paper]{book}
\usepackage[all]{genealogytree}
\begin{document}
\begin{tikzpicture}
\gtrset{
  template=database pole,
  level size=1cm,  
  ref/.style={
    % partly from template database traditional
    node={box clear,
      box={blanker, top=1mm, bottom=1mm,
        halign=flush center,
        natural height}}},
}

\genealogytree{
  child{
    g{male,name=father}
    p{female,name=mother}
    c[ref]{name={page~\pageref{nextpage}}}
  }
}
\end{tikzpicture}

Next paragraph.

\clearpage
\label{nextpage}
\null
\end{document}

which yields

enter image description here

1
  • This works exactly how I needed it to. Thank you!
    – Frigo
    Feb 2, 2016 at 10:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .