使用数据库显示出生/死亡/结婚地点

使用数据库显示出生/死亡/结婚地点

有没有办法将模板设置为数据库传统格式,在家谱中显示出生/死亡/结婚地点?

演示:

\documentclass{article}
\usepackage[all]{genealogytree}


\begin{document}

    \begin{genealogypicture}[
        template=database traditional,
        database format=full,
        place text={\newline}{},
        date format=dd.mm.yyyy,
        list separators={\par}{ }{}{}
    ]
        sandclock{
          child[id=GauaOsth1805]{
            p[id=OsthJoha1780]{
              female,
              name={\pref{Johanna} Elisabeth Rosina \surn{Osthoff}},
              birth={1780-05-08}{Braunschweig (Niedersachsen)},
              marriage={1805-10-09}{Braunschweig (Niedersachsen)},
              death={1809-10-11}{G\"mottingen (Niedersachsen)},
              comment={ASDF},
          }
            g[id=GauxCarl1777]{
              male,
              name={Johann \pref{Carl Friedrich} \surn{Gau\ss{}}},
              birth={1777-04-30}{Braunschweig (Niedersachsen)},
              death={1855-02-23}{G\"ottingen (Niedersachsen)},
              profession={Mathematiker, Astronom, Geod\"at und Physiker}
    
          }
            c[id=GauxCarl1806]{
              male,
              name={\pref{Carl} Joseph \surn{Gau\ss{}}},
              birth={1806-08-21}{Braunschweig (Niedersachsen)},
              death={1873-07-04}{Hannover (Niedersachsen)},
          }
            c[id=GauxWilh1808]{
              female,
              name={\pref{Wilhelmina} \surn{Gau\ss{}}},
              birth={1808-02-29}{G\"ottingen (Niedersachsen)},
              death={1840-08-12}{T\"ubingen (Baden-W\"urttemberg)},
          }
            c[id=GauxLudw1809]{
              male,
              name={\pref{Ludwig} \surn{Gau\ss{}}},
              birth={1809-09-10}{G\"ottingen (Niedersachsen)},
              death={1810-03-01}{G\"ottingen (Niedersachsen)},
          }
    }
    
}
    \end{genealogypicture}

\end{document}

在此处输入图片描述

答案1

手册的第 12.14 节指出,“使用此 [数据库传统] 模板,只需绘制一个朴素的黑白图即可短的信息就被创造出来。”(强调)

因此,我没有尝试增强数据库传统设置中的数据,而是选择更改默认模板的节点格式。

我查看了包文件gtrlib.templates.code.tex,查看了框结构的定义方式,并复制了部分代码。本质上,我添加了box clear规范box={},删除了template=database traditional设置,然后添加了processing=database设置。

\documentclass{article}
\usepackage[all]{genealogytree}

\begin{document}

    \begin{genealogypicture}[
% ADD BOX SPECIFICATION
    box clear,
    box={blanker,
      top=1mm,bottom=1mm,
      fit basedim=7pt,
      halign=flush center,
      fontupper=\sffamily,
      before upper={\parskip 0.15\tcbfitdim plus 0pt minus 0pt},
%      gtrnodealign
    },
        processing=database,%  <--ADD THIS
%        template=database traditional,% <--REMOVE THIS
        database format=full,
        place text={\newline}{},
        date format=dd.mm.yyyy,
        list separators={\par}{ }{}{}
    ]
        sandclock{
          child[id=GauaOsth1805]{
            p[id=OsthJoha1780]{
              female,
              name={\pref{Johanna} Elisabeth Rosina \surn{Osthoff}},
              birth={1780-05-08}{Braunschweig (Niedersachsen)},
              marriage={1805-10-09}{Braunschweig (Niedersachsen)},
              death={1809-10-11}{G\"mottingen (Niedersachsen)},
              comment={ASDF},
          }
            g[id=GauxCarl1777]{
              male,
              name={Johann \pref{Carl Friedrich} \surn{Gau\ss{}}},
              birth={1777-04-30}{Braunschweig (Niedersachsen)},
              death={1855-02-23}{G\"ottingen (Niedersachsen)},
              profession={Mathematiker, Astronom, Geod\"at und Physiker}
    
          }
            c[id=GauxCarl1806]{
              male,
              name={\pref{Carl} Joseph \surn{Gau\ss{}}},
              birth={1806-08-21}{Braunschweig (Niedersachsen)},
              death={1873-07-04}{Hannover (Niedersachsen)},
          }
            c[id=GauxWilh1808]{
              female,
              name={\pref{Wilhelmina} \surn{Gau\ss{}}},
              birth={1808-02-29}{G\"ottingen (Niedersachsen)},
              death={1840-08-12}{T\"ubingen (Baden-W\"urttemberg)},
          }
            c[id=GauxLudw1809]{
              male,
              name={\pref{Ludwig} \surn{Gau\ss{}}},
              birth={1809-09-10}{G\"ottingen (Niedersachsen)},
              death={1810-03-01}{G\"ottingen (Niedersachsen)},
          }
    }
    
}
    \end{genealogypicture}

\end{document}

在此处输入图片描述

相关内容