
우리 집에서는 아버지(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에서 어느 정도 복사되었습니다. 매뉴얼 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}