如何在族谱中描绘两次婚姻

如何在族谱中描绘两次婚姻
\begin{genealogypicture}[timeflow=left,
    processing=database,
    database format=full marriage below,
    date format=d/m/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,
  ]
sandclock
{
  child{
    p{male,
      name=Willy Otto Alfred Scholz,
      birth={1889-02-11}{Moabit, Berlin},
      marriage={1910-11-30}{Heilandkirche, Berlin},
      death+={1914-08-23}{Vedin vor Namur, Belgien}{killed},
      comment={Reservist im Infanterie-Regiment No. 93}
    }
    g{female,
      name={\bf Therese Margarete Agnes Emma Hille},
      birth={1887-09-10}{Dalldorf},
      marriage={1910-11-30}{Heilandkirche, Berlin},
      %marriage={1920-04-30}{Berlin},
      death={1961-09-12}{Hamburg}
    }
    c{female,
      name=Gerda Senta Margot Ilse Scholz,
      birth={1911-06-16}{Berlin}
    }
    c{male,
      name=Werner Karl August Albert Scholz,
      birth={1914-07-12}{Berlin},
      death={1978-08-03}{Hamburg}
      }
    union{
      p{male,
      name=Heinrich Paul Popp,
      birth={1895-01-18}{Schiffbek},
      death={1967-08-31}{Hamburg},
      marriage={1920-04-30}{Berlin},
      comment={Kaufmann}
      }
      c{male,name=Waldemar Popp}
    }
  }
  parent{
    g{male,
    name=Hermann August Albert Hille,
    birth={1858-08-24}{},
    }
  }
  parent{
    g{female,name=Berta Schwarz}
    }
}
\end{genealogypicture}

我想要 Therese 盒子里的 2 个结婚日期。我在手册中找不到解决方案,

答案1

目前还没有一个花哨的命令\declareNewEvent(也许永远不会有?),所以为了显示第二次婚姻,您必须添加几个受包启发的命令并声明一个新的事件,例如“secondMarriage”。

\documentclass{standalone}
\usepackage{tikz}
\usepackage[all]{genealogytree}
%-------------------------------------%
% enter in the @ mode
\makeatletter
% add the new event "secondMarriage"
\gtr@db@new@event@store{secondMarriage}%
% declare a new Database format based on the original one you used to show the new event.
\gtrDeclareDatabaseFormat{full marriage below with second marriage}{}{%
  \gtrPrintName%
  \begin{gtreventlist}%
    \gtr@list@event{birth}%
    \gtr@list@event{baptism}%
    \gtr@list@event{floruit}%
    \gtr@list@event{death}%
    \gtr@list@event{burial}%
  \end{gtreventlist}%
  \gtr@print@infolist%
  \gtr@ifmarriagedefined{%
    \tcbline\begin{gtreventlist}%
      \gtr@list@event{engagement}%
      \gtr@list@event{marriage}%
      \gtr@list@event{divorce}%
      \gtr@list@event{secondMarriage}% this line is the only one added
    \end{gtreventlist}%
  }{}%
}
% leave the @ mode
\makeatother
% declare the symbol used in prefix.
\gtrset{/gtr/event prefix/secondMarriage/.initial=\gtrsymMarried}
%-------------------------------------%
\begin{document}
\begin{genealogypicture}[timeflow=left,
    processing=database,
    database format=full marriage below with second marriage,% don't forget the new format!!!
    date format=d/m/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,
  ]
sandclock
{
  child{
    p{male,
      name=Willy Otto Alfred Scholz,
      birth={1889-02-11}{Moabit, Berlin},
      marriage={1910-11-30}{Heilandkirche, Berlin},
      death+={1914-08-23}{Vedin vor Namur, Belgien}{killed},
      comment={Reservist im Infanterie-Regiment No. 93}
    }
    g{female,
      name={\bf Therese Margarete Agnes Emma Hille},
      birth={1887-09-10}{Dalldorf},
      marriage={1910-11-30}{Heilandkirche, Berlin},
      secondMarriage={1920-04-30}{Berlin},
      death={1961-09-12}{Hamburg}
    }
    c{female,
      name=Gerda Senta Margot Ilse Scholz,
      birth={1911-06-16}{Berlin}
    }
    c{male,
      name=Werner Karl August Albert Scholz,
      birth={1914-07-12}{Berlin},
      death={1978-08-03}{Hamburg}
      }
    union{
      p{male,
      name=Heinrich Paul Popp,
      birth={1895-01-18}{Schiffbek},
      death={1967-08-31}{Hamburg},
      marriage={1920-04-30}{Berlin},
      comment={Kaufmann}
      }
      c{male,name=Waldemar Popp}
    }
  }
  parent{
    g{male,
    name=Hermann August Albert Hille,
    birth={1858-08-24}{},
    }
  }
  parent{
    g{female,name=Berta Schwarz}
    }
}
\end{genealogypicture}
\end{document}

特蕾莎现在已经有了她的第二次婚姻:

在此处输入图片描述

相关内容