3

The following mwe (a slightly modified example from the genealogytree manual, if I remember correct) produces an ugly line in case a picture is added to a person that is married.

Question: Is it possible to remove (or shorten) the red line only on the right side, where the picture is? If so, how? Thx!

The code:

\documentclass[landscape,paper=a5]{scrartcl}
\usepackage[all]{genealogytree}

\usepackage{mwe}

\begin{document}
\newcommand{\treetitle}{Mr. X}

\begin{tcolorbox}[enhanced,sharp corners,boxrule=0.6pt,left=0pt,right=0pt,
    colback=blue!50!black,interior style image=goldshade.png,
    halign=center,center title,fonttitle=\bfseries,
    title={\treetitle},
    ]
    \begin{genealogypicture}[
        processing=database,
        database format=
            %medium marriage below,
            full marriage below,
        node size=2.4cm,
        level size=3.5cm,
        level distance=6mm,
        list separators hang,
        name font=\bfseries,
        surn code={\textcolor{red!50!black}{#1}},
        place text={\newline}{},
        date format=d.mon.yyyy,
        tcbset={
            male/.style={colframe=blue,colback=blue!5},
            female/.style={colframe=red,colback=red!5}
        },
        box={fit basedim=7pt,boxsep=2pt,segmentation style=solid,
            halign=flush left,before upper=\parskip1pt,
            \gtrDBsex
            ,drop fuzzy shadow,
            if image defined={add to width=25mm,right=25mm,
                underlay={\begin{tcbclipinterior}\path[fill overzoom image=
                        \gtrDBimage
                        ]
                        ([xshift=-24mm]interior.south east) rectangle (interior.north east);
                \end{tcbclipinterior}},
            }{},
        },
        edges=rounded,
        symbols record reset,
%       after tree={\node[font=\scriptsize\itshape,text width=5cm,below left,
%           fill=white,fill opacity=0.4,text opacity=1]
%           at (current bounding box.north east) {
%               \gtrSymbolsFullLegend
%           };},
        ]
        sandclock{
            child{
                g[id=JohnDoe1990]{
                    female,
                    name={\pref{John} \surn{Doe}},
                    birth={1990-01-01}{Springfield},
                    image={example-image-a},
                    marriage={2010-01-01}{Springfield}, %<- causes ugly line
                }
            }
        }
    \end{genealogypicture}
\end{tcolorbox}

\end{document}

enter image description here

lAtExFaN
  • 1,131

1 Answers1

4

The line is defined using the segmentation style key, and you can tell it to shorten the line by the same amount as the xshift in your underlay code. Here's a complete example:

\documentclass[landscape,paper=a5]{scrartcl}
\usepackage[all]{genealogytree}

\usepackage{mwe}

\begin{document}
\newcommand{\treetitle}{Mr. X}

\begin{tcolorbox}[enhanced,sharp corners,boxrule=0.6pt,left=0pt,right=0pt,
    colback=blue!50!black,interior style image=goldshade.png,
    halign=center,center title,fonttitle=\bfseries,
    title={\treetitle},
    ]

    \begin{genealogypicture}[
        processing=database,
        database format=
            %medium marriage below,
            full marriage below,
        node size=2.4cm,
        level size=3.5cm,
        level distance=6mm,
        list separators hang,
        name font=\bfseries,
        surn code={\textcolor{red!50!black}{#1}},
        place text={\newline}{},
        date format=d.mon.yyyy,
        tcbset={
            male/.style={colframe=blue,colback=blue!5},
            female/.style={colframe=red,colback=red!5}
        },
        box={fit basedim=7pt,boxsep=2pt,
            halign=flush left,before upper=\parskip1pt,segmentation style=solid,
            \gtrDBsex
            ,drop fuzzy shadow,
            if image defined={add to width=25mm,right=25mm,segmentation style={solid,shorten >=24mm},
                underlay={\begin{tcbclipinterior}\path[fill overzoom image=
                        \gtrDBimage
                        ]
                        ([xshift=-24mm]interior.south east) rectangle (interior.north east);
                \end{tcbclipinterior}},
            }{},
        },
        edges=rounded,
        symbols record reset,
%       after tree={\node[font=\scriptsize\itshape,text width=5cm,below left,
%           fill=white,fill opacity=0.4,text opacity=1]
%           at (current bounding box.north east) {
%               \gtrSymbolsFullLegend
%           };},
        ]
        sandclock{
            child{
                g[id=JohnDoe1990]{
                    female,
                    name={\pref{John} \surn{Doe}},
                    birth={1990-01-01}{Springfield},
                    image={example-image-a},
                    marriage={2010-01-01}{Springfield}, %<- causes ugly line
                }
            }
        }
    \end{genealogypicture}
\end{tcolorbox}

\end{document}

output of code

Alan Munn
  • 218,180