diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
19 files changed, 1497 insertions, 78 deletions
diff --git a/Master/texmf-dist/tex/latex/genealogytree/genealogytree.sty b/Master/texmf-dist/tex/latex/genealogytree/genealogytree.sty index 4c5ab211766..d4ec5617729 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/genealogytree.sty +++ b/Master/texmf-dist/tex/latex/genealogytree/genealogytree.sty @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% genealogytree.sty: genealogy trees (graphs) %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -18,10 +18,12 @@ %% This work consists of all files listed in README %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{genealogytree}[2019/04/08 version 1.32 genealogy trees] -\def\gtr@version{1.32} +\ProvidesPackage{genealogytree}[2020/06/19 version 2.00 genealogy trees] +\def\gtr@version{2.00} -\RequirePackage{tcolorbox}[2018/03/22] +\RequirePackage{expl3}[2020/02/25] +\RequirePackage{xparse} +\RequirePackage{tcolorbox}[2020/04/28] \tcbuselibrary{skins,fitting,external} \usetikzlibrary{arrows.meta} @@ -137,8 +139,9 @@ \gtr@add@library{debug}{gtrlib.debug.code.tex} \gtr@add@library{templates}{gtrlib.templates.code.tex} +\gtr@add@library{fanchart}{gtrlib.fanchart.code.tex} -\gtr@add@library@style{all}{debug,templates} +\gtr@add@library@style{all}{debug,templates,fanchart} \ProcessOptions* diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.contour.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.contour.code.tex index 1a5661e6399..ed8fdc948e0 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.contour.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.contour.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrcore.contour.code.tex: Contours %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} %%%%%%%%%%%%%%%%%%%%%%% %% Contour diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.drawing.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.drawing.code.tex index ba6789f66f4..33ccb6edcd8 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.drawing.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.drawing.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrcore.drawing.code.tex: Drawing %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,112 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Auxiliary Tools +%%%%%%%%%%%%%%%%%%%%%%% + +\ExplSyntaxOn + +\cs_new:Npn \__getree_autosize_box:Nnn #1#2#3 + { + \fp_set:Nn \l_tmpa_fp {#2} + \fp_set:Nn \l_tmpb_fp {#3} + \bool_if:nTF { \fp_compare_p:n { \l_tmpa_fp > 0 } && \fp_compare_p:n { \l_tmpa_fp < \maxdimen } } + { + \bool_if:nTF { \fp_compare_p:n { \l_tmpb_fp > 0 } && \fp_compare_p:n { \l_tmpb_fp < \maxdimen } } + { + \box_autosize_to_wd_and_ht_plus_dp:Nnn #1 {\fp_to_dim:N\l_tmpa_fp} {\fp_to_dim:N\l_tmpb_fp} + } + { + \box_resize_to_wd:Nn #1 {\fp_to_dim:N\l_tmpa_fp} + } + } + { + \bool_if:nT { \fp_compare_p:n { \l_tmpb_fp > 0 } && \fp_compare_p:n { \l_tmpb_fp < \maxdimen } } + { + \box_resize_to_ht_plus_dp:Nn #1 {\fp_to_dim:N\l_tmpb_fp} + } + } + } + + +\cs_new:Npn \__getree_autosize_box_shrink:Nnn #1#2#3 + { + \fp_set:Nn \l_tmpa_fp {#2} + \fp_set:Nn \l_tmpb_fp {#3} + \bool_if:nTF { \fp_compare_p:n { \l_tmpa_fp > 0 } && \fp_compare_p:n { \l_tmpa_fp < \maxdimen } } + { + \bool_if:nTF { \fp_compare_p:n { \l_tmpb_fp > 0 } && \fp_compare_p:n { \l_tmpb_fp < \maxdimen } } + { + \bool_if:nT { \fp_compare_p:n { \l_tmpa_fp < \box_wd:N #1 } || \fp_compare_p:n { \l_tmpb_fp < \box_ht:N #1 + \box_dp:N #1 } } + { + \box_autosize_to_wd_and_ht_plus_dp:Nnn #1 {\fp_to_dim:N\l_tmpa_fp} {\fp_to_dim:N\l_tmpb_fp} + } + } + { + \bool_if:nT { \fp_compare_p:n { \l_tmpa_fp < \box_wd:N #1 } } + { + \box_resize_to_wd:Nn #1 {\fp_to_dim:N\l_tmpa_fp} + } + } + } + { + \bool_if:nT { \fp_compare_p:n { \l_tmpb_fp > 0 } && \fp_compare_p:n { \l_tmpb_fp < \maxdimen } } + { + \bool_if:nT { \fp_compare_p:n { \l_tmpb_fp < \box_ht:N #1 + \box_dp:N #1 } } + { + \box_resize_to_ht_plus_dp:Nn #1 {\fp_to_dim:N\l_tmpb_fp} + } + } + } + } + + +\NewDocumentCommand \gtrautosizebox { smmm } + { + \hbox_set:Nn \l_tmpa_box {#4} + \IfBooleanTF {#1} + { + \__getree_autosize_box_shrink:Nnn \l_tmpa_box {#2} {#3} + } + { + \__getree_autosize_box:Nnn \l_tmpa_box {#2} {#3} + } + \hbox_unpack_drop:N \l_tmpa_box + } + + +\NewDocumentEnvironment { autosizetikzpicture } { O{} m m +b } + { + \hbox_set:Nn \l_tmpa_box + { + \begin{tikzpicture}[#1] + #4 + \end{tikzpicture} + } + \__getree_autosize_box:Nnn \l_tmpa_box {#2} {#3} + \hbox_unpack_drop:N \l_tmpa_box + }{} + + +\NewDocumentEnvironment { autosizetikzpicture* } { O{} m m +b } + { + \hbox_set:Nn \l_tmpa_box + { + \begin{tikzpicture}[#1] + #4 + \end{tikzpicture} + } + \__getree_autosize_box_shrink:Nnn \l_tmpa_box {#2} {#3} + \hbox_unpack_drop:N \l_tmpa_box + }{} + + +\ExplSyntaxOff + + %%%%%%%%%%%%%%%%%%%%%%% %% Drawing @@ -49,7 +154,6 @@ Alternatively, use genealogypicture (see documentation).}% \fi% \gtr@reset@before@parser% - \tcb@layer@pushup% \gtr@parsegraph[#1]{#2}% \gtrkv@after@parser% % @@ -461,6 +565,7 @@ \gtrset{% use family database, database format=marriage, + list separators={}{, }{}{}, code={\pgfkeysalsofrom{\gtrkv@database@label}}, }% \gtr@forall@families{\gtr@draw@family}% diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.node.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.node.code.tex index e7af7f9fe9e..956bb073037 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.node.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.node.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrcore.node.code.tex: Node Boxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} %%%%%%%%%%%%%% % Processors % @@ -199,15 +199,21 @@ \x% } -\gtr@db@new@store{name} -\gtr@db@new@store{shortname} +\gtr@db@new@store{age} \gtr@db@new@store{comment} +\gtr@db@new@store{imageopt} +\gtr@db@new@store{kekule} +\gtr@db@new@store{name} \gtr@db@new@store{profession} +\gtr@db@new@store{relation} +\gtr@db@new@store{relationship} \gtr@db@new@store{sex} +\gtr@db@new@store{shortname} \gtr@db@new@store{uuid} -\gtr@db@new@store{kekule} -\gtr@db@new@store{relationship} -\gtr@db@new@store{imageopt} + +\pgfkeys{/gtr/database/relation/.append code=\xdef\gtr@flag@node@r{#1}} +\pgfkeys{/gtr/database/sex/.append code=\xdef\gtr@flag@node@s{#1}} + \def\gtr@db@new@event@store#1{% \begingroup\edef\x{\endgroup\noexpand\gtrset{% @@ -237,6 +243,10 @@ neuter/.style={sex=neuter}, viewport/.style={imageopt={viewport=#1,clip}}, db@reset/.style={name=,shortname=,sex=neuter}, + ancestor/.style={relation=ancestor}, + descendant/.style={relation=descendant}, + sibling/.style={relation=sibling}, + unrelated/.style={relation=unrelated}, } \tcbset{% @@ -613,7 +623,11 @@ %%%%%%%%%%%%%%%%%%%%%% -% Comment, Profession and Places % +% Age, Comment, Profession and Places % + +\def\gtrifagedefined#1#2{% + \ifdefvoid{\gtrDBage}{#2}{#1}% +} \def\gtrifcommentdefined#1#2{% \ifdefvoid{\gtrDBcomment}{#2}{#1}% @@ -1276,6 +1290,7 @@ event code/.code={\def\gtrPrintEvent##1{#1}}, comment code/.code={\def\gtrPrintComment{#1}}, profession code/.code={\def\gtrPrintProfession{#1}}, + age code/.code={\def\gtrPrintAge{#1}}, date format/.is choice, calendar print/.is choice, calendar print/all/.code={\let\gtr@print@date@single@calendar\gtr@print@date@single@calendar@all}, @@ -1300,6 +1315,7 @@ calendar print=all but AD, event text={}{~}{ }{}, event format=prefix date place, + age code={[\gtrDBage]}, comment code={\hspace{0pt}{\itshape\gtrDBcomment}}, profession code={\hspace{0pt}{\itshape\gtrDBprofession}}, } diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.options.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.options.code.tex index b2a97d807c5..7dc7f3c2328 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.options.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.options.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrcore.options.code.tex: Options %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} %%%%%%%%%%%%%%%%%%%%%%% %% General handling @@ -242,6 +242,17 @@ \gtr@parse@init@hook{gtr@parse@endfamily@hook}{gtr@fam@\gtr@currentfamily @id}% \gtr@parse@appto@hook{gtr@parse@endfamily@hook}{#1}{#2}% }, + insert for childless families level limit/.store in=\gtr@childlesschild@levellimit, + insert for childless families/.code={% + \ifblank{#1}% + {\def\gtr@parse@childlesschild@hook{}}% + {\long\def\gtr@parse@childlesschild@hook{% + \ifnum\gtr@c@level>\gtr@childlesschild@levellimit\relax% + \ifcsundef{gtr@fam@\gtr@currentfamily @patchi}{\gtr@parse@graph #1x}{}% + \fi% + }}% + }, + insert phantom for childless families/.style={insert for childless families={c[phantom]{}}}, % family/.style={#1}, subtree/.style={#1}, @@ -329,14 +340,15 @@ ignore subtree/.code={\gtrignoresubtree{#1}}, ignore node/.code={\gtrignorenode{#1}}, ignore level/.code={% - \ifnum#1>0% + \ifnum#1>0\relax% \gtrset{level #1/.style={node=ignore}}% \edef\gtrtemp{\the\numexpr#1+1\relax}% \gtrset{level \gtrtemp/.style=ignore}% - \else\ifnum#1<0% + \else\ifnum#1<0\relax% \gtrset{level #1/.style={ignore,node=ignore}}% \fi\fi% }, + ignore parent childs/.code={\let\gtr@parent@@c\gtr@parent@@c@ignore}, % edges/.code={\gtredgeset{#1}}, family edges/.style={family={edges={#1}}}, @@ -379,6 +391,43 @@ phantom*/.default=, phantom/.style={phantom*={#1},subtree=disconnect}, phantom/.default=, + complemented phantom/.style={complemented/.style={phantom}}, + autofill parents male female*/.code={% + \def\gtr@complementparents@levellimit{#1}% + \let\gtr@parse@complementparents@hook\gtr@parse@complementparents@malefemale% + \let\gtr@parent@@p\gtr@parent@@p@malefemale% + }, + autofill parents male female*/.default=5, + autofill parents male female/.style={% + autofill parents male female*={#1}, + ignore level={\the\numexpr#1+1\relax}, + }, + autofill parents male female/.default=5, + autofill parents female male*/.code={% + \def\gtr@complementparents@levellimit{#1}% + \let\gtr@parse@complementparents@hook\gtr@parse@complementparents@femalemale% + \let\gtr@parent@@p\gtr@parent@@p@femalemale% + }, + autofill parents female male/.style={% + autofill parents female male*={#1}, + ignore level={\the\numexpr#1+1\relax}, + }, + autofill parents female male/.default=5, + autofill parents unspecific*/.code={% + \def\gtr@complementparents@levellimit{#1}% + \let\gtr@parse@complementparents@hook\gtr@parse@complementparents@unspecific% + \let\gtr@parent@@p\gtr@parent@@p@unspecific% + }, + autofill parents unspecific*/.default=5, + autofill parents unspecific/.code={% + autofill parents unspecific*={#1}, + ignore level={\the\numexpr#1+1\relax}, + }, + autofill parents unspecific/.default=5, + autofill parents none/.code={% + \def\gtr@parse@complementparents@hook{}% + \let\gtr@parent@@p\gtr@parent@@p@normal% + }, } \pgfkeys{/gtr/edge/.is family} @@ -473,6 +522,7 @@ proband level=0, tree offset=0pt, level/.style=, + complemented/.style=, box clear, processing=fit, edges={perpendicular,foreground=,background=,anchoring=periphery,hide single leg,xshift=0pt,yshift=0pt}, @@ -486,6 +536,9 @@ label options=, label database options=, no content interpreter, + insert for childless families=, + insert for childless families level limit=-2147483647, + autofill parents none, }, reset } diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.parser.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.parser.code.tex index 27e1cdaaf38..579be1f91ab 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.parser.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.parser.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrcore.parser.code.tex: Parser %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} %% (local) stack implementation \def\gtrnewstack#1{% @@ -209,11 +209,16 @@ \fi% } + \def\gtr@pparse@c{\@ifnextchar[{\gtr@parent@@c}{\gtr@parent@@c[]}} \long\def\gtr@parent@@c[#1]#2{% \gtr@trav@@c[#1]{#2}% \gtr@parse@graphwithhandle{\gtr@handle@continue@parent}% } +\long\def\gtr@parent@@c@ignore[#1]#2{% + \gtr@parse@graphwithhandle{\gtr@handle@continue@parent}% +} + \def\gtr@pparse@p{% \@ifnextchar a{\gtr@pparse@parent@}{\gtr@pparse@p@}} @@ -223,10 +228,37 @@ \gtr@parse@graphwithhandle{\gtr@handle@continue@parent}% } \def\gtr@pparse@p@{\@ifnextchar[{\gtr@parent@@p}{\gtr@parent@@p[]}} -\long\def\gtr@parent@@p[#1]#2{% + + +\long\def\gtr@parent@@p@normal[#1]#2{% \gtr@trav@@p[#1]{#2}% \gtr@parse@graphwithhandle{\gtr@handle@continue@parent}% } +\long\def\gtr@parent@@p@malefemale[#1]#2{% + \ifnum\gtr@c@level<\gtr@complementparents@levellimit\relax% + \gtr@trav@@complementedparent{g[#1]{#2}p[c@mpl@m@nt@d,complemented]{male}p[c@mpl@m@nt@d,complemented]{female}}% + \else% + \gtr@trav@@p[#1]{#2}% + \fi% + \gtr@parse@graphwithhandle{\gtr@handle@continue@parent}% +} +\long\def\gtr@parent@@p@femalemale[#1]#2{% + \ifnum\gtr@c@level<\gtr@complementparents@levellimit\relax% + \gtr@trav@@complementedparent{g[#1]{#2}p[c@mpl@m@nt@d,complemented]{female}p[c@mpl@m@nt@d,complemented]{male}}% + \else% + \gtr@trav@@p[#1]{#2}% + \fi% + \gtr@parse@graphwithhandle{\gtr@handle@continue@parent}% +} +\long\def\gtr@parent@@p@unspecific[#1]#2{% + \ifnum\gtr@c@level<\gtr@complementparents@levellimit\relax% + \gtr@trav@@complementedparent{g[#1]{#2}p[c@mpl@m@nt@d,complemented]{}p[c@mpl@m@nt@d,complemented]{}}% + \else% + \gtr@trav@@p[#1]{#2}% + \fi% + \gtr@parse@graphwithhandle{\gtr@handle@continue@parent}% +} + \def\gtr@pparse@g{\@ifnextchar[{\gtr@parent@@g}{\gtr@parent@@g[]}} \long\def\gtr@parent@@g[#1]#2{% @@ -387,7 +419,7 @@ \def\gtr@previous@family{% \let\gtr@lastfamily=\gtr@currentfamily% - \ifnum\gtr@famstack@size>0% + \ifnum\gtr@famstack@size>0\relax% \gtr@famstack@popto{\gtr@currentfamily}% \else% \let\gtr@currentfamily=\@undefined% @@ -448,6 +480,24 @@ \gtr@parse@beginfamily@hook% \gtr@parse@graphwithhandle{\gtr@handle@continue@parent}#2x% \gtr@parse@endfamily@hook% + \gtr@parse@complementparents@hook% + \gtr@proc@@parent@end% + \fi% + \gtr@previous@family% + \gtr@down@level@pop% + \gtr@parse@afterfamily@hook% +} + +\long\def\gtr@trav@@complementedparent#1{% + \gtr@up@level@push% + \gtr@next@family% + \gtr@proc@@parent@begin{}% + \ifgtr@ignore% + \advance\gtr@c@family -1\relax% + \else% + \gtr@parse@beginfamily@hook% + \gtr@parse@graph #1x% + \gtr@parse@endfamily@hook% \gtr@proc@@parent@end% \fi% \gtr@previous@family% @@ -465,6 +515,7 @@ \gtr@parse@beginfamily@hook% \gtr@parse@graphwithhandle{\gtr@handle@continue@child}#2x% \gtr@parse@endfamily@hook% + \gtr@parse@childlesschild@hook% \gtr@proc@@child@end% \fi% \gtr@previous@family% @@ -512,6 +563,27 @@ #3% \fi% } +% \long\def\gtr@trav@@add@node@malefemale#1#2#3{% + % \gdef\gtr@gtrav@mark{m}% + % \gtr@proc@add@node{#1}{#2}% + % \ifgtr@ignore% + % \advance\gtr@c@pid -1\relax% + % \else% + % \csedef{gtr@per@\gtr@currentperson @mark}{\gtr@gtrav@mark}% + % #3% + % \fi% +% } +% \long\def\gtr@trav@@add@node@femalemale#1#2#3{% + % \gdef\gtr@gtrav@mark{f}% + % \gtr@proc@add@node{#1}{#2}% + % \ifgtr@ignore% + % \advance\gtr@c@pid -1\relax% + % \else% + % \csedef{gtr@per@\gtr@currentperson @mark}{\gtr@gtrav@mark}% + % #3% + % \fi% +% } + \long\def\gtr@trav@@parent@g[#1]#2{% \gtr@down@level@push% @@ -595,6 +667,7 @@ \gtr@parse@afternode@hook% } + %%%%%%%%%%%%%%%%%%%%%%% %% Hooks %%%%%%%%%%%%%%%%%%%%%%% @@ -615,6 +688,121 @@ }}\x% } + +%%%%%%%%%%%%%%%%%%%%%%% +%% Parent Autofill +%%%%%%%%%%%%%%%%%%%%%%% + +% precondition: list with exact 2 parents +\def\gtr@parse@toggle@parents{% + \letcs\gtr@currentparentlist{gtr@fam@\gtr@currentfamily @par}% + \def\dodo##1{% + \def\gtr@tempB{##1}% + }% + \def\do##1{% + \def\gtr@tempA{##1}% + \let\do\dodo% + }% + \dolistloop{\gtr@currentparentlist}% + \csundef{gtr@fam@\gtr@currentfamily @par}% + \listcseadd{gtr@fam@\gtr@currentfamily @par}{\gtr@tempB}% + \listcseadd{gtr@fam@\gtr@currentfamily @par}{\gtr@tempA}% + \letcs\gtr@currentparentlist{gtr@fam@\gtr@currentfamily @par}% +} + +\def\gtr@parse@complementparents@malefemale{% + \ifnum\gtr@c@level>\gtr@complementparents@levellimit\relax% + \else% + \ifcsdef{gtr@fam@\gtr@currentfamily @par}% + {% + \def\dodo##1{% + \let\gtr@parse@do@complementparents\@secondoftwo% + }% + \def\do##1{% + \let\gtr@parse@do@complementparents\@firstoftwo% + \letcs\gtr@temp{gtr@per@##1@flag@s}% + \let\do\dodo% + }% + \dolistcsloop{gtr@fam@\gtr@currentfamily @par}% + \gtr@parse@do@complementparents% + {% + \ifdefstring{\gtr@temp}{female}% + { + \gtr@parse@graph p[c@mpl@m@nt@d,complemented]{male}x + \gtr@parse@toggle@parents% + }% + { + \gtr@parse@graph p[c@mpl@m@nt@d,complemented]{female}x + }% + }{% + \ifdefstring{\gtr@temp}{female}{\gtr@parse@toggle@parents}{}% + }% + }% + {% + \gtr@parse@graph p[c@mpl@m@nt@d,complemented]{male}p[c@mpl@m@nt@d,complemented]{female}x + }% + \fi% +} + +\def\gtr@parse@complementparents@femalemale{% + \ifnum\gtr@c@level>\gtr@complementparents@levellimit\relax% + \else% + \ifcsdef{gtr@fam@\gtr@currentfamily @par}% + {% + \def\dodo##1{% + \let\gtr@parse@do@complementparents\@secondoftwo% + }% + \def\do##1{% + \let\gtr@parse@do@complementparents\@firstoftwo% + \letcs\gtr@temp{gtr@per@##1@flag@s}% + \let\do\dodo% + }% + \dolistcsloop{gtr@fam@\gtr@currentfamily @par}% + \gtr@parse@do@complementparents% + {% + \ifdefstring{\gtr@temp}{male}% + { + \gtr@parse@graph p[c@mpl@m@nt@d,complemented]{female}x + \gtr@parse@toggle@parents% + }% + { + \gtr@parse@graph p[c@mpl@m@nt@d,complemented]{male}x + }% + }{% + \ifdefstring{\gtr@temp}{male}{\gtr@parse@toggle@parents}{}% + }% + }% + {% + \gtr@parse@graph p[c@mpl@m@nt@d,complemented]{female}p[c@mpl@m@nt@d,complemented]{male}x + }% + \fi% +} + +\def\gtr@parse@complementparents@unspecific{% + \ifnum\gtr@c@level>\gtr@complementparents@levellimit\relax% + \else% + \ifcsdef{gtr@fam@\gtr@currentfamily @par}% + {% + \def\dodo##1{% + \let\gtr@parse@do@complementparents\@secondoftwo% + }% + \def\do##1{% + \let\gtr@parse@do@complementparents\@firstoftwo% + \let\do\dodo% + }% + \dolistcsloop{gtr@fam@\gtr@currentfamily @par}% + \gtr@parse@do@complementparents% + {% + \gtr@parse@graph p[c@mpl@m@nt@d,complemented]{}x + }{}% + }% + {% + \gtr@parse@graph p[c@mpl@m@nt@d,complemented]{}p[c@mpl@m@nt@d,complemented]{}x + }% + \fi% +} + + %%%%%%%%%%%%%%%%%%%%%%% %% Information %%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.processing.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.processing.code.tex index 2e5f25cac89..38ef43851e9 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.processing.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.processing.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrcore.processing.code.tex: Processing %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} %%%%%%%%%%%%%%%%%%%%%%% %% Processing - common %%%%%%%%%%%%%%%%%%%%%%% @@ -72,11 +72,7 @@ }% % \global\gtr@ignorefalse% - \gtrset{level=\number\gtr@c@level}% - \pgfkeysifdefined{/gtr/level \number\gtr@c@level/.@cmd}{% - \gtrset{level \number\gtr@c@level}% - }{% - }% + \gtrset{level=\number\gtr@c@level,level \number\gtr@c@level/.try}% \ifgtr@ignore% \global\def\gtr@gkv@opt@ignore@level{ignore}% \else% @@ -119,7 +115,7 @@ \def\gtr@proc@@set@enc@family{% - \ifnum\gtr@famstack@size>0% + \ifnum\gtr@famstack@size>0\relax% \gtr@famstack@peekto{\gtr@encfamily}% \csedef{gtr@fam@\gtr@currentfamily @fam}{\gtr@encfamily}% \fi% @@ -236,7 +232,7 @@ \def\gtr@proc@@parent@end{% \ifcsname gtr@fam@\gtr@currentfamily @g\endcsname% - \else\gtr@error{No g-node in parent family (\gtr@currentfamily)}{Every family need a g-node}% + \else\gtr@error{No g-node in parent family (\gtr@currentfamily)}{Every family needs a g-node}% \fi% \gtr@proc@pivot@reset% \csdef{gtr@fam@\gtr@currentfamily @frac}{0.5}% @@ -453,7 +449,7 @@ \gtr@add@child{\gtr@currentperson}{\gtr@currentfamily}% \gtr@add@gnode{\gtr@currentperson}{\gtr@currentfamily}% \gtr@add@family{\gtr@currentperson}{\gtr@currentfamily}% - \ifnum\gtr@famstack@size>0% + \ifnum\gtr@famstack@size>0\relax% \gtr@famstack@peekto{\gtr@childfamily}% \gtr@add@parent{\gtr@currentperson}{\gtr@childfamily}% \fi% @@ -463,7 +459,7 @@ \gtr@add@parent{\gtr@currentperson}{\gtr@currentfamily}% \gtr@add@gnode{\gtr@currentperson}{\gtr@currentfamily}% \gtr@add@family{\gtr@currentperson}{\gtr@currentfamily}% - \ifnum\gtr@famstack@size>0% + \ifnum\gtr@famstack@size>0\relax% \gtr@famstack@peekto{\gtr@parentfamily}% \gtr@add@child{\gtr@currentperson}{\gtr@parentfamily}% \fi% @@ -485,12 +481,13 @@ linked@family@options/c/.code={}, linked@family@options/pc/.code={}, linked@family@options/gc/.code={}, + c@mpl@m@nt@d/.code={\gdef\gtr@flag@node@c{true}}, } \def\gtr@linked@family@options@p{} \def\gtr@linked@family@options@c{} \def\gtr@linked@family@options@g{% - \ifnum\gtr@famstack@size>0% + \ifnum\gtr@famstack@size>0\relax% \gtr@famstack@peekto{\gtr@linkedfamily}% \gtr@cs@keysalsofrom{gtr@fam@\gtr@linkedfamily @opt@family}% \fi% @@ -505,6 +502,9 @@ \begingroup% \begin{pgfinterruptpicture}% \global\gtr@ignorefalse% + \gdef\gtr@flag@node@c{false}% + \gdef\gtr@flag@node@r{unrelated}% + \gdef\gtr@flag@node@s{neuter}% \gtrset{id=,distance=-1sp,pivot=none,tikz=, code={% \gtr@cs@keysalsofrom{gtr@fam@\gtr@currentfamily @opt@subtree}% @@ -523,6 +523,9 @@ }% \unless\ifgtr@ignore% \csedef{gtr@per@\gtr@currentperson @id}{\gtr@gkv@id}% + \csedef{gtr@per@\gtr@currentperson @flag@c}{\gtr@flag@node@c}% + \csedef{gtr@per@\gtr@currentperson @flag@r}{\gtr@flag@node@r}% + \csedef{gtr@per@\gtr@currentperson @flag@s}{\gtr@flag@node@s}% \ifdim\gtr@gkv@distance>-1sp\relax% \csedef{gtr@per@\gtr@currentperson @distance}{\gtr@gkv@distance}% \fi% diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.symbols.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.symbols.code.tex index a21f2f7d0d2..a4587240b8a 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.symbols.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.symbols.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrcore.symbols.code.tex: Symbols %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} %%%%%%%%%%%%%%%%%%%%%%% %% Symbols diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.danish.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.danish.code.tex index 9400fea318b..dc128db8cfb 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.danish.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.danish.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrlang.danish.code.tex: Danish language %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% Translation by Mikkel Eide Eriksen <mikkel dot eriksen at gmail dot com> %% ------------------------------------------------------------------------------------------- %% @@ -18,7 +18,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} \gtrset{language@/danish/.code={% \gtrset{symlang/.cd, diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.dutch.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.dutch.code.tex index fc37668f300..6a1fd02d0be 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.dutch.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.dutch.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrlang.dutch.code.tex: Dutch language %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% Translation by Dirk Bosmans <onstrees at myonline be> %% ------------------------------------------------------------------------------------------- %% @@ -18,7 +18,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} \gtrset{language@/dutch/.code={% \gtrset{symlang/.cd, diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.english.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.english.code.tex index 937e86bf347..2d3654f12cd 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.english.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.english.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrlang.english.code.tex: English language %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} \gtrset{language@/english/.code={% \gtrset{symlang/.cd, diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.french.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.french.code.tex index 19181a54bed..54b083c9ff9 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.french.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.french.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrlang.french.code.tex: French language %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% Translation by Denis Bitouze <denis dot bitouze at univ-littoral fr> %% ------------------------------------------------------------------------------------------- %% @@ -18,7 +18,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} \gtrset{language@/french/.code={% \gtrset{symlang/.cd, diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.german.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.german.code.tex index 7d295b41dc9..104212f362c 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.german.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.german.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrlang.german.code.tex: German language %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} \gtrset{language@/german/.code={% \gtrset{symlang/.cd, diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.italian.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.italian.code.tex index 1971f833508..64ac85ca7aa 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.italian.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.italian.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrlang.italian.code.tex: Italian language %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% Translation by Andrea Vaccari <ing dot andrea dot vaccari at gmail com> %% ------------------------------------------------------------------------------------------- %% @@ -18,7 +18,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} \gtrset{language@/italian/.code={% \gtrset{symlang/.cd, diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.spanish.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.spanish.code.tex index 962f1e449cb..67a621aed34 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.spanish.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.spanish.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrlang.spanish.code.tex: Spanish language %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% Translation by Francisco G. Perez Sanchez <ozo.froid at gmail dot com> %% ------------------------------------------------------------------------------------------- %% @@ -18,7 +18,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} \gtrset{language@/spanish/.code={% \gtrset{symlang/.cd, diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.swedish.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.swedish.code.tex index 991dea62b84..9522390ed9e 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.swedish.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.swedish.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrlang.swedish.code.tex: Swedish language %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% Translation by Per Starbaeck <per at starback.se> %% ------------------------------------------------------------------------------------------- %% @@ -18,7 +18,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} \gtrset{language@/swedish/.code={% \gtrset{symlang/.cd, diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlib.debug.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlib.debug.code.tex index 18204658ec9..1ed43e435eb 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrlib.debug.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlib.debug.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrlib.debug.code.tex: Debugger %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} \RequirePackage{array,tabularx} \tcbuselibrary{breakable} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlib.fanchart.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlib.fanchart.code.tex new file mode 100644 index 00000000000..5ba40199b08 --- /dev/null +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlib.fanchart.code.tex @@ -0,0 +1,1051 @@ +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) +%% gtrlib.fanchart.code.tex: Fancharts +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% ------------------------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `author-maintained'. +%% +%% This work consists of all files listed in README +%% +\gtr@set@library@version{2.00} + +\ExplSyntaxOn + +\tl_new:N \l_getree_fanchart_minor_angle_tl +\tl_new:N \l_getree_fanchart_major_angle_tl + +\tl_new:N \l_getree_fanchart_angle_a_tl +\tl_new:N \l_getree_fanchart_angle_b_tl +\tl_new:N \l_getree_fanchart_id_tl +\tl_new:N \l_getree_fanchart_radius_a_tl +\tl_new:N \l_getree_fanchart_radius_b_tl +\tl_new:N \l_getree_fanchart_level_tl +\tl_new:N \l_getree_fanchart_ratio_tl +\tl_new:N \l_getree_fanchart_offset_a_tl +\tl_new:N \l_getree_fanchart_offset_b_tl +\tl_new:N \l_getree_fanchart_line_width_tl + +\bool_new:N \l__getree_fanchart_reset_bounds_bool + +\tl_new:N \l__getree_fanchart_recursive_action_tl +\tl_new:N \l__getree_fanchart_tmpa_tl +\tl_new:N \l__getree_fanchart_tmpb_tl +\tl_new:N \l__getree_fanchart_landscape_level_tl + +\fp_new:N \l__getree_fanchart_angle_fp +\fp_new:N \l__getree_fanchart_radius_fp +\fp_new:N \l__getree_fanchart_inner_fp +\fp_new:N \l__getree_fanchart_inner_off_fp +\fp_new:N \l__getree_fanchart_outer_fp +\fp_new:N \l__getree_fanchart_outer_off_fp +\fp_new:N \l__getree_fanchart_boundary_width_fp +\fp_new:N \l__getree_fanchart_boundary_scale_fp + +\fp_new:N \l__getree_fanchart_bounds_border_fp +\fp_new:N \l__getree_fanchart_bounds_xmin_fp +\fp_new:N \l__getree_fanchart_bounds_xmax_fp +\fp_new:N \l__getree_fanchart_bounds_ymin_fp +\fp_new:N \l__getree_fanchart_bounds_ymax_fp + +\tl_const:Nn \c_getree_fanchart_maximum_rings_tl {24} + +\fparray_new:Nn \g__getree_fanchart_radii_fparry {\c_getree_fanchart_maximum_rings_tl+1} +\fparray_new:Nn \g__getree_fanchart_distances_fparry {\c_getree_fanchart_maximum_rings_tl} +\fparray_new:Nn \g__getree_fanchart_inner_fparry {\c_getree_fanchart_maximum_rings_tl} +\fparray_new:Nn \g__getree_fanchart_outer_fparry {\c_getree_fanchart_maximum_rings_tl} + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Core +%%%%%%%%%%%%%%%%%%%%%%% + + +\cs_new:Npn \__getree_fanchart_segment_computation: + { + \fp_compare:nNnF {\l_getree_fanchart_major_angle_tl} > {\l_getree_fanchart_minor_angle_tl} + { + \tl_set_eq:NN \l_tmpa_tl \l_getree_fanchart_major_angle_tl + \tl_set_eq:NN \l_getree_fanchart_major_angle_tl \l_getree_fanchart_minor_angle_tl + \tl_set_eq:NN \l_getree_fanchart_minor_angle_tl \l_tmpa_tl + } + \fp_set:Nn \l__getree_fanchart_angle_fp { (\l_getree_fanchart_major_angle_tl-\l_getree_fanchart_minor_angle_tl)/2 } + \fp_set:Nn \l__getree_fanchart_inner_fp { \fparray_item:Nn\g__getree_fanchart_radii_fparry{1} } + + \tl_set:Nn \l_tmpa_tl {\fp_to_dim:n{ sqrt(2)*\l__getree_fanchart_inner_fp }} + \use:x + { + \exp_not:N\pgfkeys{/gtr/level~0/.append~code={\exp_not:N\pgfkeysalso{node~size=\l_tmpa_tl,level~size=\l_tmpa_tl}}} + } + \int_step_inline:nnn {1} { \c_getree_fanchart_maximum_rings_tl-1 } + { + \fp_set:Nn \l__getree_fanchart_outer_fp { \fparray_item:Nn\g__getree_fanchart_radii_fparry{##1+1} } + + \fp_set:Nn \l__getree_fanchart_inner_off_fp { \l__getree_fanchart_inner_fp + \fparray_item:Nn\g__getree_fanchart_inner_fparry{##1} } + \fp_set:Nn \l__getree_fanchart_outer_off_fp { \l__getree_fanchart_outer_fp - \fparray_item:Nn\g__getree_fanchart_outer_fparry{##1} } + + \fp_set:Nn \l__getree_fanchart_angle_fp { \l__getree_fanchart_angle_fp/2 } + \fp_set:Nn \l__getree_fanchart_radius_fp { \l__getree_fanchart_inner_off_fp/\l__getree_fanchart_outer_off_fp } + + \fp_set:Nn \l_tmpb_fp { sqrt(\l__getree_fanchart_radius_fp^2+8) } + \fp_set:Nn \l_tmpa_fp { sqrt( 1 - ( ( \l__getree_fanchart_radius_fp+\l_tmpb_fp )/4 )^2 ) } + + \fp_compare:nNnTF { \l__getree_fanchart_angle_fp<90 ? \l__getree_fanchart_radius_fp*tand(\l__getree_fanchart_angle_fp)<\l_tmpa_fp : 0 } = {0} + { + \tl_set:Nx \l_tmpa_tl {\fp_to_dim:n{ 2*\l_tmpa_fp*\l__getree_fanchart_outer_off_fp }}% b + \tl_set:Nx \l_tmpb_tl {\fp_to_dim:n{ (\l_tmpb_fp-3*\l__getree_fanchart_radius_fp)/4*\l__getree_fanchart_outer_off_fp }}% h + \fparray_gset:Nnn \g__getree_fanchart_distances_fparry { ##1 }{ (\l_tmpb_fp+5*\l__getree_fanchart_radius_fp)/8*\l__getree_fanchart_outer_off_fp } + } + { + \fp_set:Nn \l_tmpa_fp { sqrt( 1 - ( \l__getree_fanchart_radius_fp*tand(\l__getree_fanchart_angle_fp) )^2 ) } + \fp_set:Nn \l_tmpb_fp { cosd( \l__getree_fanchart_angle_fp/2 ) } + \fp_compare:nNnTF {\l_tmpa_fp} < {\l_tmpb_fp} + { + \tl_set:Nx \l_tmpa_tl {\fp_to_dim:n{ 2*\l__getree_fanchart_radius_fp*tand(\l__getree_fanchart_angle_fp)*\l__getree_fanchart_outer_off_fp }}% b + \tl_set:Nx \l_tmpb_tl {\fp_to_dim:n{ (\l_tmpa_fp-\l__getree_fanchart_radius_fp)*\l__getree_fanchart_outer_off_fp }}% h + \fparray_gset:Nnn \g__getree_fanchart_distances_fparry { ##1 }{ (\l_tmpa_fp+\l__getree_fanchart_radius_fp)/2*\l__getree_fanchart_outer_off_fp } + } + { + \tl_set:Nx \l_tmpa_tl {\fp_to_dim:n{ 2*sind(\l__getree_fanchart_angle_fp/2)*\l__getree_fanchart_outer_off_fp }}% b + \tl_set:Nx \l_tmpb_tl {\fp_to_dim:n{ 1/(2*\l_tmpb_fp)*\l__getree_fanchart_outer_off_fp }}% h + \fparray_gset:Nnn \g__getree_fanchart_distances_fparry { ##1 }{ (2*\l_tmpb_fp-1/(2*\l_tmpb_fp))/2*\l__getree_fanchart_outer_off_fp } + } + } + \int_compare:nNnTF {##1} < {\l__getree_fanchart_landscape_level_tl} + { + \use:x + { + \exp_not:N\pgfkeys{/gtr/level~##1/.append~code={\exp_not:N\pgfkeysalso{node~size=\l_tmpa_tl,level~size=\l_tmpb_tl}}} + } + } + { + \use:x + { + \exp_not:N\pgfkeys{/gtr/level~##1/.append~code={\exp_not:N\pgfkeysalso{node~size=\l_tmpb_tl,level~size=\l_tmpa_tl}}} + } + } + \fp_set_eq:NN \l__getree_fanchart_inner_fp \l__getree_fanchart_outer_fp + } + } + + +\prg_new_conditional:Npnn \getree_fanchart_if_complemented_node: { p, TF } + { + \str_if_eq:VnTF \gtrcomplemented {true} + { + \prg_return_true: + } + { + \prg_return_false: + } + } + + +% #1: person number +% #2: level +% #3: angle a +% #4: angle b +\cs_new:Npn \__getree_fanchart_draw_person:nnnn #1#2#3#4 + { + \cs_set_nopar:Npx \gtr@currentperson {#1} + \cs_set_nopar:Npx \gtrDBsex {\use:c{gtr@per@\gtr@currentperson @flag@s}} + \cs_set_nopar:Npx \gtrDBrelation {\use:c{gtr@per@\gtr@currentperson @flag@r}} + \cs_set_nopar:Npx \gtrcomplemented {\use:c{gtr@per@\gtr@currentperson @flag@c}} + \tl_set:Nx \l_getree_fanchart_level_tl { \int_eval:n{#2} } + \tl_set:Nx \l_getree_fanchart_id_tl {\cs_if_exist_use:c {gtr@per@\gtr@currentperson @id}} + + \int_compare:nNnTF {\l_getree_fanchart_level_tl} > {0} + { + \tl_set:Nx \l_getree_fanchart_angle_a_tl { \fp_to_decimal:n{#3} } + \tl_set:Nx \l_getree_fanchart_angle_b_tl { \fp_to_decimal:n{#4} } + \tl_set:Nx \l_getree_fanchart_ratio_tl + { \fp_to_decimal:n{ + ((\l_getree_fanchart_angle_a_tl+\l_getree_fanchart_angle_b_tl)/2-\l_getree_fanchart_minor_angle_tl)/ + (\l_getree_fanchart_major_angle_tl-\l_getree_fanchart_minor_angle_tl) + } + } + \tl_set:Nx \l_getree_fanchart_radius_a_tl { \fp_to_dim:n{\fparray_item:Nn\g__getree_fanchart_radii_fparry{#2}} } + \fp_set:Nn \l_tmpa_fp { \fparray_item:Nn\g__getree_fanchart_radii_fparry{#2+1} } + \fp_compare:nNnT {\l_tmpa_fp} > {\l__getree_fanchart_bounds_xmax_fp} + { + \fp_set_eq:NN \l__getree_fanchart_bounds_xmax_fp \l_tmpa_fp + } + \tl_set:Nx \l_getree_fanchart_radius_b_tl { \fp_to_dim:n{\l_tmpa_fp} } + \tl_set:Nx \l_getree_fanchart_offset_a_tl { \fp_to_dim:n{\fparray_item:Nn\g__getree_fanchart_inner_fparry{#2}} } + \tl_set:Nx \l_getree_fanchart_offset_b_tl { \fp_to_dim:n{\fparray_item:Nn\g__getree_fanchart_outer_fparry{#2}} } + \tl_set:Nx \l_getree_fanchart_line_width_tl + { + \fp_to_dim:n + { + min(\l__getree_fanchart_boundary_width_fp, + \l_getree_fanchart_radius_a_tl*(\l_getree_fanchart_angle_b_tl-\l_getree_fanchart_angle_a_tl)*\l__getree_fanchart_boundary_scale_fp/2000) + } + } + + \__getree_fanchart_segment_definition: + \__getree_fanchart_marker_definition: + \__getree_fanchart_draw_segment: + + \fp_set:Nn \l__getree_fanchart_angle_fp {(\l_getree_fanchart_angle_a_tl+\l_getree_fanchart_angle_b_tl)/2} + \fp_set:Nn \l__getree_fanchart_radius_fp { \fparray_item:Nn\g__getree_fanchart_distances_fparry{#2} } + + \int_compare:nNnTF {#2} < {\l__getree_fanchart_landscape_level_tl} + { + \__getree_fanchart_portrait_angle:nnn + { + \fp_compare:nNnTF {sind(\l__getree_fanchart_angle_fp)} < {0} + { + \fp_set:Nn \l_tmpa_fp { \l__getree_fanchart_angle_fp+90 } + } + { + \fp_set:Nn \l_tmpa_fp { \l__getree_fanchart_angle_fp-90 } + } + } + { + \fp_set:Nn \l_tmpa_fp { \l__getree_fanchart_angle_fp-90 } + } + { + \fp_set:Nn \l_tmpa_fp { \l__getree_fanchart_angle_fp+90 } + } + } + { + \__getree_fanchart_landscape_angle:nnn + { + \fp_compare:nNnTF {cosd(\l__getree_fanchart_angle_fp)} < {0} + { + \fp_set:Nn \l_tmpa_fp { \l__getree_fanchart_angle_fp-180 } + } + { + \fp_set_eq:NN \l_tmpa_fp \l__getree_fanchart_angle_fp + } + } + { + \fp_set_eq:NN \l_tmpa_fp \l__getree_fanchart_angle_fp + } + { + \fp_set:Nn \l_tmpa_fp { \l__getree_fanchart_angle_fp-180 } + } + } + \node[rotate=\fp_to_decimal:N\l_tmpa_fp] + at (\fp_to_decimal:N\l__getree_fanchart_angle_fp \c_colon_str \fp_to_dim:N\l__getree_fanchart_radius_fp) + {\unhbox\use:c{gtr@per@#1@box}}; + } + { + \tl_set:Nx \l_getree_fanchart_radius_b_tl { \fp_to_dim:n{\fparray_item:Nn\g__getree_fanchart_radii_fparry{1}} } + \tl_set:Nn \l_getree_fanchart_line_width_tl {\fp_to_dim:N\l__getree_fanchart_boundary_width_fp} + \__getree_fanchart_draw_root: + \node at ( 0,0 ) {\unhbox\use:c{gtr@per@#1@box}}; + } + } + + + +% #1: family number +% #2: level +% #3: angle a +% #4: angle b +\cs_new:Npn \__getree_fanchart_draw_family:nnnn #1#2#3#4 + { + \gtr@set@currentfamily{#1} + \letcs\gtr@node{gtr@fam@\gtr@currentfamily @g} + \__getree_fanchart_draw_person:nnnn {\gtr@node}{#2}{#3}{#4} + \def\dodo##1 + { + \cs_if_exist:cT {gtr@per@##1@box} + { + \cs_if_exist:cTF {gtr@per@##1@chiof} + { + \tl_put_right:Nx\l__getree_fanchart_recursive_action_tl + { + \exp_not:N\__getree_fanchart_draw_family:nnnn { \use:c{gtr@per@##1@chiof} }{ \int_eval:n{#2+1} }{ #3 }{ \l_tmpa_tl } + } + } + { + \tl_put_right:Nx\l__getree_fanchart_recursive_action_tl + { + \exp_not:N\__getree_fanchart_draw_person:nnnn { ##1 }{ #2+1 }{ #3 }{ \l_tmpa_tl } + } + } + } + } + \def\do##1 + { + \cs_if_exist:cT {gtr@per@##1@box} + { + \cs_if_exist:cTF {gtr@per@##1@chiof} + { + \tl_put_right:Nx\l__getree_fanchart_recursive_action_tl + { + \exp_not:N\__getree_fanchart_draw_family:nnnn { \use:c{gtr@per@##1@chiof} }{ \int_eval:n{#2+1} }{ \l_tmpa_tl }{ #4 } + } + } + { + \tl_put_right:Nx\l__getree_fanchart_recursive_action_tl + { + \exp_not:N\__getree_fanchart_draw_person:nnnn { ##1 }{ #2+1 }{ \l_tmpa_tl }{ #4 } + } + } + } + \let\do\dodo + }% + \cs_if_exist:cT {gtr@fam@\gtr@currentfamily @par} + { + \tl_set:Nx \l_tmpa_tl { \fp_to_decimal:n { (#3+#4)/2 } } + \tl_clear:N\l__getree_fanchart_recursive_action_tl + \dolistcsloop{gtr@fam@\gtr@currentfamily @par} + \tl_use:N\l__getree_fanchart_recursive_action_tl + } + } + + +\cs_new:Npn \__getree_fanchart_bounds_fit:n #1 + { + \fp_set:Nn \l_tmpa_fp { \l__getree_fanchart_radius_fp*cosd(#1) } + \fp_compare:nNnTF {\l_tmpa_fp} < {\l__getree_fanchart_bounds_xmin_fp} + { + \fp_set_eq:NN \l__getree_fanchart_bounds_xmin_fp \l_tmpa_fp + } + { + \fp_compare:nNnT {\l_tmpa_fp} > {\l__getree_fanchart_bounds_xmax_fp} + { + \fp_set_eq:NN \l__getree_fanchart_bounds_xmax_fp \l_tmpa_fp + } + } + \fp_set:Nn \l_tmpa_fp { \l__getree_fanchart_radius_fp*sind(#1) } + \fp_compare:nNnTF {\l_tmpa_fp} < {\l__getree_fanchart_bounds_ymin_fp} + { + \fp_set_eq:NN \l__getree_fanchart_bounds_ymin_fp \l_tmpa_fp + } + { + \fp_compare:nNnT {\l_tmpa_fp} > {\l__getree_fanchart_bounds_ymax_fp} + { + \fp_set_eq:NN \l__getree_fanchart_bounds_ymax_fp \l_tmpa_fp + } + } + } + + +\cs_new:Npn \__getree_fanchart_reset_bounds: + { + \fp_set_eq:NN \l__getree_fanchart_radius_fp \l__getree_fanchart_bounds_xmax_fp + + \fp_set:Nn \l__getree_fanchart_bounds_xmax_fp { \fparray_item:Nn\g__getree_fanchart_radii_fparry{1} } + \fp_set_eq:NN \l__getree_fanchart_bounds_ymax_fp \l__getree_fanchart_bounds_xmax_fp + \fp_set:Nn \l__getree_fanchart_bounds_xmin_fp { -\l__getree_fanchart_bounds_xmax_fp } + \fp_set_eq:NN \l__getree_fanchart_bounds_ymin_fp \l__getree_fanchart_bounds_xmin_fp + + \__getree_fanchart_bounds_fit:n { \l_getree_fanchart_minor_angle_tl } + \__getree_fanchart_bounds_fit:n { \l_getree_fanchart_major_angle_tl } + \fp_set:Nn \l__getree_fanchart_angle_fp { floor(\l_getree_fanchart_minor_angle_tl/90)*90+90 } + \fp_while_do:nNnn {\l__getree_fanchart_angle_fp} < {\l_getree_fanchart_major_angle_tl} + { + \__getree_fanchart_bounds_fit:n { \l__getree_fanchart_angle_fp } + \fp_set:Nn \l__getree_fanchart_angle_fp { \l__getree_fanchart_angle_fp+90 } + } + + \pgfresetboundingbox + \path + (\fp_to_dim:n{\l__getree_fanchart_bounds_xmin_fp-\l__getree_fanchart_bounds_border_fp}, + \fp_to_dim:n{\l__getree_fanchart_bounds_ymin_fp-\l__getree_fanchart_bounds_border_fp}) + rectangle + (\fp_to_dim:n{\l__getree_fanchart_bounds_xmax_fp+\l__getree_fanchart_bounds_border_fp}, + \fp_to_dim:n{\l__getree_fanchart_bounds_ymax_fp+\l__getree_fanchart_bounds_border_fp}); + } + + +\cs_new:Npn \__getree_fanchart:nn #1#2 + { + \group_begin: + \cs_if_exist:NF \pgfpictureid + { + \gtr@error{\gtrfanchart\space~outside~tikzpicture~environment} + {\gtrfanchart\space~can~only~be~used~inside~a~tikzpicture~environment.} + } + \def\gtr@proc@@parent@end + { + \cs_if_exist:cF {gtr@fam@\gtr@currentfamily @g} + { + \gtr@error{No~g-node~in~parent~family~(\gtr@currentfamily)}{Every~family~needs~a~g-node} + } + } + \def\gtr@positioning{} + \gtrset{ + phantom/.style={phantom*={##1}, + code={ + \cs_if_exist:NT \gtr@currentperson + { + \use:x + { + \exp_not:N\gappto\exp_not:N\gtrkv@after@parser{\exp_not:N\csundef{gtr@per@\gtr@currentperson @box}} + } + } + } + }, + } + \gtr@reset@before@parser + \gtr@parsegraph + [ + processing = database, + ignore~parent~childs, + box = + { + empty, + size = minimal, + boxsep = \tcbfitdim/10, + middle = \tcbfitdim/5, + halign = center, + valign = center, + before~upper={\parskip=0.1\tcbfitdim}, + }, + level/.prefix~code= + { + \int_compare:nNnT {##1} > {5} + { + \pgfkeysalso{node={list~separators={\par}{~}{}{}}} + } + }, + #1, + code={\__getree_fanchart_segment_computation:} + ]{#2} + \gtrkv@after@parser + \fp_zero:N \l__getree_fanchart_bounds_xmax_fp + \__getree_fanchart_draw_family:nnnn{\gtr@num@fam@first}{0}{\l_getree_fanchart_minor_angle_tl}{\l_getree_fanchart_major_angle_tl} + \bool_if:NT \l__getree_fanchart_reset_bounds_bool + { + \__getree_fanchart_reset_bounds: + } + \group_end: + } + + +\NewDocumentCommand{\gtrfanchart}{ +O{} } + { + \__getree_fanchart:nn {#1} + } + + +\NewDocumentCommand{\gtrfanchartinput}{ +O{} m } + { + \__getree_fanchart:nn {#1}{input{#2}} + } + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Options +%%%%%%%%%%%%%%%%%%%%%%% + + +\cs_new:Npn \__getree_fanchart_paper_fit:nn #1#2 + { + \fp_set:Nn \l_tmpa_fp {#1} + \fp_set:Nn \l_tmpb_fp {#2} + \fp_compare:nTF { \l_tmpa_fp > \l_tmpb_fp } + { + \fp_compare:nTF { \l_tmpb_fp > \l_tmpa_fp/2 } + { + \fp_set:Nn \l_tmpa_fp { 180+2*asind( 2*\l_tmpb_fp/\l_tmpa_fp - 1 ) } + \gtrset + { + fanchart~open~up = \l_tmpa_fp, + fanchart~text~portrait = inwards + } + } + { + \gtrset + { + fanchart~open~up = 180, + fanchart~text~portrait = inwards + } + } + } + { + \fp_compare:nTF { \l_tmpa_fp > \l_tmpb_fp/2 } + { + \fp_set:Nn \l_tmpa_fp { 180+2*asind( 2*\l_tmpa_fp/\l_tmpb_fp -1 ) } + \gtrset + { + fanchart~open~right = \l_tmpa_fp, + fanchart~text~landscape = clockwise + } + } + { + \gtrset + { + fanchart~open~right = 180, + fanchart~text~landscape = clockwise + } + } + } + } + + +\gtrset{ + fanchart~radii/.code={ + \clist_set:Nn \l_tmpa_clist {#1} + \fparray_gzero:N \g__getree_fanchart_radii_fparry + \int_zero:N \l_tmpa_int + \fp_zero:N \l_tmpb_fp + \clist_map_inline:Nn \l_tmpa_clist + { + \int_incr:N \l_tmpa_int + \fp_set:Nn \l_tmpa_fp { ##1 } + \fp_add:Nn \l_tmpb_fp {\l_tmpa_fp} + \fparray_gset:Nnn \g__getree_fanchart_radii_fparry { \l_tmpa_int }{ \l_tmpb_fp } + } + \int_step_inline:nnn { \l_tmpa_int+1 }{ \c_getree_fanchart_maximum_rings_tl } + { + \fp_add:Nn \l_tmpb_fp {\l_tmpa_fp} + \fparray_gset:Nnn \g__getree_fanchart_radii_fparry { ##1 }{ \l_tmpb_fp } + } + }, + fanchart~inner~offset/.code={ + \clist_set:Nn \l_tmpa_clist {#1} + \fparray_gzero:N \g__getree_fanchart_inner_fparry + \int_zero:N \l_tmpa_int + \fp_zero:N \l_tmpa_fp + \clist_map_inline:Nn \l_tmpa_clist + { + \int_incr:N \l_tmpa_int + \fp_set:Nn \l_tmpa_fp { ##1 } + \fparray_gset:Nnn \g__getree_fanchart_inner_fparry { \l_tmpa_int }{ \l_tmpa_fp } + } + \int_step_inline:nnn { \l_tmpa_int+1 }{ \c_getree_fanchart_maximum_rings_tl } + { + \fp_add:Nn \l_tmpb_fp {\l_tmpa_fp} + \fparray_gset:Nnn \g__getree_fanchart_inner_fparry { ##1 }{ \l_tmpa_fp } + } + }, + fanchart~outer~offset/.code={ + \clist_set:Nn \l_tmpa_clist {#1} + \fparray_gzero:N \g__getree_fanchart_outer_fparry + \int_zero:N \l_tmpa_int + \fp_zero:N \l_tmpa_fp + \clist_map_inline:Nn \l_tmpa_clist + { + \int_incr:N \l_tmpa_int + \fp_set:Nn \l_tmpa_fp { ##1 } + \fparray_gset:Nnn \g__getree_fanchart_outer_fparry { \l_tmpa_int }{ \l_tmpa_fp } + } + \int_step_inline:nnn { \l_tmpa_int+1 }{ \c_getree_fanchart_maximum_rings_tl } + { + \fp_add:Nn \l_tmpb_fp {\l_tmpa_fp} + \fparray_gset:Nnn \g__getree_fanchart_outer_fparry { ##1 }{ \l_tmpa_fp } + } + }, + fanchart~minor~angle/.code={\tl_set:Nx \l_getree_fanchart_minor_angle_tl { \fp_to_decimal:n {#1} }}, + fanchart~major~angle/.code={\tl_set:Nx \l_getree_fanchart_major_angle_tl { \fp_to_decimal:n {#1} }}, + fanchart~open~up/.code={ + \tl_set:Nx \l_getree_fanchart_minor_angle_tl { \fp_to_decimal:n {90-(#1)/2}} + \tl_set:Nx \l_getree_fanchart_major_angle_tl { \fp_to_decimal:n {90+(#1)/2}} + }, + fanchart~open~up/.default=220, + fanchart~open~left/.code={ + \tl_set:Nx \l_getree_fanchart_minor_angle_tl { \fp_to_decimal:n {180-(#1)/2}} + \tl_set:Nx \l_getree_fanchart_major_angle_tl { \fp_to_decimal:n {180+(#1)/2}} + }, + fanchart~open~left/.default=160, + fanchart~open~right/.code={ + \tl_set:Nx \l_getree_fanchart_minor_angle_tl { \fp_to_decimal:n {-(#1)/2}} + \tl_set:Nx \l_getree_fanchart_major_angle_tl { \fp_to_decimal:n {(#1)/2}} + }, + fanchart~open~right/.default=160, + fanchart~open~down/.code={ + \tl_set:Nx \l_getree_fanchart_minor_angle_tl { \fp_to_decimal:n {270-(#1)/2}} + \tl_set:Nx \l_getree_fanchart_major_angle_tl { \fp_to_decimal:n {270+(#1)/2}} + }, + fanchart~open~down/.default=220, + fanchart~open~full/.style={fanchart~open~right=360}, + fanchart~open~for/.code~args={#1x#2}{\__getree_fanchart_paper_fit:nn{#1}{#2}}, + fanchart~landscape~from~level/.code={\tl_set:Nn\l__getree_fanchart_landscape_level_tl{#1}}, + fanchart~text~portrait/.is~choice, + fanchart~text~portrait/.default=auto, + fanchart~text~portrait/auto/.code = \cs_set_eq:NN \__getree_fanchart_portrait_angle:nnn \use_i:nnn, + fanchart~text~portrait/inwards/.code = \cs_set_eq:NN \__getree_fanchart_portrait_angle:nnn \use_ii:nnn, + fanchart~text~portrait/outwards/.code = \cs_set_eq:NN \__getree_fanchart_portrait_angle:nnn \use_iii:nnn, + fanchart~text~landscape/.is~choice, + fanchart~text~landscape/.default=auto, + fanchart~text~landscape/auto/.code = \cs_set_eq:NN \__getree_fanchart_landscape_angle:nnn \use_i:nnn, + fanchart~text~landscape/clockwise/.code = \cs_set_eq:NN \__getree_fanchart_landscape_angle:nnn \use_ii:nnn, + fanchart~text~landscape/counterclockwise/.code = \cs_set_eq:NN \__getree_fanchart_landscape_angle:nnn \use_iii:nnn, + fanchart~boundary~color/.code={\colorlet{gtrfanchartboundary}{#1}}, + fanchart~boundary~width/.code={ + \fp_set:Nn \l__getree_fanchart_boundary_width_fp {#1} + \fp_set:Nn \l__getree_fanchart_boundary_scale_fp {min(5,\l__getree_fanchart_boundary_width_fp/0.4pt)} + }, + fanchart~male~style/.code={\tikzset{gtr@fanchart@male@style/.style={#1}}}, + fanchart~female~style/.code={\tikzset{gtr@fanchart@female@style/.style={#1}}}, + fanchart~neuter~style/.code={\tikzset{gtr@fanchart@neuter@style/.style={#1}}}, + fanchart~ancestor~style/.code={\tikzset{gtr@fanchart@ancestor@style/.style={#1}}}, + fanchart~descendant~style/.code={\tikzset{gtr@fanchart@descendant@style/.style={#1}}}, + fanchart~sibling~style/.code={\tikzset{gtr@fanchart@sibling@style/.style={#1}}}, + fanchart~unrelated~style/.code={\tikzset{gtr@fanchart@unrelated@style/.style={#1}}}, + fanchart~reset~bounds/.is~choice, + fanchart~reset~bounds/.default=true, + fanchart~reset~bounds/true/.code={\bool_set_true:N \l__getree_fanchart_reset_bounds_bool}, + fanchart~reset~bounds/false/.code={\bool_set_false:N \l__getree_fanchart_reset_bounds_bool}, + fanchart~bounds~border/.code={\fp_set:Nn \l__getree_fanchart_bounds_border_fp {#1}}, +} + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Segment Drawing +%%%%%%%%%%%%%%%%%%%%%%% + + +\cs_new:Npn \getree_fanchart_set_marker_style:n #1 + { + \getree_fanchart_if_complemented_node:TF + { + \tikzset{gtr@fanchart@marker@style/.style={#1, + gtr@fanchart/@mark@level@\l_getree_fanchart_level_tl/.try, + gtr@fanchart@marker@complemented + }} + } + { + \tikzset{gtr@fanchart@marker@style/.style={#1, + gtr@fanchart/@mark@level@\l_getree_fanchart_level_tl/.try, + gtr@fanchart/@mark@id@\l_getree_fanchart_id_tl/.try + }} + } + } + +\cs_new:Npn \getree_fanchart_set_segment_style:n #1 + { + \getree_fanchart_if_complemented_node:TF + { + \tikzset{gtr@fanchart@segment@style/.style={#1, + gtr@fanchart/@seg@level@\l_getree_fanchart_level_tl/.try, + gtr@fanchart@segment@complemented + }} + } + { + \tikzset{gtr@fanchart@segment@style/.style={#1, + gtr@fanchart/@seg@level@\l_getree_fanchart_level_tl/.try, + gtr@fanchart/@seg@id@\l_getree_fanchart_id_tl/.try + }} + } + } + + +\cs_new:Npn \getree_fanchart_set_color_wave:n #1 + { + \definecolor{#1}{rgb:wave}{\fp_to_decimal:n { 400 + (1-\l_getree_fanchart_ratio_tl)*360 } } + } + + +% customize by \def\rangetHsb +\cs_new:Npn \getree_fanchart_set_color_colorwheel:n #1 + { + \definecolor{#1}{rgb:tHsb}{\fp_to_decimal:n{(1-\l_getree_fanchart_ratio_tl)*360},1,1} + } + +\cs_new:Npn \getree_fanchart_draw_path:n #1 + { + \path[#1] + ( \l_getree_fanchart_angle_a_tl \c_colon_str \l_getree_fanchart_radius_a_tl ) + arc ( \l_getree_fanchart_angle_a_tl \c_colon_str \l_getree_fanchart_angle_b_tl \c_colon_str \l_getree_fanchart_radius_a_tl ) + -- ( \l_getree_fanchart_angle_b_tl \c_colon_str \l_getree_fanchart_radius_b_tl ) + arc ( \l_getree_fanchart_angle_b_tl \c_colon_str \l_getree_fanchart_angle_a_tl \c_colon_str \l_getree_fanchart_radius_b_tl ) + -- cycle; + } + +\cs_new:Npn \getree_fanchart_draw_path:nnn #1#2#3 + { + \tl_set:Nx \l__getree_fanchart_tmpa_tl { \fp_to_dim:n {#1} } + \tl_set:Nx \l__getree_fanchart_tmpb_tl { \fp_to_dim:n {#2} } + \path[#3] + ( \l_getree_fanchart_angle_a_tl \c_colon_str \l__getree_fanchart_tmpa_tl ) + arc ( \l_getree_fanchart_angle_a_tl \c_colon_str \l_getree_fanchart_angle_b_tl \c_colon_str \l__getree_fanchart_tmpa_tl ) + -- ( \l_getree_fanchart_angle_b_tl \c_colon_str \l__getree_fanchart_tmpb_tl ) + arc ( \l_getree_fanchart_angle_b_tl \c_colon_str \l_getree_fanchart_angle_a_tl \c_colon_str \l__getree_fanchart_tmpb_tl ) + -- cycle; + } + + +\cs_new:Npn \getree_fanchart_draw_segment_standard: + { + \fp_compare:nNnTF { \l_getree_fanchart_offset_b_tl } = { 0 } + { + \fp_compare:nNnTF { \l_getree_fanchart_offset_a_tl } = { 0 } + { + \getree_fanchart_draw_path:n + { + draw=gtrfanchartboundary,line~width=\l_getree_fanchart_line_width_tl,gtr@fanchart@segment@style + } + } + { + \getree_fanchart_draw_path:nnn + {\l_getree_fanchart_radius_a_tl+\l_getree_fanchart_offset_a_tl} + {\l_getree_fanchart_radius_b_tl} + { + draw=gtrfanchartboundary,line~width=\l_getree_fanchart_line_width_tl,gtr@fanchart@segment@style + } + } + } + { + \getree_fanchart_draw_path:nnn + {\l_getree_fanchart_radius_a_tl+\l_getree_fanchart_offset_a_tl} + {\l_getree_fanchart_radius_b_tl-\l_getree_fanchart_offset_b_tl} + { + gtr@fanchart@segment@style + } + \getree_fanchart_draw_path:nnn + {\l_getree_fanchart_radius_b_tl-\l_getree_fanchart_offset_b_tl} + {\l_getree_fanchart_radius_b_tl} + { + gtr@fanchart@marker@style + } + \getree_fanchart_draw_path:nnn + {\l_getree_fanchart_radius_a_tl+\l_getree_fanchart_offset_a_tl} + {\l_getree_fanchart_radius_b_tl} + { + draw=gtrfanchartboundary,line~width=\l_getree_fanchart_line_width_tl + } + } + } + + +\cs_new:Npn \getree_fanchart_draw_root_style:n #1 + { + \path[draw=gtrfanchartboundary,line~width=\l_getree_fanchart_line_width_tl,#1] + ( 0,0 ) circle[radius=\l_getree_fanchart_radius_b_tl]; + } + + +\gtrset + { + fanchart-segment-code/.code= + { + \cs_set:Npn \__getree_fanchart_draw_segment: {#1} + }, + fanchart-root-code/.code= + { + \cs_set:Npn \__getree_fanchart_draw_root: {#1} + }, + fanchart-marker-definition/.code= + { + \cs_set:Npn \__getree_fanchart_marker_definition: {#1} + }, + fanchart-segment-definition/.code= + { + \cs_set:Npn \__getree_fanchart_segment_definition: {#1} + }, + } + +\tikzset + { + gtr~set~color~wave/.code={\getree_fanchart_set_color_wave:n{#1}}, + gtr~set~color~colorwheel/.code={\getree_fanchart_set_color_colorwheel:n{#1}}, + gtr~set~color~series/.code={\colorlet{#1}{fanchart!![\l_getree_fanchart_level_tl]}}, + } + +\gtrset + { + fanchart-segment-code={\getree_fanchart_draw_segment_standard:}, + % + fanchart~root~style/.style={fanchart-root-code={\getree_fanchart_draw_root_style:n{#1}}}, + fanchart~root~malefemale/.style={fanchart-root-code={\getree_fanchart_draw_root_style:n{gtr@fanchart@\gtrDBsex @style}}}, + % + fanchart~segment~style/.style={fanchart-segment-definition={\getree_fanchart_set_segment_style:n{#1}}}, + fanchart~segment~malefemale/.style={fanchart~segment~style={gtr@fanchart@\gtrDBsex @style}}, + fanchart~segment~relation/.style={fanchart~segment~style={gtr@fanchart@\gtrDBrelation @style}}, + fanchart~segment~wave/.style={fanchart~segment~style={ + gtr~set~color~wave=gtr@fanchart@segment, + top~color=gtr@fanchart@segment!20,bottom~color=gtr@fanchart@segment!25 + }}, + fanchart~segment~colorwheel/.style={fanchart~segment~style={ + gtr~set~color~colorwheel=gtr@fanchart@segment, + top~color=gtr@fanchart@segment!20,bottom~color=gtr@fanchart@segment!25 + }}, + fanchart~segment~radial/.style={fanchart~segment~style={ + gtr~set~color~series=gtr@fanchart@segment, + top~color=gtr@fanchart@segment!20,bottom~color=gtr@fanchart@segment!25 + }}, + % + fanchart~marker~style/.style={fanchart-marker-definition={\getree_fanchart_set_marker_style:n{#1}}}, + fanchart~marker~malefemale/.style={fanchart~marker~style={gtr@fanchart@\gtrDBsex @style}}, + fanchart~marker~relation/.style={fanchart~marker~style={gtr@fanchart@\gtrDBrelation @style}}, + fanchart~marker~wave/.style={fanchart~marker~style={ + gtr~set~color~wave=gtr@fanchart@marker, + fill=gtr@fanchart@marker + }}, + fanchart~marker~colorwheel/.style={fanchart~marker~style={ + gtr~set~color~colorwheel=gtr@fanchart@marker, + fill=gtr@fanchart@marker + }}, + fanchart~marker~radial/.style={fanchart~marker~style={ + gtr~set~color~series=gtr@fanchart@marker, + fill=gtr@fanchart@marker + }}, + % + fanchart~complemented~segment~style/.code={\tikzset{gtr@fanchart@segment@complemented/.style={#1}}}, + fanchart~complemented~marker~style/.code={\tikzset{gtr@fanchart@marker@complemented/.style={#1}}}, + % + fanchart~segment~style~for~levels/.code~2~args={ + \clist_set:Nn \l_tmpa_clist {#1} + \clist_map_inline:Nn \l_tmpa_clist + { + \tikzset{gtr@fanchart/@seg@level@##1/.style={#2}} + } + }, + fanchart~marker~style~for~levels/.code~2~args={ + \clist_set:Nn \l_tmpa_clist {#1} + \clist_map_inline:Nn \l_tmpa_clist + { + \tikzset{gtr@fanchart/@mark@level@##1/.style={#2}} + } + }, + fanchart~segment~style~for~ids/.code~2~args={ + \clist_set:Nn \l_tmpa_clist {#1} + \clist_map_inline:Nn \l_tmpa_clist + { + \tikzset{gtr@fanchart/@seg@id@##1/.style={#2}} + } + }, + fanchart~marker~style~for~ids/.code~2~args={ + \clist_set:Nn \l_tmpa_clist {#1} + \clist_map_inline:Nn \l_tmpa_clist + { + \tikzset{gtr@fanchart/@mark@id@##1/.style={#2}} + } + }, + } + +\ExplSyntaxOff + + +\gtrset{ + fanchart angles/.style args={#1:#2}{fanchart minor angle=#1,fanchart major angle=#2}, +} + +\definecolorseries{fanchart}{rgb:hsb}{grad}[rgb:hsb]{.575,1,1}{.987,-.234,0} +\resetcolorseries[12]{fanchart} + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Templates +%%%%%%%%%%%%%%%%%%%%%%% + +\gtrset + { + fanchart template/.is choice, +% + fanchart template/spartan/.style= + { + fanchart inner offset={0mm}, + fanchart outer offset={0mm}, + fanchart boundary color=gray!50, + fanchart root style={fill=white}, + fanchart segment style={fill=white}, + empty name text={}, + }, + fanchart template/malefemale sober/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={0mm}, + fanchart boundary color=gray!50, + fanchart root malefemale, + fanchart segment malefemale, + empty name text={}, + }, + fanchart template/malefemale relation/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={2mm}, + fanchart boundary color=gray!50, + fanchart root malefemale, + fanchart segment malefemale, + fanchart marker relation, + empty name text={}, + }, + fanchart template/colorwheel sober/.style= + { + fanchart inner offset={0mm}, + fanchart outer offset={2mm}, + fanchart boundary color=gray, + fanchart root style={fill=white}, + fanchart segment style={fill=white}, + fanchart marker colorwheel, + empty name text={}, + }, + fanchart template/colorwheel serious/.style= + { + fanchart inner offset={0mm}, + fanchart outer offset={2mm}, + fanchart boundary color=gray!50, + fanchart root style={inner color=white,outer color=gray!4!white}, + fanchart segment style={top color=gray!1!white,bottom color=gray!4!white}, + fanchart marker colorwheel, + empty name text={}, + }, + fanchart template/colorwheel malefemale/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={2mm}, + fanchart boundary color=gray!50, + fanchart root malefemale, + fanchart segment malefemale, + fanchart marker colorwheel, + empty name text={}, + }, + fanchart template/colorwheel rich/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={0mm}, + fanchart boundary color=white, + fanchart root style={inner color=white,outer color=gray!15!white}, + fanchart segment colorwheel, + empty name text={}, + }, + fanchart template/colorwheel opulent/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={2mm}, + fanchart boundary color=white, + fanchart root style={inner color=white,outer color=gray!15!white}, + fanchart segment colorwheel, + fanchart marker colorwheel, + empty name text={}, + }, +% + fanchart template/wave sober/.style= + { + fanchart inner offset={0mm}, + fanchart outer offset={2mm}, + fanchart boundary color=gray, + fanchart root style={fill=white}, + fanchart segment style={fill=white}, + fanchart marker wave, + empty name text={}, + }, + fanchart template/wave serious/.style= + { + fanchart inner offset={0mm}, + fanchart outer offset={2mm}, + fanchart boundary color=gray!50, + fanchart root style={inner color=white,outer color=gray!4!white}, + fanchart segment style={top color=gray!1!white,bottom color=gray!4!white}, + fanchart marker wave, + empty name text={}, + }, + fanchart template/wave malefemale/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={2mm}, + fanchart boundary color=gray!50, + fanchart root malefemale, + fanchart segment malefemale, + fanchart marker wave, + empty name text={}, + }, + fanchart template/wave rich/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={0mm}, + fanchart boundary color=white, + fanchart root style={inner color=white,outer color=gray!15!white}, + fanchart segment wave, + empty name text={}, + }, + fanchart template/wave opulent/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={2mm}, + fanchart boundary color=white, + fanchart root style={inner color=white,outer color=gray!15!white}, + fanchart segment wave, + fanchart marker wave, + empty name text={}, + }, + fanchart template/radial sober/.style= + { + fanchart inner offset={0mm}, + fanchart outer offset={2mm}, + fanchart boundary color=gray, + fanchart root style={fill=white}, + fanchart segment style={fill=white}, + fanchart marker radial, + empty name text={}, + }, + fanchart template/radial serious/.style= + { + fanchart inner offset={0mm}, + fanchart outer offset={2mm}, + fanchart boundary color=gray!50, + fanchart root style={inner color=white,outer color=gray!4!white}, + fanchart segment style={top color=gray!1!white,bottom color=gray!4!white}, + fanchart marker radial, + empty name text={}, + }, + fanchart template/radial malefemale/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={2mm}, + fanchart boundary color=gray!50, + fanchart root malefemale, + fanchart segment malefemale, + fanchart marker radial, + empty name text={}, + }, + fanchart template/radial rich/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={0mm}, + fanchart boundary color=white, + fanchart root style={inner color=white,outer color=gray!15!white}, + fanchart segment radial, + empty name text={}, + }, + fanchart template/radial opulent/.style= + { + fanchart inner offset={1mm}, + fanchart outer offset={2mm}, + fanchart boundary color=white, + fanchart root style={inner color=white,outer color=gray!15!white}, + fanchart segment radial, + fanchart marker radial, + empty name text={}, + }, + } + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Presets +%%%%%%%%%%%%%%%%%%%%%%% + +\gtrset{ + fanchart radii={2.5cm,3.5cm,3cm}, + fanchart inner offset={0mm}, + fanchart outer offset={0mm}, + fanchart open up=220, + fanchart landscape from level=5, + fanchart text portrait=auto, + fanchart text landscape=auto, + fanchart boundary color=gray!50, + fanchart boundary width=0.4pt, + fanchart male style={top color=blue!1!white,bottom color=blue!6!white}, + fanchart female style={top color=red!1!white,bottom color=red!6!white}, + fanchart neuter style={top color=gray!1!white,bottom color=gray!6!white}, + fanchart ancestor style={fill=red!50!gray!50}, + fanchart descendant style={fill=red!50!gray!50}, + fanchart sibling style={fill=blue!50!gray!50}, + fanchart unrelated style={fill=gray!15}, + fanchart segment malefemale, + fanchart root malefemale, + fanchart marker style={fill=gtrfanchartboundary!50!white}, + fanchart complemented segment style=, + fanchart complemented marker style=, + fanchart reset bounds, + fanchart bounds border=0.2pt, +} + + diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlib.templates.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlib.templates.code.tex index 55fa71e82ad..0dc5a7ea9b5 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrlib.templates.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlib.templates.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package genealogytree - version 1.32 (2019/04/08) +%% The LaTeX package genealogytree - version 2.00 (2020/06/19) %% gtrlib.templates.code.tex: Templates %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2013-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{1.32} +\gtr@set@library@version{2.00} % Templates |