我曾尝试在沙漏家谱的边缘插入结婚日期,但受试对象的父母和祖父母的日期却放在了错误的一侧。
\documentclass[12pt,danish]{article}
\usepackage[all]{genealogytree}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\begin{document}
\begin{genealogypicture}[
timeflow=right, % time flows down
processing=database,
database format=medium no marriage,
node size=2cm, % width of nodes
level size=3.7cm, % height of nodes
level distance=8mm, % generation distance
list separators hang,
name font=\Large,
place text={\newline}{},
date format=d-m-yyyy,
% redefine default setting for female,male,neuter:
tcbset={
female/.style={colback=red!20,arc=1mm},
male/.style={colback=blue!20,sharp corners},
},
box={fit basedim=7pt,boxsep=2pt,segmentation style=solid,
halign=left,before upper=\parskip1pt,
\gtrDBsex,drop fuzzy shadow,
},
%
edges={foreground={black,line width=0.25mm}, % edge settings
background={white,line width=0.5mm}},
% Tried to use pivot without success
%options for node={farfar,far,mig,anne}{pivot},
%Formatting marriage-edge-labels
label database options={place text={(}{)}},
label options={fill=white,rotate=90,node font=\small,inner sep=0.5mm,draw=green!30!black,sloped,anchor=south,auto=true}
]
%%%%%% the graph %%%%%%
sandclock {
child[id=migkirsten,family database={marriage={1961-08-22}{}}]{
g[id=mig]{ %proband
male,
name={Proband},
birth={1937-02-17}{}
}
p[id=kirsten]{
female,
name={Kirsten{}},
birth={1941-03-14}{}
}
c[id=anne]{
female,
name={Anne {}},
birth={1962-01-17}{}
}
c[id=erik]{
male,
name={Erik {}},
birth={1975-09-07}{}
}
}
parent[id=farogmor,family database={marriage={1936-04-30}{}}]{
g[id=far]{
male,
name={Niels },
birth={1908-04-04}{},
death={1962-03-01}{}
}
parent[id=farfarfarmor,family database={marriage={1905-05-28}{}}]{
g[id=farfar]{
male,
name={Anders },
birth={1872-01-14}{},
death={1956-10-17}{}
}
}
parent{
g[id=farmor]{
female,
name={Thyra },
birth={1880-09-05}{},
death={1920-06-01}{}
}
}
}
c[id=ingeborg]{
female,
name={Ingeborg },
birth={1938-08-05}{}
}
parent{
g[id=mor]{
female,
name={Else },
birth={1913-10-29}{},
death={2007-01-04}{}
}
}
}
\end{genealogypicture}
\end{document}
希望有人能告诉我如何将结婚日期从父母一代的左边移到右边。
附加问题:1. 如何让注释掉的枢轴工作(我希望 Anders、Niels、Proband 和 Anne 位于顶部的水平线上)?2. 如何让图片在页面上居中 - 类似于\centerfloat
?
这是当前的家谱。
答案1
主要问题的答案是,父母和祖父母一代的结婚日期没有正确放置。
例如,患儿是migkirsten
正确标记的 ID 家族的父母。患儿也是sandclock
未标记但应标记的家族的孩子1961-08-22
。
此外,Niels 是 ID 为 的家庭的孩子farogmar
,因此应该获得标签1905-05-28
。
最后,有id的家庭farfarfarmor
由一个没有父母的孩子组成Anders
——因此,他的父母的标签悬在空中在左手侧。
以下代码可更正标签:
\documentclass[12pt,danish]{article}
\usepackage[all]{genealogytree}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage[margin=1cm]{geometry}
\begin{document}
\begin{genealogypicture}[
timeflow=right, % time flows down
%show id,
processing=database,
database format=medium no marriage,
node size=2cm, % width of nodes
level size=3.7cm, % height of nodes
level distance=8mm, % generation distance
list separators hang,
name font=\Large,
place text={\newline}{},
date format=d-m-yyyy,
% redefine default setting for female,male,neuter:
tcbset={
female/.style={colback=red!20,arc=1mm},
male/.style={colback=blue!20,sharp corners},
},
box={fit basedim=7pt,boxsep=2pt,segmentation style=solid,
halign=left,before upper=\parskip1pt,
\gtrDBsex,drop fuzzy shadow,
},
%
edges={foreground={black,line width=0.25mm}, % edge settings
background={white,line width=0.5mm}},
% works for me:
options for node={farfar,far,mig,anne}{pivot},
%Formatting marriage-edge-labels
label database options={place text={(}{)}},
label options={fill=white,
rotate=90,
node font=\small,inner sep=0.5mm,
draw=green!30!black,sloped,
anchor=south,
auto=true}
]
%%%%%% the graph %%%%%%
sandclock[family database={marriage={1936-04-30}{}}] {
child[id=migkirsten,family database={marriage={1961-08-22}{}}]{
g[id=mig]{ %proband
male,
name={Proband},
birth={1937-02-17}{}
}
p[id=kirsten]{
female,
name={Kirsten{}},
birth={1941-03-14}{}
}
c[id=anne]{
female,
name={Anne {}},
birth={1962-01-17}{}
}
c[id=erik]{
male,
name={Erik {}},
birth={1975-09-07}{}
}
}
parent[id=farogmor,family database={marriage={1905-05-28}{}}]{
g[id=far]{
male,
name={Niels },
birth={1908-04-04}{},
death={1962-03-01}{}
}
parent[id=farfarfarmor]{
g[id=farfar]{
male,
name={Anders },
birth={1872-01-14}{},
death={1956-10-17}{}
}
}
parent{
g[id=farmor]{
female,
name={Thyra },
birth={1880-09-05}{},
death={1920-06-01}{}
}
}
}
c[id=ingeborg]{
female,
name={Ingeborg },
birth={1938-08-05}{}
}
parent{
g[id=mor]{
female,
name={Else },
birth={1913-10-29}{},
death={2007-01-04}{}
}
}
}
\end{genealogypicture}
\end{document}
得出:
如图所示,枢轴代码对我来说是有效的......
原代码中文字宽度太小,容不下图片,我利用几何包放大文字宽度,让图片全部显示在纸上。