
在我的家庭中,我的父親(h1)和母親(w1)離婚後,我的父親與w2再婚。到目前為止,一切都很好。但在譜系樹中我還想加入w2的前任老公(w2-h2)。我怎麼做?我用 進行了嘗試union
,您可以在下面的文件中看到我的嘗試,但我將其註釋掉,因為它在編譯時給了我錯誤。
\documentclass{article}
\usepackage[all]{genealogytree}
\begin{document}
% h=husband
% w=wife
% w2-h1=2nd wife's 1st husband
% c=child
\begin{genealogypicture}
child{
g[male]{h1}
p[female]{w1}
union{
p[female]{w2}
% union{
% p[male]{w2-h2}
% }
c{h1-w2's c}
}
c{w1-h1's c}
}
\end{genealogypicture}
\end{document}
答案1
這是嘗試回答更新的問題。我學到了一個很多從這個帖子。
\documentclass{article}
\usepackage[all]{genealogytree}
\begin{document}
\begin{tikzpicture}
% Tree for the common husband with descendents
% h=husband
% w=wife
% w2-h1=2nd wife's 1st husband
% c=child
\genealogytree{
child{
g[male]{h1}
p[female]{w1}
union{
p[female,id=wife2]{w2}
c{h1-w2's c}
}
c{w1-h1's c}
}
}
\genealogytree[set position=wife at wife2]{
child{
g[female,id=wife]{w2}
p[male]{w2-h2}
}
}
\end{tikzpicture}
\end{document}
回答我對問題第一版的解釋:這或多或少是從 p.1 複製的。手冊第 67 條。
\documentclass{article}
\usepackage[all]{genealogytree}
\begin{document}
\begin{genealogypicture}
child{
p[female]{w1}
g[male]{h1}
c{w1-h1's c}
union{
p[female]{w2}
c{w2-h1's c}
}
}
\end{genealogypicture}
\end{document}
當然,你可以按照如下方式重新排列:
\documentclass{article}
\usepackage[all]{genealogytree}
\begin{document}
\begin{genealogypicture}
child{
g[male]{h1}
union{
p[female]{w1}
c{w1-h1's c}
}
p[female]{w2}
c{w2-h1's c}
}
\end{genealogypicture}
\end{document}
它甚至在極端情況下也能發揮作用。
\documentclass{article}
\usepackage{pdflscape}
\usepackage[all]{genealogytree}
\begin{document}
\begin{landscape}
\begin{genealogypicture}
child{
g[male]{Henry VIII}
union{
p[female]{Catherine of Aragon}
c{Mary I}
}
union{
p[female]{Anne Boleyn}
c{Elizabeth I}
}
union{
p[female]{Jane Seymour}
c{Edward VI}
}
union{
p[female]{Anne of Cleves}
}
union{
p[female]{Catherine Howard}
}
p[female]{Catherine Parr}
}
\end{genealogypicture}
\end{landscape}
\end{document}