0

I gave up on @thomas-f-sturm's genealogytree library because it does not support the mesh structures.

I migrated to pure TikZ and PGF. I am trying to build a genealogy with paternal and maternal sides, with 18 ascendant generations and 16 descendant generations, and with addition of siblings and their spouses and children, uncles and their spouses, of second spouses for uncles and parents, of grandparents' siblings and their nephews, etc.

I was able to connect the father to the second wife, that is a stepmother, but I was unable to increase the space between the node lines between the second life and the father.

Remember that the image is different because you asked for the minimal and simple MWE code. If you would like that I share the complete code, I can provide you with a shareable link.

Here is the small and simple MWE code:

\documentclass[margin = 10pt, tikz]{standalone}

\usepackage{adjustbox}
\usepackage{etoolbox}
\usepackage{fontspec}
\usepackage[all]{genealogytree}
\usepackage{graphicx}
\usepackage{ifthen}
\usepackage[utf8]{inputenc}
\usepackage{pgffor}
\usepackage{svg}
\usepackage{tcolorbox}
\usepackage{tikz}
\usepackage{xcolor}

\usetikzlibrary{calc, positioning, shapes, shapes.multipart}
\pgfdeclarelayer{background}
\pgfsetlayers{background, main}

\definecolor{art_deco_dark_blue}{HTML}{2E3482}
\definecolor{art_deco_dark_pink}{HTML}{E20042}
\definecolor{art_deco_dark_antique_copper}{HTML}{75524D}
\definecolor{art_deco_light_apple_core_yellow}{HTML}{F3EDD5}

\newlength{\mypxtoin}
\setlength{\mypxtoin}{0.013889in}

\newlength{\mypxtocm}
\setlength{\mypxtocm}{0.026cm}

\newlength{\mypxtopt}
\setlength{\mypxtopt}{0.75pt}

\tikzset
{
    font = \fontsize{11\mypxtopt}{2cm},
    every node/.style = 
    { 
        draw,
        font = \fontsize{12\mypxtopt}{2cm},
        rounded corners = {2\mypxtoin},
        text width = 5cm,
    },
    female/.style = 
    {
        draw = art_deco_dark_pink,
        fill = art_deco_dark_pink!20
    },
    male/.style = 
    {
        draw = art_deco_dark_blue,
        fill = art_deco_dark_blue!20
    },
    neutral/.style = 
    {
        draw = art_deco_dark_antique_copper,
        fill = art_deco_light_apple_core_yellow!20
    }
}

\hbadness = 2300
\hfuzz = 5.5pt

\begin{document}
    \begin{tikzpicture}

        \node[male](01){Me};
        \node[male, below = of 01](02){Brother};
        \node[female, below = of 02](03){Sister};
        \node[female, below = of 03](04){Sister-in-law};
        \node[male, above right = of 01](05){Father};
        \node[female, below right = of 04](06){Mother};
        \node[female, above = of 04](07){Stepmother};

        \coordinate[right = 15pt of 01](aux01);
        \coordinate[right = 15pt of 02](aux02);
        \coordinate[right = 15pt of 03](aux03);
        \coordinate[left = 30pt of 04](aux04);
        \coordinate[right = 15pt of 05](aux05);
        \coordinate[right = 15pt of 06](aux06);
        \coordinate[left = 15pt of 07](aux07);

        \draw (05.west) -| (aux01) |- (06.west);
        \draw (01) -- (aux01);
        \draw (02) -- (aux02);
        \draw (03) -- (aux03);
        \draw (05) -- (aux05);
        \draw (06) -- (aux06);
        \draw (02.west) -| (aux04) |- (04.west);
        \draw (05.west) -| (aux07) |- (07.west);

    \end{tikzpicture}
\end{document}

Observe that 05 and aux05 are the identifiers for the father and 07 and aux07 are for the stepmother, the father's second life.

The \coordinate[left = 15pt of 07](aux07) code indicates that the node line had to be done to the left because she is the second life. I was planning to add a half-brother, and his spouse.

The \draw (05.west) -| (aux07) |- (07.west) code indicates that the father is connected to the stepmother.

Here is the part of the image:

The screenshot of the PDF result

If you would like the complete code with assets, follow the shareable link, click here.


Update 1

what's your problem with the code presented here?

The problem is in the codes \draw (05.west) -| (aux01) |- (06.west) (auto, father, and mother) and \draw (05.west) -| (aux07) |- (07.west) (father and second wife). They have two node lines together, among auto, father, and stepmother. The lines between father and stepmother lines need to be separated by the increased space. I thought to add above or below with 15pt for the coordinates to increase the space, but it did not work. I tried to restyle the level distance, it did not work either.

5
  • 1
    There's a lot going on with your package loading. You're loading fontspec (but don't use it) which indicates XeTeX or LuaTeX, i.e. UTF8 input by default, but you're also loading inputenc which isn't even needed in uptodate TeX distributions for pdfTeX anymore. TikZ loads PGF and PGFFor itself but it's not hurting anyone. You're also still loading genealogytree … Instead of showing us an image from some code where you have a problem … what's your problem with the code presented here? Commented Nov 7, 2023 at 15:42
  • 1
    Yes, I am loading genealogytree for using the birth and death date and place commands and definitions inside a \node inside a tcbincludegraphics with a specific language and a date format, therefore, some genealogytree commands are useful, but I will not use the genealogytree node because of lack of mesh structures. If I want to use only XeLaTeX, will I remove fontspec or inputenc?
    – Oo'-
    Commented Nov 7, 2023 at 15:47
  • 1
    > what's your problem with the code presented here? The problem is in the codes \draw (05.west) -| (aux01) |- (06.west) (auto, father, and mother) and \draw (05.west) -| (aux07) |- (07.west) (father and second wife). They have two node lines together, among auto, father, and stepmother. The lines between father and stepmother lines need to be separated by the increased space. I thought to add above or below with 15pt for the coordinates to increase the space, but it did not work. I tried to restyle the level distance, it did not work either.
    – Oo'-
    Commented Nov 7, 2023 at 15:54
  • 1
    @Oo'-, wrt your update, I'm no sure how you want it to look like. Maybe you can add a sketch created outside of Tikz/Latex? // If you are looking for other connections points try e.g. ([yshift=3mm] 06.west) or (06.178) . The first just shifts the anchor point up, even with losing connection to the node, while the second uses polar coordinates, with 0deg pointing into x-direction. I.e. (06.west) == (06.180). For my small figure it's very sensitive to the angle.
    – MS-SPO
    Commented Nov 7, 2023 at 16:48
  • I took your suggestions. I performed many tests. It turned to be (05.west). I fixed with ([yshift = -5mm] 05.west). Here is the result: imgur.com/a/EjDXcUY.
    – Oo'-
    Commented Nov 7, 2023 at 18:31

1 Answer 1

1

Intermediate compile, no solution yet:

  • commented out what seems to be "nice to have"
  • compiled with pdfLatex

?? What's your problem ??

Hint: I added the node names 01 .. 07 to the texts to better follow your problem description ...

result

\documentclass[margin = 10pt, tikz]{standalone}

%\usepackage{adjustbox}
%\usepackage{etoolbox}
%\usepackage{fontspec}
%\usepackage[all]{genealogytree}
%\usepackage{graphicx}
%\usepackage{ifthen}
%\usepackage[utf8]{inputenc}
%\usepackage{pgffor}
%\usepackage{svg}
%\usepackage{tcolorbox}
%\usepackage{tikz}
\usepackage{xcolor}
%
\usetikzlibrary{calc, positioning, shapes, shapes.multipart}
%\pgfdeclarelayer{background}
%\pgfsetlayers{background, main}
%
\definecolor{art_deco_dark_blue}{HTML}{2E3482}
\definecolor{art_deco_dark_pink}{HTML}{E20042}
\definecolor{art_deco_dark_antique_copper}{HTML}{75524D}
\definecolor{art_deco_light_apple_core_yellow}{HTML}{F3EDD5}
%
\newlength{\mypxtoin}
\setlength{\mypxtoin}{0.013889in}
%
\newlength{\mypxtocm}
\setlength{\mypxtocm}{0.026cm}
%
\newlength{\mypxtopt}
\setlength{\mypxtopt}{0.75pt}

\tikzset
{
    font = \fontsize{11\mypxtopt}{2cm},
    every node/.style = 
    { 
        draw,
        font = \fontsize{12\mypxtopt}{2cm},
        rounded corners = {2\mypxtoin},
        text width = 5cm,
    },
    female/.style = 
    {
        draw = art_deco_dark_pink,
        fill = art_deco_dark_pink!20
    },
    male/.style = 
    {
        draw = art_deco_dark_blue,
        fill = art_deco_dark_blue!20
    },
    neutral/.style = 
    {
        draw = art_deco_dark_antique_copper,
        fill = art_deco_light_apple_core_yellow!20
    }
}

\hbadness = 2300
\hfuzz = 5.5pt

\begin{document}
    \begin{tikzpicture}

        \node[male](01){01 Me};
        \node[male, below = of 01](02){02 Brother};
        \node[female, below = of 02](03){03 Sister};
        \node[female, below = of 03](04){04 Sister-in-law};
        \node[male, above right = of 01](05){05 Father};
        \node[female, below right = of 04](06){06 Mother};
        \node[female, above = of 04](07){07 Stepmother};

        \coordinate[right = 15pt of 01](aux01);
        \coordinate[right = 15pt of 02](aux02);
        \coordinate[right = 15pt of 03](aux03);
        \coordinate[left = 30pt of 04](aux04);
        \coordinate[right = 15pt of 05](aux05);
        \coordinate[right = 15pt of 06](aux06);
        \coordinate[left = 15pt of 07](aux07);

        \draw (05.west) -| (aux01) |- (06.west);
        \draw (01) -- (aux01);
        \draw (02) -- (aux02);
        \draw (03) -- (aux03);
        \draw (05) -- (aux05);
        \draw (06) -- (aux06);
        \draw (02.west) -| (aux04) |- (04.west);
        \draw (05.west) -| (aux07) |- (07.west);

    \end{tikzpicture}
\end{document}
3
  • Yes, the image I posted is different from the image you have just posted because TeX Stack Exchange requires me to provide a minimal and simple code. Therefore, I posted the different code. To get the same image result I posted, you can test the complete code I provide you with, via the shareable link I posted above. Observe that this same minimal and simple code is the same as the complete code, but only the last has a lot of text.
    – Oo'-
    Commented Nov 7, 2023 at 16:13
  • Just test only a few codes mentioned in the update of the question details. No need to read the whole code. As for my problem, check my update text as I updated the question details.
    – Oo'-
    Commented Nov 7, 2023 at 16:13
  • @Oo'-, reading your code is no problem: it's simple enough. Compiling is a problem ...
    – MS-SPO
    Commented Nov 7, 2023 at 16:38

You must log in to answer this question.

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