diff options
Diffstat (limited to 'Master')
20 files changed, 4557 insertions, 274 deletions
diff --git a/Master/texmf-dist/doc/latex/genealogytree/CHANGES b/Master/texmf-dist/doc/latex/genealogytree/CHANGES deleted file mode 100644 index 8c9a29c8379..00000000000 --- a/Master/texmf-dist/doc/latex/genealogytree/CHANGES +++ /dev/null @@ -1,22 +0,0 @@ -%% The LaTeX package genealogytree - version 0.10 (2015/01/12) -%% -%% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2013-2015 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 -%% - -(2013-2014): pre publication development - -version 0.10 (2015/01/12): initial public release (alpha version) diff --git a/Master/texmf-dist/doc/latex/genealogytree/README b/Master/texmf-dist/doc/latex/genealogytree/README index b208c47985b..e949c1b3e0b 100644 --- a/Master/texmf-dist/doc/latex/genealogytree/README +++ b/Master/texmf-dist/doc/latex/genealogytree/README @@ -1,4 +1,4 @@ -%% The LaTeX package genealogytree - version 0.10 (2015/01/12) +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) %% %% ------------------------------------------------------------------------------------------- %% Copyright (c) 2013-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> @@ -30,10 +30,10 @@ customized to e.g. prioritize certain paths. Contents of the package ======================= 'README' this file - 'CHANGES' log of changes (history) 'genealogytree.sty' LaTeX package file (style file) '*.code.tex' LaTeX package file (library of genealogytree) 'genealogytree.pdf' Documentation for genealogytree + 'genealogytree-example-*.pdf' Example pedigree charts 'genealogytree.doc.sources.zip' Source code of the documentation Installation diff --git a/Master/texmf-dist/doc/latex/genealogytree/genealogytree-example-1.pdf b/Master/texmf-dist/doc/latex/genealogytree/genealogytree-example-1.pdf Binary files differnew file mode 100644 index 00000000000..0a06bcd2d71 --- /dev/null +++ b/Master/texmf-dist/doc/latex/genealogytree/genealogytree-example-1.pdf diff --git a/Master/texmf-dist/doc/latex/genealogytree/genealogytree-example-2.pdf b/Master/texmf-dist/doc/latex/genealogytree/genealogytree-example-2.pdf Binary files differnew file mode 100644 index 00000000000..ccdbde18888 --- /dev/null +++ b/Master/texmf-dist/doc/latex/genealogytree/genealogytree-example-2.pdf diff --git a/Master/texmf-dist/doc/latex/genealogytree/genealogytree-example-3.pdf b/Master/texmf-dist/doc/latex/genealogytree/genealogytree-example-3.pdf Binary files differnew file mode 100644 index 00000000000..3721d729059 --- /dev/null +++ b/Master/texmf-dist/doc/latex/genealogytree/genealogytree-example-3.pdf diff --git a/Master/texmf-dist/doc/latex/genealogytree/genealogytree.doc.sources.zip b/Master/texmf-dist/doc/latex/genealogytree/genealogytree.doc.sources.zip Binary files differindex edb0fbe5a1d..b064982656b 100644 --- a/Master/texmf-dist/doc/latex/genealogytree/genealogytree.doc.sources.zip +++ b/Master/texmf-dist/doc/latex/genealogytree/genealogytree.doc.sources.zip diff --git a/Master/texmf-dist/doc/latex/genealogytree/genealogytree.pdf b/Master/texmf-dist/doc/latex/genealogytree/genealogytree.pdf Binary files differindex e4e72e55bd2..1309d43901d 100644 --- a/Master/texmf-dist/doc/latex/genealogytree/genealogytree.pdf +++ b/Master/texmf-dist/doc/latex/genealogytree/genealogytree.pdf diff --git a/Master/texmf-dist/tex/latex/genealogytree/genealogytree.sty b/Master/texmf-dist/tex/latex/genealogytree/genealogytree.sty index b75d6c54c62..48fa6f78684 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/genealogytree.sty +++ b/Master/texmf-dist/tex/latex/genealogytree/genealogytree.sty @@ -1,4 +1,4 @@ -%% The LaTeX package genealogytree - version 0.10 (2015/01/12) +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) %% genealogytree.sty: genealogy trees (graphs) %% %% ------------------------------------------------------------------------------------------- @@ -18,20 +18,48 @@ %% This work consists of all files listed in README %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{genealogytree}[2015/01/12 version 0.10 genealogy trees] -\def\gtr@version{0.10} +\ProvidesPackage{genealogytree}[2015/05/22 version 0.90 genealogy trees] +\def\gtr@version{0.90} -\RequirePackage{pgf}[2008/01/15] -\RequirePackage{etoolbox}[2011/01/03] +\RequirePackage{tcolorbox}[2015/05/07] +\tcbuselibrary{skins,fitting} +\usetikzlibrary{arrows.meta} +\usetikzlibrary{fit} \def\gtr@warning#1{\PackageWarning{genealogytree}{#1}} -\def\gtr@error#1{\PackageError{genealogytree}{#1}} +\def\gtr@error#1#2{\PackageError{genealogytree}{#1}{#2}} \pgfkeys{/handlers/.gstore in/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\gdef#1{##1}}} \pgfkeys{/handlers/.xstore in/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\xdef#1{##1}}} \pgfkeys{/gtr/.is family} \def\gtrset{\pgfqkeys{/gtr}} +\def\gtr@load@language@nil#1-#2\@nil{\gtruselibrary{lang.#1}} +\def\gtr@load@language#1{\gtr@load@language@nil#1-\@nil}% +\def\gtrloadlanguage#1{\forcsvlist{\gtr@load@language}{#1}} + +\gtrset{ + code/.code={#1}, + keysfrom/.code={\pgfkeysalsofrom{#1}}, + language/.code={% + \edef\gtrlanguagename{#1}% + \gtr@load@language{#1}% + \gtrset{language@=#1}% + }, + language@/.is choice, + language@/.unknown/.code={% + \gtr@error{The language '\pgfkeyscurrentname' is unknown or not loaded}{% + Set this language in the preamble or use '\string\gtrloadlanguage{\pgfkeyscurrentname}' in the preamble.}% + }, +} + +\AtBeginDocument{% + \gtrset{language/.code={% + \edef\gtrlanguagename{#1}% + \gtrset{language@=#1}% + }}% + \ifdefined\gtrlanguagename\else\gtrset{language=english}\fi} + \def\gtr@optionlist{} \def\gtr@set@library@version#1{% @@ -85,15 +113,32 @@ } \gtr@add@library{core.parser}{gtrcore.parser.code.tex} +\gtr@add@library{core.processing}{gtrcore.processing.code.tex} +\gtr@add@library{core.contour}{gtrcore.contour.code.tex} +\gtr@add@library{core.node}{gtrcore.node.code.tex} +\gtr@add@library{core.drawing}{gtrcore.drawing.code.tex} \gtr@add@library{core.options}{gtrcore.options.code.tex} -\gtr@add@library{core.debug}{gtrcore.debug.code.tex} +\gtr@add@library{core.symbols}{gtrcore.symbols.code.tex} + +\gtr@add@library{lang.english}{gtrlang.english.code.tex} +\gtr@add@library{lang.german}{gtrlang.german.code.tex} + +\gtr@add@library{debug}{gtrlib.debug.code.tex} +\gtr@add@library{templates}{gtrlib.templates.code.tex} + +\gtr@add@library@style{all}{debug,templates} \ProcessOptions* -\gtruselibrary{% - core.parser,% - core.options,% - core.debug,% +\gtruselibrary{ + core.parser, + core.processing, + core.contour, + core.node, + core.drawing, + core.options, + core.symbols, + lang.english, } \edef\gtr@temp{\noexpand\gtruselibrary{\gtr@optionlist}} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.contour.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.contour.code.tex new file mode 100644 index 00000000000..db1cd0b6bd4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.contour.code.tex @@ -0,0 +1,397 @@ +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) +%% gtrcore.contour.code.tex: Contours +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2013-2015 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{0.90} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Contour +%%%%%%%%%%%%%%%%%%%%%%% + +% #1 east/west +% #2 pid +% #3 sum +\def\gtr@cont@next#1#2#3{% + \ifcsname gtr@per@#2@c#1@next\endcsname% + \let\gtr@tmp@oldper#2% + \letcs\gtr@tmp@oldfam{gtr@per@#2@fam}% + \letcs#2{gtr@per@#2@c#1@next}% + \letcs\gtr@tmp@fam{gtr@per@#2@fam}% + \ifdefequal{\gtr@tmp@oldfam}{\gtr@tmp@fam}{% + \dimdef#3{#3-\csuse{gtr@per@\gtr@tmp@oldper @c#1@val}+\csuse{gtr@per@#2@c#1@val}}% + }{% + \dimdef#3{#3-\csuse{gtr@per@\gtr@tmp@oldper @c#1@val}+\csuse{gtr@fam@\gtr@tmp@fam @offset}+\csuse{gtr@per@#2@c#1@val}}% + }% + \else + \ifcsname gtr@per@#2@c#1@thread\endcsname% + \dimdef#3{#3+\csuse{gtr@per@#2@c#1@tgap}}% + \letcs#2{gtr@per@#2@c#1@thread}% + \else% + \let#2=\@undefined% + \fi% + \fi% +} + +% #1 east/west +% #2 pid +% #3 sum +\def\gtr@cont@origin#1#2#3{% + \letcs\gtr@tmp@fam{gtr@per@#2@fam}% + \dimdef#3{\csuse{gtr@fam@\gtr@tmp@fam @offset}+\csuse{gtr@per@#2@c#1@val}}% +} + + +\def\gtr@cont@sew{% + \let\gtr@tmp@A@west@pid@old=\gtr@tmp@A@west@pid% + \gtr@cont@next{west}{\gtr@tmp@A@west@pid}{\gtr@tmp@A@west@sum}% + \gtr@cont@next{east}{\gtr@tmp@A@east@pid}{\gtr@tmp@A@east@sum}% + \gtr@cont@next{west}{\gtr@tmp@B@west@pid}{\gtr@tmp@B@west@sum}% + \let\gtr@tmp@B@east@pid@old=\gtr@tmp@B@east@pid% + \gtr@cont@next{east}{\gtr@tmp@B@east@pid}{\gtr@tmp@B@east@sum}% + % + \let\gtr@sew@next=\relax% + \ifdefined\gtr@tmp@A@east@pid + % A tree present + \ifdefined\gtr@tmp@B@west@pid + % B tree present + \gtr@cont@set@distance{\gtr@tmp@B@west@pid}{\gtr@dist@further}% + \dimdef\gtr@temp{\gtr@tmp@A@east@sum-\gtr@tmp@B@west@sum+\gtr@cont@distance}% + \ifdim\gtr@temp>\gtr@tmp@offset\relax\let\gtr@tmp@offset=\gtr@temp\fi% + \let\gtr@sew@next=\gtr@cont@sew% + \else + % B tree finished + \cslet{gtr@per@\gtr@tmp@B@east@pid@old @ceast@thread}{\gtr@tmp@A@east@pid}% + \csdimdef{gtr@per@\gtr@tmp@B@east@pid@old @ceast@tgap}{\gtr@tmp@A@east@sum-\gtr@tmp@B@east@sum-\gtr@tmp@offset}% + \fi + \else + % A tree finished + \ifdefined\gtr@tmp@B@west@pid% + % B tree present + \cslet{gtr@per@\gtr@tmp@A@west@pid@old @cwest@thread}{\gtr@tmp@B@west@pid}% + \csdimdef{gtr@per@\gtr@tmp@A@west@pid@old @cwest@tgap}{\gtr@tmp@B@west@sum-\gtr@tmp@A@west@sum+\gtr@tmp@offset}% + % \else nothing to do + % B tree finished + \fi% + \fi% + \gtr@sew@next% +} + + +% Set distance value +% #1 node number +% #2 default distance +\def\gtr@cont@set@distance#1#2{% + \ifcsname gtr@per@#1@distance\endcsname% + \letcs\gtr@cont@distance{gtr@per@#1@distance}% + \else + \let\gtr@cont@distance=#2% + \fi% +} + + +% Merge tree (family) to existing tree +% #1 family number +% #2 distance +\def\gtr@cont@merge@tree#1#2{% + \let\gtr@tmp@A@west@pid=\gtr@tmp@nextwest% + \let\gtr@tmp@A@east@pid=\gtr@tmp@nexteast% + \letcs\gtr@tmp@B@west@pid{gtr@fam@#1@cwest@anchor}% + \letcs\gtr@tmp@B@east@pid{gtr@fam@#1@ceast@anchor}% + % + \gtr@cont@origin{west}{\gtr@tmp@A@west@pid}{\gtr@tmp@A@west@sum}% + \gtr@cont@origin{east}{\gtr@tmp@A@east@pid}{\gtr@tmp@A@east@sum}% + \gtr@cont@origin{west}{\gtr@tmp@B@west@pid}{\gtr@tmp@B@west@sum}% + \gtr@cont@origin{east}{\gtr@tmp@B@east@pid}{\gtr@tmp@B@east@sum}% + % + \edef\gtr@tmp@nexteast{\gtr@tmp@B@east@pid}% + \gtr@cont@set@distance{\gtr@tmp@B@west@pid}{#2}% + \dimdef\gtr@tmp@offset{\gtr@tmp@A@east@sum-\gtr@tmp@B@west@sum+\gtr@cont@distance}% + % + \gtr@cont@sew% + % + \csdimdef{gtr@fam@#1@offset}{\gtr@tmp@offset}% + \letcs\gtr@gnode{gtr@fam@#1@g}% + \gtr@cont@settomid\gtr@tmp@linkpos{\gtr@gnode}% + \dimdef\gtr@tmp@linkpos{\gtr@tmp@offset+\gtr@tmp@linkpos}% +} + + +% Merge node (person) to existing tree +% #1 node number +% #2 distance +\def\gtr@cont@merge@node#1#2{% + \let\gtr@tmp@A@east@pid=\gtr@tmp@nexteast% + \gtr@cont@origin{east}{\gtr@tmp@A@east@pid}{\gtr@tmp@A@east@sum}% + \gtr@cont@set@distance{#1}{#2}% + \dimdef\gtr@temp{\gtr@tmp@A@east@sum+\gtr@cont@distance}% + \csdimdef{gtr@per@#1@cwest@val}{\gtr@temp}% + \csdimdef{gtr@per@#1@ceast@val}{\csuse{gtr@per@#1@dim}+\gtr@temp}% + \edef\gtr@tmp@nexteast{#1}% + \gtr@cont@next{east}{\gtr@tmp@A@east@pid}{\gtr@tmp@A@east@sum}% + \ifdef{\gtr@tmp@A@east@pid}{% + \cslet{gtr@per@#1@ceast@thread}{\gtr@tmp@A@east@pid}% + \csdimdef{gtr@per@#1@ceast@tgap}{\gtr@tmp@A@east@sum-\csuse{gtr@per@#1@ceast@val}}% + }{}% + \gtr@cont@settomid\gtr@tmp@linkpos{#1}% +} + + +% Setup a first tree (family) +% #1 family number +\def\gtr@cont@first@tree#1{% + \letcs\gtr@tmp@nextwest{gtr@fam@#1@cwest@anchor}% + \letcs\gtr@tmp@nexteast{gtr@fam@#1@ceast@anchor}% + \letcs\gtr@gnode{gtr@fam@#1@g}% + \gtr@cont@settomid\gtr@tmp@linkpos{\gtr@gnode}% +} + + +% Setup a node (person) +% #1 node number +\def\gtr@cont@first@node#1{% + \edef\gtr@tmp@nextwest{#1}% + \edef\gtr@tmp@nexteast{#1}% + \csdimdef{gtr@per@#1@cwest@val}{\z@}% + \csletcs{gtr@per@#1@ceast@val}{gtr@per@#1@dim}% + \gtr@cont@settomid\gtr@tmp@linkpos{#1}% +} + + +% Merge an anchor node (person) +% #1 node number +% #2 distance +\def\gtr@cont@merge@anchor#1#2{% + \letcs\gtr@tmp@A@east@pid{gtr@fam@\gtr@currentfamily @ceast@anchor}% + % + \gtr@cont@set@distance{#1}{#2}% + \dimdef\gtr@temp{\csuse{gtr@per@\gtr@tmp@A@east@pid @ceast@val}+\gtr@cont@distance}% + % + \csdimdef{gtr@per@#1@cwest@val}{\gtr@temp}% + \csdimdef{gtr@per@#1@ceast@val}{\gtr@temp+\csuse{gtr@per@#1@dim}}% + \csedef{gtr@fam@\gtr@currentfamily @ceast@anchor}{#1}% + \ifdef{\gtr@tmp@nexteast}{\cslet{gtr@per@#1@ceast@next}{\gtr@tmp@nexteast}}{}% + \gtr@cont@settomid\gtr@tmp@linkpos{#1}% +} + + +% Setup an anchor node (person) +% #1 node number +\def\gtr@cont@first@anchor#1{% + \csedef{gtr@fam@\gtr@currentfamily @cwest@anchor}{#1}% + \csedef{gtr@fam@\gtr@currentfamily @ceast@anchor}{#1}% + \ifdef{\gtr@tmp@nextwest}{\cslet{gtr@per@#1@cwest@next}{\gtr@tmp@nextwest}}{}% + \ifdef{\gtr@tmp@nexteast}{\cslet{gtr@per@#1@ceast@next}{\gtr@tmp@nexteast}}{}% + \csdimdef{gtr@per@#1@cwest@val}{\z@}% + \csletcs{gtr@per@#1@ceast@val}{gtr@per@#1@dim}% + \gtr@cont@settomid\gtr@tmp@linkpos{#1}% +} + + +% Shift contourvalues +% #1 list of persons (macro) +% #2 shift value +\def\gtr@cont@shift#1#2{% + \def\do##1{% + \csdimdef{gtr@per@##1@cwest@val}{\csuse{gtr@per@##1@cwest@val}+#2}% + \csdimdef{gtr@per@##1@ceast@val}{\csuse{gtr@per@##1@ceast@val}+#2}% + }% + \dolistloop{#1}% +} + +% Shift contourvalues +% #1 list of persons (macro) +% #2 shift value +\def\gtr@cont@shift@sandclock#1#2{% + \def\do##1{% + \ifcsname gtr@per@##1@chiof\endcsname% + \letcs\gtr@temp@fam{gtr@per@##1@fam}% + \csdimdef{gtr@fam@\gtr@temp@fam @offset}{\csuse{gtr@fam@\gtr@temp@fam @offset}+#2}% + \else% + \csdimdef{gtr@per@##1@cwest@val}{\csuse{gtr@per@##1@cwest@val}+#2}% + \csdimdef{gtr@per@##1@ceast@val}{\csuse{gtr@per@##1@ceast@val}+#2}% + \fi% + }% + \dolistloop{#1}% +} + + +% Set to mid of person +% #1 macro which gets the value +% #2 node number +\def\gtr@cont@settomid#1#2{% + \dimdef#1{(\csuse{gtr@per@#2@cwest@val}+\csuse{gtr@per@#2@ceast@val})/2}% +} + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Positioning +%%%%%%%%%%%%%%%%%%%%%%% + + +\def\gtr@positioning@fam@down#1#2{% + \csdimdef{gtr@fam@#1@x}{\csuse{gtr@fam@#2@x}+\csuse{gtr@fam@#1@offset}}% +} + +\let\gtr@positioning@fam@up=\gtr@positioning@fam@down + +\def\gtr@positioning@fam@left#1#2{% + \csdimdef{gtr@fam@#1@y}{\csuse{gtr@fam@#2@y}-\csuse{gtr@fam@#1@offset}}% +} + +\let\gtr@positioning@fam@right=\gtr@positioning@fam@left + +\def\gtr@positioning@famoff@down#1{% + \csdimdef{gtr@fam@#1@x}{\csuse{gtr@fam@#1@offset}}% +} + +\let\gtr@positioning@famoff@up=\gtr@positioning@famoff@down + +\def\gtr@positioning@famoff@left#1{% + \csdimdef{gtr@fam@#1@y}{-\csuse{gtr@fam@#1@offset}}% +} + +\let\gtr@positioning@famoff@right=\gtr@positioning@famoff@left + +\def\gtr@positioning@family#1{% + \ifcsname gtr@fam@#1@fam\endcsname% + \letcs\gtr@encfamily{gtr@fam@#1@fam}% + \gtr@positioning@fam{#1}{\gtr@encfamily}% + \else% + \ifcsname gtr@fam@#1@offset\endcsname% + \gtr@positioning@famoff{#1}% + \fi% + \fi% +} + +\def\gtr@positioning@per@down#1#2{% + \csdimdef{gtr@per@#1@x}{\csuse{gtr@fam@#2@x}+\csuse{gtr@per@#1@cwest@val}}% +} + +\let\gtr@positioning@per@up=\gtr@positioning@per@down + +\def\gtr@positioning@per@left#1#2{% + \csdimdef{gtr@per@#1@y}{\csuse{gtr@fam@#2@y}-\csuse{gtr@per@#1@cwest@val}}% +} + +\let\gtr@positioning@per@right=\gtr@positioning@per@left + +\def\gtr@positioning@person#1{% + \letcs\gtr@encfamily{gtr@per@#1@fam}% + \gtr@positioning@per{#1}{\gtr@encfamily}% +} + + +\def\gtr@positioning{% + \letcs\gtr@positioning@fam{gtr@positioning@fam@\gtr@timeflow}% + \letcs\gtr@positioning@famoff{gtr@positioning@famoff@\gtr@timeflow}% + \letcs\gtr@positioning@per{gtr@positioning@per@\gtr@timeflow}% + % + \gtr@forall@families{\gtr@positioning@family}% + \gtr@forall@nodes{\gtr@positioning@person}% +} + + +\def\gtr@shift@node#1{% + \csdimdef{gtr@per@#1@x}{\csuse{gtr@per@#1@x}+\gtr@tmp@xshift}% + \csdimdef{gtr@per@#1@y}{\csuse{gtr@per@#1@y}+\gtr@tmp@yshift}% +} + +\def\gtr@shift@family#1{% + \csdimdef{gtr@fam@#1@pos}{\csuse{gtr@fam@#1@pos}+\gtr@tmp@pshift}% +} + +\def\gtr@shiftall{% + \gtr@forall@nodes{\gtr@shift@node}% + \gtr@forall@families{\gtr@shift@family}% +} + +\def\gtr@dimen@correction@up#1#2#3#4{} +\def\gtr@dimen@correction@down#1#2#3#4{\dimdef#2{#2-#4}} +\def\gtr@dimen@correction@left#1#2#3#4{\dimdef#1{#1-#3}\dimdef#2{#2-#4}} +\def\gtr@dimen@correction@right#1#2#3#4{\dimdef#2{#2-#4}} + + +% #1: person id +% #2: x (out) +% #3: y (out) +% #4: width (out) +% #5: height (out) +\def\gtr@getDimenForId#1#2#3#4#5{% + \gtr@getPerNumForId{#1}% + \let\gtr@tmp@pnum\gtr@tmp@num% node number for ID + \letcs#2{gtr@per@\gtr@tmp@pnum @x}% + \letcs#3{gtr@per@\gtr@tmp@pnum @y}% + \dimdef#4{\wd\csuse{gtr@per@\gtr@tmp@num @box}}% + \dimdef#5{\ht\csuse{gtr@per@\gtr@tmp@num @box}+\dp\csuse{gtr@per@\gtr@tmp@num @box}}% + \csuse{gtr@dimen@correction@\gtr@timeflow}{#2}{#3}{#4}{#5}% +} + +\def\gtr@adjust@right#1#2{% + \dimdef\gtr@tmp@xshift{\gtr@xa-\gtr@xb+#1}% + \dimdef\gtr@tmp@yshift{\gtr@ya-\gtr@yb-\gtr@hb/2+#2}% +} + +\def\gtr@adjust@left#1#2{% + \dimdef\gtr@tmp@xshift{\gtr@xa-\gtr@xb-\gtr@wb-#1}% + \dimdef\gtr@tmp@yshift{\gtr@ya-\gtr@yb-\gtr@hb/2+#2}% +} + +\def\gtr@adjust@above#1#2{% + \dimdef\gtr@tmp@xshift{\gtr@xa-\gtr@xb-\gtr@wb/2+#2}% + \dimdef\gtr@tmp@yshift{\gtr@ya-\gtr@yb+#1}% +} + +\def\gtr@adjust@below#1#2{% + \dimdef\gtr@tmp@xshift{\gtr@xa-\gtr@xb-\gtr@wb/2+#2}% + \dimdef\gtr@tmp@yshift{\gtr@ya-\gtr@yb-\gtr@hb-#1}% +} + +% #1: node to be adjusted +% #2: direction +% #3: reference position +% #4: distance +% #5: shift +\def\gtr@adjust#1#2#3#4#5{% + \tcb@gettikzxy{(#3)}{\gtr@xa}{\gtr@ya}% + \gtr@getDimenForId{#1}{\gtr@xb}{\gtr@yb}{\gtr@wb}{\gtr@hb}% + \ifcsname gtr@adjust@#2\endcsname% + \csuse{gtr@adjust@#2}{#4}{#5}% + \ifgtr@timeflow@vertical% + \let\gtr@tmp@pshift=\gtr@tmp@yshift% + \else% + \let\gtr@tmp@pshift=\gtr@tmp@xshift% + \fi% + \gtr@shiftall% + \else\gtr@error{adjust direction '#2' undefined}{% + You passed an unknown value '#2'}\fi% +} + +% #1: node to be set +% #2: reference position +\def\gtr@setposition#1#2{% + \tcb@gettikzxy{(#2)}{\gtr@xa}{\gtr@ya}% + \gtr@getDimenForId{#1}{\gtr@xb}{\gtr@yb}{\gtr@wb}{\gtr@hb}% + \dimdef\gtr@tmp@xshift{\gtr@xa-\gtr@xb-\gtr@wb/2}% + \dimdef\gtr@tmp@yshift{\gtr@ya-\gtr@yb-\gtr@hb/2}% + \ifgtr@timeflow@vertical% + \let\gtr@tmp@pshift=\gtr@tmp@yshift% + \else% + \let\gtr@tmp@pshift=\gtr@tmp@xshift% + \fi% + \gtr@shiftall% +} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.debug.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.debug.code.tex deleted file mode 100644 index 47f7807ef82..00000000000 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.debug.code.tex +++ /dev/null @@ -1,134 +0,0 @@ -%% The LaTeX package genealogytree - version 0.10 (2015/01/12) -%% gtrcore.debug.code.tex: Debugger -%% -%% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2014-2015 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{0.10} - -\definecolorseries{gtr@debug}{rgb}{grad}[rgb]{.95,.85,.55}{3,11,17} -\resetcolorseries[16]{gtr@debug} - -\def\gtr@debug@colorletfamily#1{% - \pgfmathsetmacro\gtr@temp@col{int(Mod(\csuse{gtr@fam@\gtr@currentfamily @debugnum},16)+1)}% - \colorlet{#1}{gtr@debug!![\gtr@temp@col]}% -} - -\def\gtr@debug@setleveldistance#1{% - \pgfmathsetmacro#1{-(\gtrkv@debug@markerleft-\gtrkv@debug@markerright)*e^(-abs(\number\gtr@c@level)/4)-\gtrkv@debug@markerright}% -} - -\tcbset{% - gtr@debug@box/.style={enhanced,beforeafter skip=0pt,flushleft upper, - boxrule=0.25mm,leftrule=5mm,colframe=gtr@debug@color, - arc=5mm,boxsep=0pt,top=1mm,bottom=1mm}, - debug marker left/.store in=\gtrkv@debug@markerleft, - debug marker right/.store in=\gtrkv@debug@markerright, - debug marker left=1.3cm, - debug marker right=0.3cm, -} - -\def\gtr@debug@person@content#1#2#3#4{% - \gtr@debug@colorletfamily{gtr@debug@color}% - \begin{tcolorbox}[gtr@debug@box,sharp corners=west, - interior style={top color=gtr@debug@color!30!white,bottom color=gray!10!white}, - overlay={\node[fill=gtr@debug@color!10!white,draw=black] at ([xshift=2.5mm]frame.west) {\small #1};}] - #2: Individual~\gtr@currentperson~(\number\gtr@c@pid), - Family~\gtr@currentfamily~(\csuse{gtr@fam@\gtr@currentfamily @debugnum}), - Level~\number\gtr@c@level% - \ifblank{#3}{}{\par Options: {\ttfamily\detokenize{#3}}}% - \par Content: {\ttfamily\detokenize{#4}}% - \end{tcolorbox}% -} - -\def\gtr@debug@family@begin#1#2{% - \gtr@debug@colorletfamily{gtr@debug@color}% - \begin{tcolorbox}[gtr@debug@box,rightrule=5mm,sharp corners, - colback=gtr@debug@color!30!white, - overlay={% - \gtr@debug@setleveldistance{\gtr@temp}% - \path[draw=gtr@debug@color,very thick,->] (frame.west) -- ++(\gtr@temp pt,0) -- ++(0,-0.5); - }]% - Start: #1 Family~{\csuse{gtr@fam@\gtr@currentfamily @debugnum}} (\gtr@currentfamily), Level~\number\gtr@c@level - \ifblank{#2}{}{\par Options: {\ttfamily\detokenize{#2}}}% - \end{tcolorbox}% -} - -\def\gtr@debug@family@end#1{% - \gtr@debug@colorletfamily{gtr@debug@color}% - \begin{tcolorbox}[gtr@debug@box,rightrule=5mm,sharp corners, - colback=gtr@debug@color!30!white, - overlay={% - \gtr@debug@setleveldistance{\gtr@temp}% - \path[draw=gtr@debug@color,very thick,->] (frame.west) -- ++(\gtr@temp pt,0) -- ++(0,0.5); - }]% - End: #1 Family~{\csuse{gtr@fam@\gtr@currentfamily @debugnum}} (\gtr@currentfamily), Level~\number\gtr@c@level - \end{tcolorbox}% -} - -\newcommand{\gtrparserdebug}[2][]{% - \begingroup% - \parskip0pt% - % - \appto\gtr@next@family{\csedef{gtr@fam@\gtr@currentfamily @debugnum}{\number\gtr@c@family}}% - % - \let\gtr@org@@parse@err=\gtr@parse@err% - \let\gtr@org@@parse@error=\gtr@parse@error% - \let\gtr@org@@parse@error@token=\gtr@parse@error@token% - \def\gtr@parse@err{% - \fbox{\textbf{Parser error}}% - \gtr@org@@parse@err}% - \long\def\gtr@parse@error##1{% - \fbox{\textbf{Parser: undefined ##1}}% - \gtr@org@@parse@error{##1}}% - \long\def\gtr@parse@error@token{% - \fbox{\textbf{Parser: unfeasible token '\@gtr@token'}}% - \gtr@org@@parse@error@token}% - % - \def\gtr@proc@@parent@begin##1{\gtr@debug@family@begin{Parent}{##1}}% - \def\gtr@proc@@child@begin##1{\gtr@debug@family@begin{Child}{##1}}% - \def\gtr@proc@@union@begin##1{\gtr@debug@family@begin{Union}{##1}}% - \def\gtr@proc@@sandclock@begin##1{\gtr@debug@family@begin{Sandclock}{##1}}% - % - \def\gtr@proc@@parent@end{\gtr@debug@family@end{Parent}}% - \def\gtr@proc@@child@end{\gtr@debug@family@end{Child}}% - \def\gtr@proc@@union@end{\gtr@debug@family@end{Union}}% - \def\gtr@proc@@sandclock@end{\gtr@debug@family@end{Sandclock}}% - % - \long\def\gtr@proc@@parent@g@content##1##2{\gtr@debug@person@content{g}{Child}{##1}{##2}}% - \long\def\gtr@proc@@child@g@content##1##2{\gtr@debug@person@content{g}{Parent}{##1}{##2}}% - \long\def\gtr@proc@@p@content##1##2{\gtr@debug@person@content{p}{Parent}{##1}{##2}}% - \long\def\gtr@proc@@c@content##1##2{\gtr@debug@person@content{c}{Child}{##1}{##2}}% - % - \def\gtr@positioning{}% - % - \colorlet{gtr@debug@color}{black!75!white}% - \begin{tcolorbox}[gtr@debug@box,before skip=\medskipamount, - sharp corners,toprule=1mm,rightrule=5mm] - Genealogytree Parser Debugger - \ifblank{#1}{}{\par Graph Options: {\ttfamily\detokenize{#1}}}% - \end{tcolorbox}% - \gtr@parsegraph[#1]{#2}% - \begin{tcolorbox}[ - gtr@debug@box,after skip=\medskipamount,sharp corners,colframe=black!75!white, - bottomrule=1mm,rightrule=5mm] - End of Genealogytree Parser Debugger - \end{tcolorbox}% - \endgroup% -} - -\newcommand{\gtrparserdebuginput}[2][]{% - \gtrparserdebug[#1]{input{#2}}} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.drawing.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.drawing.code.tex new file mode 100644 index 00000000000..d79674f49ea --- /dev/null +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.drawing.code.tex @@ -0,0 +1,558 @@ +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) +%% gtrcore.drawing.code.tex: Drawing +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2013-2015 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{0.90} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Drawing +%%%%%%%%%%%%%%%%%%%%%%% + +\tikzset{genealogytree edges scope/.style={}} + +\def\gtr@reset@after{% + \global\def\gtrkv@after@parser{}% + \def\gtrkv@after@tree{}% + \def\gtr@parse@afternode@hook{}% + \def\gtr@parse@afterfamily@hook{}% + \def\gtr@parse@beginfamily@hook{}% + \def\gtr@parse@endfamily@hook{}% + \undef\gtr@parse@afternode@hook@content% + \undef\gtr@parse@afterfamily@hook@content% + \undef\gtr@parse@beginfamily@hook@content% + \undef\gtr@parse@endfamily@hook@content% +} + +\newcommand{\genealogytree}[2][]{% + \ifdefined\pgfpictureid% + \else% + \gtr@error{\genealogytree\space outside tikzpicture environment} + {\genealogytree\space can only be used inside a tikzpicture environment. + Alternatively, use genealogypicture (see documentation).}% + \fi% + \gtr@reset@after% + \tcb@layer@pushup% + \gtr@parsegraph[#1]{#2}% + \gtrkv@after@parser% + % + \tikzset{gtr@init@timeflow@\gtrkv@timeflow}% + \letcs\gtr@predraw@family{gtr@predraw@family@\gtr@timeflow}% + % + \gtr@create@all@persons% + \gtr@draw@all@families% + \gtr@draw@all@boxes% + % + \gtrkv@after@tree% +} + + +\NewEnviron{genealogypicture}[1][]{% + \ifdefined\pgfpictureid% + \gtr@error{genealogypicture inside tikzpicture environment} + {genealogypicture cannot be used inside a tikzpicture environment. + Alternatively, use \genealogytree\space (see documentation).}% + \fi% + \gtr@reset@after% + \def\gtr@reset@after{}% + \gtrset{#1}% + \begingroup\edef\x{\endgroup\noexpand\begin{tikzpicture}[\expandonce\gtrkv@tikzpicture]% + \noexpand\genealogytree{\expandonce\BODY}% + \noexpand\end{tikzpicture}}% + \x% +} + +\newcommand{\genealogytreeinput}[2][]{\genealogytree[#1]{input{#2}}} + +\tikzset{% + gtr@init@timeflow@down/.style={gtr@node@person/.style={below right}},% + gtr@init@timeflow@up/.style={gtr@node@person/.style={above right}},% + gtr@init@timeflow@left/.style={gtr@node@person/.style={below left}},% + gtr@init@timeflow@right/.style={gtr@node@person/.style={below right}}% +} + +\def\gtr@create@node@person#1{% + \letcs\gtr@temp{gtr@per@#1@box}% + \node[minimum width=\dimexpr\wd\gtr@temp\relax, + minimum height=\dimexpr\ht\gtr@temp+\dp\gtr@temp\relax, + alias={\csuse{gtr@per@#1@id}}] (p@#1) + at (\csuse{gtr@per@#1@x},\csuse{gtr@per@#1@y}){}; +} + +\def\gtr@create@all@persons{% + \begin{scope}[line width=0pt,inner sep=0pt,outer sep=0pt,draw=none,fill=none,rectangle,gtr@node@person]% + \gtr@forall@nodes{\gtr@create@node@person}% + \end{scope}% +} + +\def\gtr@draw@box@person#1{% + \node at (p@#1) {\unhbox\csuse{gtr@per@#1@box}};% +} + +\def\gtr@draw@all@boxes{% + \begin{scope}[line width=0pt,inner sep=0pt,outer sep=0pt,draw=none,fill=none,rectangle]% + \gtr@forall@nodes{\gtr@draw@box@person}% + \end{scope}% +} + +\newcommand*{\gtr@forlistloop}[2]{% + \def\gtr@tmp@macro##1{#1(##1)}% + \ifdefined#2\forlistloop{\gtr@tmp@macro}{#2}\fi% +} + +%% edge draw preparation +\def\gtr@reset@minmax{% + \dimdef\gtr@dim@min{\maxdimen}% + \dimdef\gtr@dim@max{-\maxdimen}% + \let\gtr@level@mid=\@undefined% + \let\gtr@dat@draw@x=\@undefined% + \let\gtr@dat@draw@y=\@undefined% + \let\gtr@dat@draw@par=\@undefined% + \let\gtr@dat@draw@chi=\@undefined% + \def\gtr@legnum{0}% +} + +\def\gtr@record@minmax#1{% + \ifdim\dimexpr#1<\gtr@dim@min\relax\let\gtr@dim@min=#1\fi% + \ifdim\dimexpr#1>\gtr@dim@max\relax\let\gtr@dim@max=#1\fi% + \numdef\gtr@legnum{\gtr@legnum+1}% +} + +\def\gtr@process@anchor#1#2{% + \pgf@process{\pgfpointanchor{#1}{#2}}% + \dimdef\gtr@x{\pgf@x}% + \dimdef\gtr@y{\pgf@y}% +} + +\def\gtr@predraw@family@vert#1#2#3{% + \gtr@reset@minmax% + \def\do##1{% + \gtr@process@anchor{p@##1}{#2}% + \gtr@record@minmax{\gtr@x}% + \listeadd{\gtr@dat@draw@chi}{\gtr@x,\gtr@y}% + }% + \ifcsname gtr@fam@#1@chi\endcsname\dolistcsloop{gtr@fam@#1@chi}\fi% + \letcs\gtr@gnode{gtr@fam@#1@g}% + \def\do##1{% + \gtr@process@anchor{p@##1}{#3}% + \edef\gtr@temp{##1}% + \ifdefequal{\gtr@gnode}{\gtr@temp}{% + \edef\gtr@temp@w{\csuse{gtr@per@##1@dim}}% + \dimdef\gtr@x{\gtr@x-0.5\dimexpr\gtr@temp@w\relax+\csname gtr@fam@#1@frac\endcsname\dimexpr\gtr@temp@w}% + }{}% + \gtr@record@minmax{\gtr@x}% + \listeadd{\gtr@dat@draw@par}{\gtr@x,\gtr@y}% + }% + \ifcsname gtr@fam@#1@par\endcsname\dolistcsloop{gtr@fam@#1@par}\fi% + \ifnum\gtr@legnum>0\relax% + \dimdef\gtr@dat@draw@x{(\gtr@dim@min+\gtr@dim@max)/2}% + \else% + \letcs\gtr@dat@draw@x{gtr@fam@#1@x}% + \fi% + \letcs\gtr@dat@draw@y{gtr@fam@#1@pos}% +} + +\def\gtr@predraw@family@down#1{% + \gtr@predraw@family@vert{#1}{\gtrkv@edge@anchor@vert@A}{\gtrkv@edge@anchor@vert@B}% +} + +\def\gtr@predraw@family@up#1{% + \gtr@predraw@family@vert{#1}{\gtrkv@edge@anchor@vert@B}{\gtrkv@edge@anchor@vert@A}% +} + +\def\gtr@predraw@family@hori#1#2#3{% + \gtr@reset@minmax% + \def\do##1{% + \gtr@process@anchor{p@##1}{#2}% + \gtr@record@minmax{\gtr@y}% + \listeadd{\gtr@dat@draw@chi}{\gtr@x,\gtr@y}% + }% + \ifcsname gtr@fam@#1@chi\endcsname\dolistcsloop{gtr@fam@#1@chi}\fi% + \letcs\gtr@gnode{gtr@fam@#1@g}% + \def\do##1{% + \gtr@process@anchor{p@##1}{#3}% + \edef\gtr@temp{##1}% + \ifdefequal{\gtr@gnode}{\gtr@temp}{% + \edef\gtr@temp@w{\csuse{gtr@per@##1@dim}}% + \dimdef\gtr@y{\gtr@y+0.5\dimexpr\gtr@temp@w\relax-\csname gtr@fam@#1@frac\endcsname\dimexpr\gtr@temp@w}% + }{}% + \gtr@record@minmax{\gtr@y}% + \listeadd{\gtr@dat@draw@par}{\gtr@x,\gtr@y}% + }% + \ifcsname gtr@fam@#1@par\endcsname\dolistcsloop{gtr@fam@#1@par}\fi% + \letcs\gtr@dat@draw@x{gtr@fam@#1@pos}% + \ifnum\gtr@legnum>0\relax% + \dimdef\gtr@dat@draw@y{(\gtr@dim@min+\gtr@dim@max)/2}% + \else% + \letcs\gtr@dat@draw@y{gtr@fam@#1@y}% + \fi% +} + +\def\gtr@predraw@family@left#1{% + \gtr@predraw@family@hori{#1}{\gtrkv@edge@anchor@hori@A}{\gtrkv@edge@anchor@hori@B}% +} + +\def\gtr@predraw@family@right#1{% + \gtr@predraw@family@hori{#1}{\gtrkv@edge@anchor@hori@B}{\gtrkv@edge@anchor@hori@A}% +} + +% edge mode = perpendicular + +\def\gtr@edge@perpendicular@line@vert(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsend{}\pgfsetshortenend{0pt}} (#1,#2)--(#1,\gtr@dat@draw@y); +} + +\def\gtr@edge@perpendicular@line@vert@inv(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsstart{}\pgfsetshortenstart{0pt}} (#1,\gtr@dat@draw@y)--(#1,#2); +} + +\def\gtr@edge@perpendicular@hori(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsend{}\pgfsetshortenend{0pt}} (#1,#2)--(\gtr@dat@draw@x,#2); +} + +\def\gtr@edge@perpendicular@hori@inv(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsstart{}\pgfsetshortenstart{0pt}} (\gtr@dat@draw@x,#2)--(#1,#2); +} + +\def\gtr@edge@perpendicular@down{% + \gtr@forlistloop{\gtr@edge@perpendicular@line@vert@inv}{\gtr@dat@draw@chi}% + \gtr@forlistloop{\gtr@edge@perpendicular@line@vert}{\gtr@dat@draw@par}% + \draw[line cap=round,gtr@link,-]\pgfextra{\pgfsetshortenstart{0pt}\pgfsetshortenend{0pt}} (\gtr@dim@min,\gtr@dat@draw@y)--(\gtr@dim@max,\gtr@dat@draw@y);% +} + +\let\gtr@edge@perpendicular@up\gtr@edge@perpendicular@down + +\def\gtr@edge@perpendicular@left{% + \gtr@forlistloop{\gtr@edge@perpendicular@hori@inv}{\gtr@dat@draw@chi}% + \gtr@forlistloop{\gtr@edge@perpendicular@hori}{\gtr@dat@draw@par}% + \draw[line cap=round,gtr@link,-]\pgfextra{\pgfsetshortenstart{0pt}\pgfsetshortenend{0pt}} (\gtr@dat@draw@x,\gtr@dim@min)--(\gtr@dat@draw@x,\gtr@dim@max);% +} + +\let\gtr@edge@perpendicular@right\gtr@edge@perpendicular@left + + +% edge mode = rounded + +\def\gtr@edge@rounded@line@vert(#1,#2){% + \def\gtr@temp{\pgfsetcornersarced{\pgfpoint{\gtrkv@edge@arc}{\gtrkv@edge@arc}}}% + \ifdim\dimexpr#1-\gtr@dat@draw@x>-\gtrkv@edge@arc\relax% + \ifdim\dimexpr#1-\gtr@dat@draw@x<\gtrkv@edge@arc\relax% + \def\gtr@temp{}% + \fi\fi% + \draw[gtr@link]\pgfextra{\gtr@temp\pgfsetarrowsend{}\pgfsetshortenend{0pt}} (#1,#2)|-(dat@draw);% +} + +\def\gtr@edge@rounded@line@vert@inv(#1,#2){% + \def\gtr@temp{\pgfsetcornersarced{\pgfpoint{\gtrkv@edge@arc}{\gtrkv@edge@arc}}}% + \ifdim\dimexpr#1-\gtr@dat@draw@x>-\gtrkv@edge@arc\relax% + \ifdim\dimexpr#1-\gtr@dat@draw@x<\gtrkv@edge@arc\relax% + \def\gtr@temp{}% + \fi\fi% + \draw[gtr@link]\pgfextra{\gtr@temp\pgfsetarrowsstart{}\pgfsetshortenstart{0pt}} (dat@draw)-|(#1,#2);% +} + +\def\gtr@edge@rounded@line@hori(#1,#2){% + \def\gtr@temp{\pgfsetcornersarced{\pgfpoint{\gtrkv@edge@arc}{\gtrkv@edge@arc}}}% + \ifdim\dimexpr#2-\gtr@dat@draw@y>-\gtrkv@edge@arc\relax% + \ifdim\dimexpr#2-\gtr@dat@draw@y<\gtrkv@edge@arc\relax% + \def\gtr@temp{}% + \fi\fi% + \draw[gtr@link]\pgfextra{\gtr@temp\pgfsetarrowsend{}\pgfsetshortenend{0pt}} (#1,#2)-|(dat@draw);% +} + +\def\gtr@edge@rounded@line@hori@inv(#1,#2){% + \def\gtr@temp{\pgfsetcornersarced{\pgfpoint{\gtrkv@edge@arc}{\gtrkv@edge@arc}}}% + \ifdim\dimexpr#2-\gtr@dat@draw@y>-\gtrkv@edge@arc\relax% + \ifdim\dimexpr#2-\gtr@dat@draw@y<\gtrkv@edge@arc\relax% + \def\gtr@temp{}% + \fi\fi% + \draw[gtr@link]\pgfextra{\gtr@temp\pgfsetarrowsstart{}\pgfsetshortenstart{0pt}} (dat@draw)|-(#1,#2);% +} + +\def\gtr@edge@rounded@down{% + \gtr@forlistloop{\gtr@edge@rounded@line@vert@inv}{\gtr@dat@draw@chi}% + \gtr@forlistloop{\gtr@edge@rounded@line@vert}{\gtr@dat@draw@par}% + \draw[line cap=round,gtr@link,-]\pgfextra{\pgfsetshortenstart{0pt}\pgfsetshortenend{0pt}} (dat@draw)--(dat@draw);% +} + +\let\gtr@edge@rounded@up\gtr@edge@rounded@down + +\def\gtr@edge@rounded@left{% + \gtr@forlistloop{\gtr@edge@rounded@line@hori@inv}{\gtr@dat@draw@chi}% + \gtr@forlistloop{\gtr@edge@rounded@line@hori}{\gtr@dat@draw@par}% + \draw[line cap=round,gtr@link,-]\pgfextra{\pgfsetshortenstart{0pt}\pgfsetshortenend{0pt}} (dat@draw)--(dat@draw);% +} + +\let\gtr@edge@rounded@right\gtr@edge@rounded@left + + +% edge mode = swing + +\def\gtr@edge@swing@line@vertA(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsend{}\pgfsetshortenend{0pt}} (#1,#2) to[controls=+(270:\gtrkv@edge@swingcontrol) and +(90:\gtrkv@edge@swingcontrol)] (dat@draw); +} + +\def\gtr@edge@swing@line@vertA@inv(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsstart{}\pgfsetshortenstart{0pt}} (dat@draw) to[controls=+(90:\gtrkv@edge@swingcontrol) and +(270:\gtrkv@edge@swingcontrol)] (#1,#2); +} + +\def\gtr@edge@swing@line@vertB(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsend{}\pgfsetshortenend{0pt}} (#1,#2) to[controls=+(90:\gtrkv@edge@swingcontrol) and +(270:\gtrkv@edge@swingcontrol)] (dat@draw); +} + +\def\gtr@edge@swing@line@vertB@inv(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsstart{}\pgfsetshortenstart{0pt}} (dat@draw) to[controls=+(270:\gtrkv@edge@swingcontrol) and +(90:\gtrkv@edge@swingcontrol)] (#1,#2); +} + +\def\gtr@edge@swing@line@horiA(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsend{}\pgfsetshortenend{0pt}} (#1,#2) to[controls=+(180:\gtrkv@edge@swingcontrol) and +(0:\gtrkv@edge@swingcontrol)] (dat@draw); +} + +\def\gtr@edge@swing@line@horiA@inv(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsstart{}\pgfsetshortenstart{0pt}} (dat@draw) to[controls=+(0:\gtrkv@edge@swingcontrol) and +(180:\gtrkv@edge@swingcontrol)] (#1,#2); +} + +\def\gtr@edge@swing@line@horiB(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsend{}\pgfsetshortenend{0pt}} (#1,#2) to[controls=+(0:\gtrkv@edge@swingcontrol) and +(180:\gtrkv@edge@swingcontrol)] (dat@draw); +} + +\def\gtr@edge@swing@line@horiB@inv(#1,#2){% + \draw[gtr@link]\pgfextra{\pgfsetarrowsstart{}\pgfsetshortenstart{0pt}} (dat@draw) to[controls=+(180:\gtrkv@edge@swingcontrol) and +(0:\gtrkv@edge@swingcontrol)] (#1,#2); +} + +\def\gtr@edge@swing@down{% + \gtr@forlistloop{\gtr@edge@swing@line@vertB@inv}{\gtr@dat@draw@chi}% + \gtr@forlistloop{\gtr@edge@swing@line@vertA}{\gtr@dat@draw@par}% +} + +\def\gtr@edge@swing@up{% + \gtr@forlistloop{\gtr@edge@swing@line@vertA@inv}{\gtr@dat@draw@chi}% + \gtr@forlistloop{\gtr@edge@swing@line@vertB}{\gtr@dat@draw@par}% +} + +\def\gtr@edge@swing@left{% + \gtr@forlistloop{\gtr@edge@swing@line@horiB@inv}{\gtr@dat@draw@chi}% + \gtr@forlistloop{\gtr@edge@swing@line@horiA}{\gtr@dat@draw@par}% +} + +\def\gtr@edge@swing@right{% + \gtr@forlistloop{\gtr@edge@swing@line@horiA@inv}{\gtr@dat@draw@chi}% + \gtr@forlistloop{\gtr@edge@swing@line@horiB}{\gtr@dat@draw@par}% +} + + +% edge mode = mesh + +\def\gtr@edge@mesh@line(#1){% + \def\do##1{% + \begingroup\edef\x{\endgroup\noexpand\draw[gtr@link] (#1) to[\expandonce\gtrkv@edge@meshoptions] (##1);}% + \x% + }% + \dolistloop{\gtr@dat@draw@chi}% +} + +\def\gtr@edge@mesh@down{% + \gtr@forlistloop{\gtr@edge@mesh@line}{\gtr@dat@draw@par}% +} + +\let\gtr@edge@mesh@up\gtr@edge@mesh@down +\let\gtr@edge@mesh@left\gtr@edge@mesh@down +\let\gtr@edge@mesh@right\gtr@edge@mesh@down + + +% edge mode = custom + +\def\gtr@edge@custom@none@macro#1#2#3#4{} + +\def\gtr@edge@custom@down{\gtr@edge@custom@down@macro{\gtr@dat@draw@par}{\gtr@dat@draw@chi}{dat@draw}{gtr@link}} +\def\gtr@edge@custom@up{\gtr@edge@custom@up@macro{\gtr@dat@draw@par}{\gtr@dat@draw@chi}{dat@draw}{gtr@link}} +\def\gtr@edge@custom@left{\gtr@edge@custom@left@macro{\gtr@dat@draw@par}{\gtr@dat@draw@chi}{dat@draw}{gtr@link}} +\def\gtr@edge@custom@right{\gtr@edge@custom@right@macro{\gtr@dat@draw@par}{\gtr@dat@draw@chi}{dat@draw}{gtr@link}} + +%%%%%%%%%%%%%%%%%% + +\def\gtr@draw@family@extra(#1#2#3){% + \begingroup% + \csundef{gtr@fam@\gtr@currentfamily @par}% + \def\do##1{% + \gtr@getPerNumForId{##1}% + \ifdefempty{\gtr@tmp@num}{}{% + \listcseadd{gtr@fam@\gtr@currentfamily @par}{\gtr@tmp@num}}% + }% + \docsvlist{#1}% + \csundef{gtr@fam@\gtr@currentfamily @chi}% + \def\do##1{% + \gtr@getPerNumForId{##1}% + \ifdefempty{\gtr@tmp@num}{}{% + \listcseadd{gtr@fam@\gtr@currentfamily @chi}{\gtr@tmp@num}}% + }% + \docsvlist{#2}% + \gtrset{edges={#3}}% + % + \gtr@predraw@family{\gtr@currentfamily}% + \dimdef\gtr@dat@draw@x{\gtr@dat@draw@x+\gtrkv@edge@core@xshift}% + \dimdef\gtr@dat@draw@y{\gtr@dat@draw@y+\gtrkv@edge@core@yshift}% + \coordinate (dat@draw) at (\gtr@dat@draw@x,\gtr@dat@draw@y) {}; + \ifnum\numexpr\gtr@legnum>\gtrkv@edge@noleg\relax% + \tikzset{gtr@link/.style={/gtr/edge/gtr@edge@background}}%, + \csuse{gtr@edge@\gtrkv@edgemode @\gtr@timeflow}% + \tikzset{gtr@link/.style={/gtr/edge/gtr@edge@foreground}}%, + \csuse{gtr@edge@\gtrkv@edgemode @\gtr@timeflow}% + \fi% + \endgroup% +} + +\def\gtr@draw@family#1{% + \begingroup% + \let\gtr@extra@edges@pre=\@undefined% + \let\gtr@extra@edges@app=\@undefined% + \gtrset{code={% + \gtr@cs@keysalsofrom{gtr@fam@#1@opt@subtree}% + \gtr@cs@keysalsofrom{gtr@fam@#1@opt@family}% + }}% + \gtr@forlistloop{\gtr@draw@family@extra}{\gtr@extra@edges@pre}% + \gtr@predraw@family{#1}% + \dimdef\gtr@dat@draw@x{\gtr@dat@draw@x+\gtrkv@edge@core@xshift}% + \dimdef\gtr@dat@draw@y{\gtr@dat@draw@y+\gtrkv@edge@core@yshift}% + \coordinate[alias={\csuse{gtr@fam@#1@id}},alias={f@#1}] (dat@draw) at (\gtr@dat@draw@x,\gtr@dat@draw@y) {}; + \ifnum\numexpr\gtr@legnum>\gtrkv@edge@noleg\relax% + \tikzset{gtr@link/.style={/gtr/edge/gtr@edge@background}}%, + \csuse{gtr@edge@\gtrkv@edgemode @\gtr@timeflow}% + \tikzset{gtr@link/.style={/gtr/edge/gtr@edge@foreground}}%, + \csuse{gtr@edge@\gtrkv@edgemode @\gtr@timeflow}% + \fi% + \gtr@forlistloop{\gtr@draw@family@extra}{\gtr@extra@edges@app}% + \ifdefvoid{\gtrkv@family@label}{}{% + \begingroup\edef\x{\endgroup\noexpand\node[\expandonce\gtrkv@family@label@options] at (f@#1) {\expandonce\gtrkv@family@label};}% + \x% + }% + \endgroup% +} + +\def\gtr@draw@all@families{% + \begin{scope}[genealogytree edges scope]% + \gtrset{% + use family database, + database format=marriage, + code={\pgfkeysalsofrom{\gtrkv@database@label}}, + }% + \gtr@forall@families{\gtr@draw@family}% + \end{scope}% +} + + +% fit to family / subtree + +\def\gtr@addboundary@node#1{% + \pgfpointanchor{p@#1}{south west}\unskip% + \ifdim\pgf@x<\pgf@xa\relax% + \pgf@xa\pgf@x% + \fi% + \ifdim\pgf@y<\pgf@ya\relax% + \pgf@ya\pgf@y% + \fi% + \pgfpointanchor{p@#1}{north east}\unskip% + \ifdim\pgf@x>\pgf@xb\relax% + \pgf@xb\pgf@x% + \fi% + \ifdim\pgf@y>\pgf@yb\relax% + \pgf@yb\pgf@y% + \fi% +}% + + +\def\gtr@getboundingrectangle@family#1{% + \pgf@xa=\maxdimen% + \pgf@ya=\maxdimen% + \pgf@xb=-\maxdimen% + \pgf@yb=-\maxdimen% + \letcs\gtr@temp@list{gtr@fam@#1@chi}% + \ifdefvoid{\gtr@temp@list}{}{% + \forlistloop{\gtr@addboundary@node}{\gtr@temp@list}% + }% + \letcs\gtr@temp@list{gtr@fam@#1@par}% + \ifdefvoid{\gtr@temp@list}{}{% + \forlistloop{\gtr@addboundary@node}{\gtr@temp@list}% + }% + \ifdim\pgf@xa>\pgf@xb\relax% + \pgf@xa=0pt% + \pgf@ya=0pt% + \pgf@xb=0pt% + \pgf@yb=0pt% + \fi% +} + +\def\gtr@pushchildfamily#1{% + \ifcsname gtr@per@#1@parof\endcsname% + \gtr@famstack@push{\csname gtr@per@#1@parof\endcsname}% + \fi% +} + +\def\gtr@pushparentfamily#1{% + \ifcsname gtr@per@#1@chiof\endcsname% + \gtr@famstack@push{\csname gtr@per@#1@chiof\endcsname}% + \fi% +} + + +\def\gtr@getboundingrectangle@subtree#1{% + \pgf@xa=\maxdimen% + \pgf@ya=\maxdimen% + \pgf@xb=-\maxdimen% + \pgf@yb=-\maxdimen% + \gtr@famstack@push{#1}% + \loop% + \gtr@famstack@popto{\gtr@currentfamily}% + \letcs\gtr@temp@list{gtr@fam@\gtr@currentfamily @patchi}% + \ifdefvoid{\gtr@temp@list}{}{% + \forlistloop{\gtr@addboundary@node}{\gtr@temp@list}% + \ifcsstring{gtr@fam@\gtr@currentfamily @type}{chi}{% + \forlistloop{\gtr@pushchildfamily}{\gtr@temp@list}}% + {% + \ifcsstring{gtr@fam@\gtr@currentfamily @type}{uni}{% + \forlistloop{\gtr@pushchildfamily}{\gtr@temp@list}}{}% + }% + }% + \letcs\gtr@temp@list{gtr@fam@\gtr@currentfamily @patpar}% + \ifdefvoid{\gtr@temp@list}{}{% + \forlistloop{\gtr@addboundary@node}{\gtr@temp@list}% + \ifcsstring{gtr@fam@\gtr@currentfamily @type}{par}{% + \forlistloop{\gtr@pushparentfamily}{\gtr@temp@list}}{}% + }% + \ifnum\gtr@famstack@size>0\relax% + \repeat% + \ifdim\pgf@xa>\pgf@xb\relax% + \pgf@xa=0pt% + \pgf@ya=0pt% + \pgf@xb=0pt% + \pgf@yb=0pt% + \fi% +} + + +\tikzset{ + fit to family/.code={% + \gtr@getFamNumForId{#1}% + \gtr@getboundingrectangle@family{\gtr@tmp@num}% + \pgfkeysalso{fit/.expanded={(\the\pgf@xa,\the\pgf@ya)(\the\pgf@xb,\the\pgf@yb)}}% + }, + fit to subtree/.code={% + \gtr@getFamNumForId{#1}% + \gtr@getboundingrectangle@subtree{\gtr@tmp@num}% + \pgfkeysalso{fit/.expanded={(\the\pgf@xa,\the\pgf@ya)(\the\pgf@xb,\the\pgf@yb)}}% + }, +} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.node.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.node.code.tex new file mode 100644 index 00000000000..54366ddca53 --- /dev/null +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.node.code.tex @@ -0,0 +1,939 @@ +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) +%% gtrcore.node.code.tex: Node Boxes +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2013-2015 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{0.90} + +%%%%%%%%%%%%%% +% Processors % + +\gtrset{% + setNodeDimensionsFit/.code={\tcbset{% + gtrNodeDimensions/.style={% + width=\gtrNodeMinWidth, + fit width plus=\dimexpr\gtrNodeMaxWidth-\gtrNodeMinWidth\relax, + height=\gtrNodeMinHeight, + fit height plus=\dimexpr\gtrNodeMaxHeight-\gtrNodeMinHeight\relax},% + gtrNodeDimensionsLandscape/.style={% + height=\gtrNodeMinWidth, + fit height plus=\dimexpr\gtrNodeMaxWidth-\gtrNodeMinWidth\relax, + width=\gtrNodeMinHeight, + fit width plus=\dimexpr\gtrNodeMaxHeight-\gtrNodeMinHeight\relax}}% + },% + setNodeDimensionsTColorBox/.code={\tcbset{% + gtrNodeDimensions/.style={% + width=\gtrNodeMinWidth, + height=\gtrNodeMinHeight, + height plus=\dimexpr\gtrNodeMaxHeight-\gtrNodeMinHeight\relax},% + gtrNodeDimensionsLandscape/.style={% + height=\gtrNodeMinWidth, + height plus=\dimexpr\gtrNodeMaxWidth-\gtrNodeMinWidth\relax, + width=\gtrNodeMinHeight}}% + },% + setNodeDimensionsTCBox/.code={\tcbset{% + gtrNodeDimensions/.style={% + height=\gtrNodeMinHeight, + height plus=\dimexpr\gtrNodeMaxHeight-\gtrNodeMinHeight\relax},% + gtrNodeDimensionsLandscape/.style={% + height=\gtrNodeMinWidth, + height plus=\dimexpr\gtrNodeMaxWidth-\gtrNodeMinWidth\relax}}% + },% + setNodeDimensionsTikz/.code={\tikzset{% + gtrNodeDimensions/.style={% + minimum width=\gtrNodeMinWidth, + minimum height=\gtrNodeMinHeight},% + gtrNodeDimensionsLandscape/.style={% + minimum width=\gtrNodeMinHeight, + minimum height=\gtrNodeMinWidth}}% + }, +} + + +\gtrset{processing/fit/.style={% + no content interpreter, + node processor=\gtr@boxcontent@fit, + setNodeDimensionsFit +}} +\newcommand{\gtr@boxcontent@fit}{% + \edef\gtr@current@fontsize{\f@size pt}% + \tcboxfit[% + gtrNodeDimensions, + enhanced,clip upper, + hyphenationfix,nobeforeafter,boxsep=1pt, + fit basedim=\gtr@current@fontsize,fit skip=1.05, + top=0.2\tcbfitdim,bottom=0.2\tcbfitdim, + left=0.2\tcbfitdim,right=0.2\tcbfitdim, + middle=0.2\tcbfitdim, + fit fontsize macros,fonttitle=\normalsize, + code={\pgfkeysalsofrom{\gtrNodeBoxOptions}} + ]{\gtrBoxContent}% +} + + +\gtrset{processing/tcolorbox/.style={% + no content interpreter, + node processor=\gtr@boxcontent@tcolorbox, + setNodeDimensionsTColorBox +}} +\newcommand{\gtr@boxcontent@tcolorbox}{% + \begin{tcolorbox}[% + gtrNodeDimensions,enhanced,hyphenationfix,nobeforeafter, + code={\pgfkeysalsofrom{\gtrNodeBoxOptions}} + ]% + \gtrBoxContent% + \end{tcolorbox}% +} + + +\gtrset{processing/tcbox/.style={% + no content interpreter, + node processor=\gtr@boxcontent@tcbox, + setNodeDimensionsTCBox +}} +\newcommand{\gtr@boxcontent@tcbox}{% + \tcbox[% + enhanced,clip upper,hyphenationfix,nobeforeafter, + code={\pgfkeysalsofrom{\gtrNodeBoxOptions}} + ]{\gtrBoxContent}% +} + +\gtrset{processing/tcbox*/.style={% + no content interpreter, + node processor=\gtr@boxcontent@tcboxstar, + setNodeDimensionsTColorBox +}} +\newcommand{\gtr@boxcontent@tcboxstar}{% + \tcbox[% + gtrNodeDimensions,enhanced,clip upper,hyphenationfix,nobeforeafter, + valign=center,tcbox width=minimum center, + code={\pgfkeysalsofrom{\gtrNodeBoxOptions}} + ]{\gtrBoxContent}% +} + +\tikzset{gtr@set@boxoptions/.code={\pgfkeysalsofrom{\gtrNodeBoxOptions}}} +\gtrset{processing/tikznode/.style={% + no content interpreter, + node processor=\gtr@boxcontent@tikznode, + setNodeDimensionsTikz +}} +\newcommand{\gtr@boxcontent@tikznode}{% + \tikz\node[outer sep=0pt,gtr@set@boxoptions]{\gtrBoxContent};% +} + + +\gtrset{processing/database/.style={% + database content interpreter, + node processor=\gtr@boxcontent@fit, + setNodeDimensionsFit, +}} + + +\gtrset{ + content interpreter/.store in=\gtr@box@content@interpreter, + content interpreter code/.code={\long\def\gtr@box@content@interpreter##1{#1}}, + content interpreter content/.style={content interpreter code={\long\def\gtrBoxContent{#1}}}, + no content interpreter/.style={content interpreter content={##1}}, + deletion content interpreter/.style={content interpreter content=}, + database content interpreter/.style={content interpreter code={% + \gtrset{database/.cd,db@reset,##1}% + \gtrOptionsDatabase% + \let\gtrBoxContent\gtrPrintDatabase% + }}, + id content interpreter/.style={content interpreter code={% + \gtrset{id=##1,code={\gtr@key@keysalsofrom{/gtr/nopt/\gtr@gkv@id}}}% + \long\def\gtrBoxContent{##1}% + }}, + content interpreter id and content/.style 2 args={% + content interpreter code={% + \long\def\gtrBoxContent{#2}% + \begingroup\edef\x{\endgroup\noexpand\gtrset{id=#1}}\x% + \gtrset{code={\gtr@key@keysalsofrom{/gtr/nopt/\gtr@gkv@id}}}% + }% + }, +} + + +%%%%%%%%%%%%%%%%% +% Database Keys % + +\gtrset{% + database unknown key/.is choice, + database unknown key/ignore/.style={database/.unknown/.code=}, + database unknown key/save/.style={database/.unknown/.style={% + save/\pgfkeyscurrentname/.initial={##1}% + }}, + database unknown key/warn/.style={database/.unknown/.code={% + \gtr@warning{The database key '\pgfkeyscurrentname' is unknown}% + }}, + database unknown key/error/.style={database/.unknown/.code={% + \gtr@error{The database key '\pgfkeyscurrentname' is unknown}{% + Perhaps you misspelled it or forgot to define a code for it.}% + }}, + database unknown key=warn, + image prefix/.store in=\gtr@image@prefix, + image prefix=, + database/image/.code={% + \begingroup\edef\x{\endgroup\noexpand\def\noexpand\gtrDBimage{\expandonce{\gtr@image@prefix}\unexpanded{#1}}}% + \x% + }, +} + +\def\gtr@db@new@store#1{% + \begingroup\edef\x{\endgroup\noexpand\gtrset{database/#1/.store in=\expandonce{\csname gtrDB#1\endcsname}}}% + \x% +} + +\gtr@db@new@store{name} +\gtr@db@new@store{shortname} +\gtr@db@new@store{comment} +\gtr@db@new@store{sex} +\gtr@db@new@store{uuid} +\gtr@db@new@store{kekule} +\gtr@db@new@store{relationship} + +\def\gtr@db@new@event@store#1{% + \begingroup\edef\x{\endgroup\noexpand\gtrset{% + database/#1+/.code n args={3}{% + \noexpand\gtrParseDate{#1}{\unexpanded{##1}}% + \noexpand\def\expandonce{\csname gtrDB#1place\endcsname}{\unexpanded{##2}}% + \noexpand\def\expandonce{\csname gtrDB#1mod\endcsname}{\unexpanded{##3}}},% + database/#1/.style 2 args={#1+={\unexpanded{##1}}{\unexpanded{##2}}{}},% + database/#1-/.style={#1+={\unexpanded{##1}}{}{}},% + }}% + \x% +} + +\gtr@db@new@event@store{birth}% +\gtr@db@new@event@store{baptism}% +\gtr@db@new@event@store{engagement}% +\gtr@db@new@event@store{marriage}% +\gtr@db@new@event@store{divorce}% +\gtr@db@new@event@store{death}% +\gtr@db@new@event@store{burial}% + +\gtrset{% + database/.cd, + male/.style={sex=male}, + female/.style={sex=female}, + neuter/.style={sex=neuter}, + db@reset/.style={name=,shortname=,sex=neuter}, +} + +\tcbset{% + male/.style={colframe=blue}, + female/.style={colframe=red}, + neuter/.style={}, + if image defined/.code 2 args={\gtrifimagedefined{\tcbset{#1}}{\tcbset{#2}}}, +} + +\gtrset{ + event prefix/.cd, + birth/.initial=\gtrsymBorn, + birth/out of wedlock/.initial=\gtrsymBornoutofwedlock, + birth/stillborn/.initial=\gtrsymStillborn, + birth/died/.initial=\gtrsymDiedonbirthday, + baptism/.initial=\gtrsymBaptized, + engagement/.initial=\gtrsymEngaged, + marriage/.initial=\gtrsymMarried, + marriage/other/.initial=\gtrsymPartnership, + divorce/.initial=\gtrsymDivorced, + death/.initial=\gtrsymDied, + death/killed/.initial=\gtrsymKilled, + burial/.initial=\gtrsymBuried, + burial/cremated/.initial=\gtrsymFuneralurn, +} + +\gtrset{ + sex@/female/.code=\gtrsymFemale, + sex@/f/.code=\gtrsymFemale, + sex@/male/.code=\gtrsymMale, + sex@/m/.code=\gtrsymMale, + sex@/neuter/.code=\gtrsymNeuter, + sex@/n/.code=\gtrsymNeuter, + sex@/.unknown/.code=\gtrsymNeuter, +} + +\def\gtrPrintEventPrefix#1{% + \letcs\gtr@temp{gtrDB#1mod}% + \ifdefvoid{\gtr@temp}{% + \pgfkeysvalueof{/gtr/event prefix/#1}% + }{% + \pgfkeysvalueof{/gtr/event prefix/#1/\gtr@temp}% + }% +} + +\def\gtrDBsex{neuter} + +\def\gtriffemale#1#2{% + \ifdefstring{\gtrDBsex}{female}{#1}{#2}% +} + +\def\gtrifmale#1#2{% + \ifdefstring{\gtrDBsex}{male}{#1}{#2}% +} + +\def\gtrPrintSex{\gtrset{sex@/\gtrDBsex}} + + +%%%%%%%%% +% Names % + +\let\pref=\textit +\let\surn=\textsc +\def\nick#1{``#1''} + +\def\gtrPrintName@full{{% + \hspace{0pt}% + \ifdefvoid{\gtrDBname}{% + \ifdefvoid{\gtrDBshortname}{% + \gtrkv@namefont\gtr@emptynametext% + }{% + \gtrkv@namefont\gtrDBshortname% + }% + }{% + \gtrkv@namefont\gtrDBname% + }% +}} + + +\def\gtrPrintName@short{{% + \hspace{0pt}% + \ifdefvoid{\gtrDBshortname}{% + \ifdefvoid{\gtrDBname}{% + \gtrkv@namefont\gtr@emptynametext% + }{% + \gtrkv@namefont\gtrDBname% + }% + }{% + \gtrkv@namefont\gtrDBshortname% + }% +}} + +\gtrset{% + name/.is choice, + name/full/.code={\let\gtrPrintName\gtrPrintName@full}, + name/short/.code={\let\gtrPrintName\gtrPrintName@short}, + name font/.store in=\gtrkv@namefont, + name code/.code={\def\gtrPrintName{#1}}, + pref code/.code={\def\pref##1{#1}}, + surn code/.code={\def\surn##1{#1}}, + nick code/.code={\def\nick##1{#1}}, + empty name text/.store in=\gtr@emptynametext, +} + +\gtrset{% + name=full, + name font=, + empty name text=??, +} + + +%%%%%%%%%% +% Events % + +\def\gtrlistseparator{} + +\newenvironment{gtrprintlist}[4]{% + \def\gtrlistseparatorfinal{#4}% + \def\gtrlistseparator{#1\def\gtrlistseparator{#2}\def\gtrlistseparatorfinal{#3}}% +}{\gtrlistseparatorfinal} + +\newenvironment{gtreventlist}{}{} + +\gtrset{% + database format/.is choice, + list separators/.code n args={4}{\renewenvironment{gtreventlist}{\begin{gtrprintlist}{#1}{#2}{#3}{#4}}{\end{gtrprintlist}}}, + list separators hang/.style={list separators={\par\hangindent=#1\hangafter=1}% + {\par\hangindent=#1\hangafter=1}{\par}{\par}}, + list separators hang/.default=\tcbfitdim, + list separators={\par}{\par}{\par}{\par}, +} + +\newcommand{\gtrDeclareDatabaseFormat}[3]{% + \csdef{gtrOptionsDatabase@#1}{#2}% + \csdef{gtrPrintDatabase@#1}{#3}% + \begingroup\edef\x{\endgroup\noexpand\gtrset{database format/#1/.code={% + \noexpand\letcs{\noexpand\gtrOptionsDatabase}{gtrOptionsDatabase@#1}% + \noexpand\letcs{\noexpand\gtrPrintDatabase}{gtrPrintDatabase@#1}% + }}}% + \x% +} + +\def\gtr@list@event#1{\gtrifeventdefined{#1}{\gtrlistseparator\hspace{0pt}\gtrPrintEvent{#1}}{}} + +\gtrDeclareDatabaseFormat{full}{}{% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event{birth}% + \gtr@list@event{baptism}% + \gtr@list@event{engagement}% + \gtr@list@event{marriage}% + \gtr@list@event{divorce}% + \gtr@list@event{death}% + \gtr@list@event{burial}% + \end{gtreventlist}% + \gtrifcommentdefined{\gtrPrintComment}{}% +} + +\def\gtr@ifmarriagedefined#1#2{% + \gtrifeventdefined{marriage}{#1}{% + \gtrifeventdefined{engagement}{#1}{% + \gtrifeventdefined{divorce}{#1}{#2}% + }% + }% +} + +\gtrDeclareDatabaseFormat{full marriage above}{}{% + \gtr@ifmarriagedefined{% + \begin{gtreventlist}% + \gtr@list@event{engagement}% + \gtr@list@event{marriage}% + \gtr@list@event{divorce}% + \end{gtreventlist}\tcbline% + }{}% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event{birth}% + \gtr@list@event{baptism}% + \gtr@list@event{death}% + \gtr@list@event{burial}% + \end{gtreventlist}% + \gtrifcommentdefined{\gtrPrintComment}{}% +} + +\gtrDeclareDatabaseFormat{full marriage below}{}{% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event{birth}% + \gtr@list@event{baptism}% + \gtr@list@event{death}% + \gtr@list@event{burial}% + \end{gtreventlist}% + \gtrifcommentdefined{\gtrPrintComment}{}% + \gtr@ifmarriagedefined{% + \tcbline\begin{gtreventlist}% + \gtr@list@event{engagement}% + \gtr@list@event{marriage}% + \gtr@list@event{divorce}% + \end{gtreventlist}% + }{}% +} + +\gtrDeclareDatabaseFormat{full no marriage}{}{% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event{birth}% + \gtr@list@event{baptism}% + \gtr@list@event{death}% + \gtr@list@event{burial}% + \end{gtreventlist}% + \gtrifcommentdefined{\gtrPrintComment}{}% +} + +\def\gtr@list@event@birth{% + \gtrifeventdefined{birth}{\gtrlistseparator\gtrPrintEvent{birth}}{% + \gtr@list@event{baptism}% + }% +} + +\def\gtr@list@event@marriage{% + \gtrifeventdefined{marriage}{\gtrlistseparator\gtrPrintEvent{marriage}}{% + \gtrifeventdefined{engagement}{\gtrlistseparator\gtrPrintEvent{engagement}}{% + \gtr@list@event{divorce}% + }% + }% +} + +\def\gtr@list@event@death{% + \gtrifeventdefined{death}{\gtrlistseparator\gtrPrintEvent{death}}{% + \gtr@list@event{burial}% + }% +} + +\gtrDeclareDatabaseFormat{medium}{}{% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event@birth% + \gtr@list@event@marriage% + \gtr@list@event@death% + \end{gtreventlist}% + \gtrifcommentdefined{\gtrPrintComment}{}% +} + +\gtrDeclareDatabaseFormat{medium marriage above}{}{% + \gtr@ifmarriagedefined{\begin{gtreventlist}\gtr@list@event@marriage\end{gtreventlist}\tcbline}{}% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event@birth% + \gtr@list@event@death% + \end{gtreventlist}% + \gtrifcommentdefined{\gtrPrintComment}{}% +} + +\gtrDeclareDatabaseFormat{medium marriage below}{}{% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event@birth% + \gtr@list@event@death% + \end{gtreventlist}% + \gtrifcommentdefined{\gtrPrintComment}{}% + \gtr@ifmarriagedefined{\tcbline\begin{gtreventlist}\gtr@list@event@marriage\end{gtreventlist}}{}% +} + +\gtrDeclareDatabaseFormat{medium no marriage}{}{% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event@birth% + \gtr@list@event@death% + \end{gtreventlist}% + \gtrifcommentdefined{\gtrPrintComment}{}% +} + +\gtrDeclareDatabaseFormat{short}{}{% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event@birth% + \gtr@list@event@marriage% + \gtr@list@event@death% + \end{gtreventlist}% +} + +\gtrDeclareDatabaseFormat{short marriage above}{}{% + \gtr@ifmarriagedefined{\begin{gtreventlist}\gtr@list@event@marriage\end{gtreventlist}\tcbline}{}% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event@birth% + \gtr@list@event@death% + \end{gtreventlist}% +} + +\gtrDeclareDatabaseFormat{short marriage below}{}{% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event@birth% + \gtr@list@event@death% + \end{gtreventlist}% + \gtr@ifmarriagedefined{\tcbline\begin{gtreventlist}\gtr@list@event@marriage\end{gtreventlist}}{}% +} + +\gtrDeclareDatabaseFormat{short no marriage}{}{% + \gtrPrintName% + \begin{gtreventlist}% + \gtr@list@event@birth% + \gtr@list@event@death% + \end{gtreventlist}% +} + +\gtrDeclareDatabaseFormat{marriage}{}{% + \begin{gtreventlist}% + \gtr@list@event@marriage% + \end{gtreventlist}% +} + +\gtrDeclareDatabaseFormat{name}{}{\gtrPrintName} + +\gtrDeclareDatabaseFormat{symbol}{}{\gtrPrintSex} + +\gtrDeclareDatabaseFormat{empty}{}{} + +\gtrset{% + database format=medium +} + +\def\gtrPrintEvent@prefixdateplace#1{% + \gtrkv@event@pre\gtrPrintEventPrefix{#1}% + \gtrkv@event@sepdate\gtrPrintDate{#1}% + \gtrifplacedefined{#1}{\gtrkv@event@sepplace\gtrPrintPlace{#1}}{}% + \gtrkv@event@app% +} + +\def\gtrPrintEvent@prefixdate#1{% + \gtrkv@event@pre\gtrPrintEventPrefix{#1}% + \gtrkv@event@sepdate\gtrPrintDate{#1}% + \gtrkv@event@app% +} + +\def\gtrPrintEvent@date#1{% + \gtrkv@event@pre\gtrPrintDate{#1}% + \gtrkv@event@app% +} + + +%%%%%%%%%%%%%%%%%%%%%% +% Comment and Places % + +\def\gtrifcommentdefined#1#2{% + \ifdefvoid{\gtrDBcomment}{#2}{#1}% +} + +\def\gtrifplacedefined#1#2#3{% + \ifcsvoid{gtrDB#1place}{#3}{#2}% +} + +\def\gtrPrintPlace#1{% + \gtrkv@place@pre\csuse{gtrDB#1place}\gtrkv@place@app% +} + +%%%%%%%%% +% Dates % + +\def\gtr@parse@date@md#1#2#3\@nil{% + \ifblank{#3}{\csdef{#1}{0#2}}{\csdef{#1}{#2#3}}% +} + +\def\gtr@parse@date@@cymd(#1)#2-#3-#4-#5\@nil{% + \csdef{\gtr@db@date@prefix@ cal}{#1}% + \csdef{\gtr@db@date@prefix@ year}{#2}% + \notblank{#3}{\gtr@parse@date@md{\gtr@db@date@prefix@ month}#3\@nil}{}% + \notblank{#4}{\gtr@parse@date@md{\gtr@db@date@prefix@ day}#4\@nil}{}% +} + +\def\gtr@parse@date@cymd{% + \@ifnextchar({\gtr@parse@date@@cymd}{\gtr@parse@date@@cymd(AD)}% +} + +\def\gtr@parse@date@begin#1{% + \let\gtr@db@date@prefix@\gtr@db@date@prefix% + \gtr@parse@date@cymd#1---\@nil% +} + +\def\gtr@parse@date@end#1/{% + \edef\gtr@db@date@prefix@{\gtr@db@date@prefix end}% + \gtr@parse@date@cymd#1---\@nil% +} + +\def\gtr@parse@date@range#1/#2\@nil{% + \ifblank{#2}{% + \ifblank{#1}{}{\gtr@parse@date@begin{#1}}% + }{% + \ifstrequal{#2}{/}{% + \ifblank{#1}{}{% + \csdef{\gtr@db@date@prefix endyear}{}% + \gtr@parse@date@begin{#1}% + }% + }{% + \ifblank{#1}{% + \csdef{\gtr@db@date@prefix year}{}% + \gtr@parse@date@end#2% + }{% + \gtr@parse@date@begin{#1}% + \gtr@parse@date@end#2% + }% + }% + }% +} + +\def\gtr@parse@date#1#2{% + \csundef{#1cal}% + \csundef{#1day}% + \csundef{#1month}% + \csundef{#1year}% + \csundef{#1endcal}% + \csundef{#1endday}% + \csundef{#1endmonth}% + \csundef{#1endyear}% + \notblank{#2}{% + \gtr@parse@date@range#2/\@nil% + }{}% +} + +\def\gtrParseDate#1{% + \edef\gtr@db@date@prefix{gtrDB#1}% + \gtr@parse@date{gtrDB#1}% +} + +\def\gtr@strip@zero@0#1\@nil{#1} + +\def\gtr@strip@zero{% + \@ifnextchar0{\gtr@strip@zero@}{\gtr@strip@zero@0}% +} + +\def\gtr@cs@strip@zero#1{% + \letcs\gtr@temp{#1}% + \expandafter\gtr@strip@zero\gtr@temp\@nil% +} + +\def\gtr@cs@Roman#1{% + \letcs\gtr@temp{#1}% + \@Roman{\numexpr\gtr@temp}% +} + +\def\gtr@cs@monthlong#1{% + \letcs\gtr@temp{#1}% + \pgfkeysvalueof{/gtr/month long/\gtr@temp}% +} + +\def\gtr@cs@monthshort#1{% + {\letcs\gtr@temp{#1}% + \def\dot{}% + \pgfkeysvalueof{/gtr/month short/\gtr@temp}}% +} + +\def\gtr@cs@monthshortdot#1{% + {\letcs\gtr@temp{#1}% + \def\dot{.}% + \pgfkeysvalueof{/gtr/month short/\gtr@temp}}% +} + +\def\gtrifdatedefined#1#2#3{% + \ifcsdef{gtrDB#1year}{#2}{% + \ifcsdef{gtrDB#1endyear}{#2}{#3}% + }% +} +\let\gtrifeventdefined=\gtrifdatedefined + +\def\gtr@dateformat@factory#1#2{% + \csdef{gtrPrintDateCore@#1}##1{#2}% + \gtrset{date format/{#1}/.code={\letcs{\gtrPrintDateCore}{gtrPrintDateCore@#1}}}% +} + +\gtr@dateformat@factory{dd.mm.yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\csuse{#1day}.}{}% + \csuse{#1month}.% + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{d.m.yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\gtr@cs@strip@zero{#1day}.}{}% + \gtr@cs@strip@zero{#1month}.% + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{d.M.yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\gtr@cs@strip@zero{#1day}.}{}% + \gtr@cs@Roman{#1month}.% + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{dd/mm/yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\csuse{#1day}/}{}% + \csuse{#1month}/% + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{d/m/yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\gtr@cs@strip@zero{#1day}/}{}% + \gtr@cs@strip@zero{#1month}/% + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{d/M/yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\gtr@cs@strip@zero{#1day}/}{}% + \gtr@cs@Roman{#1month}/% + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{mm/dd/yyyy}{% + \ifcsdef{#1month}{% + \csuse{#1month}/% + \ifcsdef{#1day}{\csuse{#1day}/}{}% + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{m/d/yyyy}{% + \ifcsdef{#1month}{% + \gtr@cs@strip@zero{#1month}/% + \ifcsdef{#1day}{\gtr@cs@strip@zero{#1day}/}{}% + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{yyyy-mm-dd}{% + \csuse{#1year}% + \ifcsdef{#1month}{% + -\csuse{#1month}% + \ifcsdef{#1day}{-\csuse{#1day}}{}% + }{}% +} + +\gtr@dateformat@factory{yyyy}{% + \csuse{#1year}% +} + +\gtr@dateformat@factory{d.month yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\gtr@cs@strip@zero{#1day}.~}{}% + \gtr@cs@monthlong{#1month} % + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{d month yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\gtr@cs@strip@zero{#1day}~}{}% + \gtr@cs@monthlong{#1month} % + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{month d yyyy}{% + \ifcsdef{#1month}{% + \gtr@cs@monthlong{#1month}% + \ifcsdef{#1day}{ \gtr@cs@strip@zero{#1day}}{}, % + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{d.mon.yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\gtr@cs@strip@zero{#1day}.~}{}% + \gtr@cs@monthshortdot{#1month}\ % + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{d/mon/yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\gtr@cs@strip@zero{#1day}/}{}% + \gtr@cs@monthshort{#1month}/% + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{d mon yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\gtr@cs@strip@zero{#1day} }{}% + \gtr@cs@monthshort{#1month} % + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{dd-mon-yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\csuse{#1day}-}{}% + \gtr@cs@monthshort{#1month}-% + }{}% + \csuse{#1year}% +} + +\gtr@dateformat@factory{dd/mon/yyyy}{% + \ifcsdef{#1month}{% + \ifcsdef{#1day}{\csuse{#1day}/}{}% + \gtr@cs@monthshort{#1month}/% + }{}% + \csuse{#1year}% +} + +\def\gtr@print@date@single@calendar@all#1{% + \ifcsempty{#1year}{}{% + \letcs\gtr@temp{#1cal}% + \gtrset{calendar/\gtr@temp}% + \gtr@db@cal@pre% + \gtrPrintDateCore{#1}% + \gtr@db@cal@app% + }% +} + +\def\gtr@print@date@single@calendar@AD#1{% + \ifcsempty{#1year}{}{% + \letcs\gtr@temp{#1cal}% + \ifdefstring{\gtr@temp}{AD}{% + \gtrPrintDateCore{#1}% + }{% + \ifdefstring{\gtr@temp}{caAD}{% + \gtrset{calendar/ca}% + }{% + \gtrset{calendar/\gtr@temp}% + }% + \gtr@db@cal@pre% + \gtrPrintDateCore{#1}% + \gtr@db@cal@app% + }% + }% +} + +\def\gtr@print@date@single@calendar@none#1{% + \ifcsempty{#1year}{}{% + \gtrPrintDateCore{#1}% + }% +} + +\def\gtrPrintDate#1{% + \ifcsdef{gtrDB#1year}{% + \ifcsdef{gtrDB#1endyear}{% + \ifcsempty{gtrDB#1endyear}{% + \gtrkv@range@after@A% + \gtr@print@date@single@calendar{gtrDB#1}% + \gtrkv@range@after@B% + }{% + \ifcsempty{gtrDB#1year}{% + \gtrkv@range@before@A% + \gtr@print@date@single@calendar{gtrDB#1end}% + \gtrkv@range@before@B% + }{% + \gtrkv@range@full@A% + \gtr@print@date@single@calendar{gtrDB#1}% + \gtrkv@range@full@B% + \gtr@print@date@single@calendar{gtrDB#1end}% + \gtrkv@range@full@C% + }% + }% + }{% + \gtr@print@date@single@calendar{gtrDB#1}% + }% + }{??}% +} + +\def\gtrifimagedefined#1#2{% + \ifdefvoid{\gtrDBimage}{#2}{#1}% +} + +\gtrset{% + calendar text for/.style args={#1 is #2#3}{calendar/#1/.code={\def\gtr@db@cal@pre{#2}\def\gtr@db@cal@app{#3}}}, + calendar/.unknown/.code={\def\gtr@db@cal@pre{}\def\gtr@db@cal@app{ (\pgfkeyscurrentname)}}, + date code/.code={\def\gtrPrintDateCore##1{#1}}, + event code/.code={\def\gtrPrintEvent##1{#1}}, + comment code/.code={\def\gtrPrintComment{#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}, + calendar print/none/.code={\let\gtr@print@date@single@calendar\gtr@print@date@single@calendar@none}, + calendar print/all but AD/.code={\let\gtr@print@date@single@calendar\gtr@print@date@single@calendar@AD}, + date range full/.code n args={3}{\def\gtrkv@range@full@A{#1}\def\gtrkv@range@full@B{#2}\def\gtrkv@range@full@C{#3}}, + date range before/.code 2 args={\def\gtrkv@range@before@A{#1}\def\gtrkv@range@before@B{#2}}, + date range after/.code 2 args={\def\gtrkv@range@after@A{#1}\def\gtrkv@range@after@B{#2}}, + date range separator/.style={date range full={}{#1}{},date range before={#1}{},date range after={}{#1}}, + place text/.code 2 args={\def\gtrkv@place@pre{#1}\def\gtrkv@place@app{#2}}, + event text/.code n args={4}{\def\gtrkv@event@pre{#1}\def\gtrkv@event@sepdate{#2}\def\gtrkv@event@sepplace{#3}\def\gtrkv@event@app{#4}}, + event format/.is choice, + event format/prefix date place/.code={\let\gtrPrintEvent=\gtrPrintEvent@prefixdateplace}, + event format/prefix date/.code={\let\gtrPrintEvent=\gtrPrintEvent@prefixdate}, + event format/date/.code={\let\gtrPrintEvent=\gtrPrintEvent@date}, +} + +\gtrset{% + date format=d.M.yyyy, + date range separator={--}, + calendar print=all but AD, + event text={}{~}{ }{}, + event format=prefix date place, + comment code={\hspace{0pt}{\itshape\gtrDBcomment}}, +} 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 5045d286944..1b55e58f5f5 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.options.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.options.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package genealogytree - version 0.10 (2015/01/12) +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) %% gtrcore.options.code.tex: Options %% %% ------------------------------------------------------------------------------------------- @@ -17,36 +17,247 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{0.10} +\gtr@set@library@version{0.90} + +%%%%%%%%%%%%%%%%%%%%%%% +%% General handling +%%%%%%%%%%%%%%%%%%%%%%% + +% #1 macro +% #2 key list to append +\newrobustcmd{\gtrkeysappto}[2]{% + \ifdefvoid{#1}% + {\edef#1{\unexpanded{#2}}}% + {\edef#1{\expandonce#1,\unexpanded{#2}}}} + + +% #1 macro +% #2 key list to append (global) +\newrobustcmd{\gtrkeysgappto}[2]{% + \ifdefvoid{#1}% + {\xdef#1{\unexpanded{#2}}}% + {\xdef#1{\expandonce#1,\unexpanded{#2}}}} + + +% #1 key +% #2 key list to append +\newrobustcmd{\gtr@keys@addvalue}[2]{% + \pgfkeysifdefined{#1}{% + \pgfkeysgetvalue{#1}{\gtr@temp}% + \edef\gtr@temp{\noexpand\pgfkeyssetvalue{#1}{\expandonce\gtr@temp,\unexpanded{#2}}}% + \gtr@temp% + }{% + \pgfkeyssetvalue{#1}{#2}% + }% +} + + +% #1 command sequence +% #2 is a macro containing keys +\def\gtr@cs@storekey#1#2{% + \ifdefvoid{#2}{}{\cslet{#1}{#2}}% +} + +% #1 command sequence +% #2 #3 are macros containing keys +\def\gtr@cs@storekeys#1#2#3{% + \ifdefvoid{#2}{% + \ifdefvoid{#3}{}{\cslet{#1}{#3}}% + }{% + \ifdefvoid{#3}{% + \cslet{#1}{#2}% + }{% + \csedef{#1}{\expandonce#2,\expandonce#3}% + }% + }% +} + + +% set keys from command sequence #1 +\newrobustcmd*{\gtr@cs@keysalsofrom}[1]{% + \letcs\gtr@temp{#1}% + \ifdefvoid{\gtr@temp}{}{\pgfkeysalsofrom{\gtr@temp}}% +} + + +% set keys from stored key #1 +\newrobustcmd*{\gtr@key@keysalsofrom}[1]{% + \pgfkeysifdefined{#1}{% + \pgfkeysgetvalue{#1}{\gtr@temp}% + \pgfkeysalsofrom{\gtr@temp}% + }{}% +} + %%%%%%%%%%%%%%%%%%%%%%% %% Key Management %%%%%%%%%%%%%%%%%%%%%%% + +\newcommand{\gtrsetoptionsforsubtree}[2]{% + \def\do##1{% + \gtr@keys@addvalue{/gtr/sopt/##1}{subtree={#2}}% + }% + \docsvlist{#1}% +} + + +\newcommand{\gtrsetoptionsforfamily}[2]{% + \def\do##1{% + \gtr@keys@addvalue{/gtr/sopt/##1}{family={#2}}% + }% + \docsvlist{#1}% +} + +\newcommand{\gtrsetoptionsfornode}[2]{% + \def\do##1{% + \gtr@keys@addvalue{/gtr/nopt/##1}{#2}% + }% + \docsvlist{#1}% +} + + +\newcommand{\gtrignoresubtree}[1]{% + \def\do##1{% + \gtr@keys@addvalue{/gtr/sopt/##1}{ignore}% + }% + \docsvlist{#1}% +} + +\newcommand{\gtrignorenode}[1]{% + \gtrsetoptionsfornode{#1}{ignore}% +} + + +\def\gtr@set@level@position@down#1{% + \csdimdef{gtr@per@#1@y}{\gtr@level@reference}% + \csdimdef{gtr@per@#1@dim}{\wd\csuse{gtr@per@#1@box}}% +} + +\def\gtr@set@level@position@up#1{% + \csdimdef{gtr@per@#1@y}{-\gtr@level@reference}% + \csdimdef{gtr@per@#1@dim}{\wd\csuse{gtr@per@#1@box}}% +} + +\def\gtr@set@level@position@left#1{% + \csdimdef{gtr@per@#1@x}{\gtr@level@reference}% + \csdimdef{gtr@per@#1@dim}{\ht\csuse{gtr@per@#1@box}+\dp\csuse{gtr@per@#1@box}}% +} + +\def\gtr@set@level@position@right#1{% + \csdimdef{gtr@per@#1@x}{-\gtr@level@reference}% + \csdimdef{gtr@per@#1@dim}{\ht\csuse{gtr@per@#1@box}+\dp\csuse{gtr@per@#1@box}}% +} + + +\def\gtr@set@position@family@down#1{% + \csdimdef{gtr@fam@#1@pos}{\gtr@level@reference-\gtr@level@size-\csuse{gtr@fam@#1@frac}\dimexpr\gtr@level@distance}% +} + +\def\gtr@set@position@family@up#1{% + \csdimdef{gtr@fam@#1@pos}{-\gtr@level@reference+\gtr@level@size+\csuse{gtr@fam@#1@frac}\dimexpr\gtr@level@distance}% +} + +\let\gtr@set@position@family@left=\gtr@set@position@family@down + +\let\gtr@set@position@family@right=\gtr@set@position@family@up + \newif\ifgtr@timeflow@vertical \def\gtr@init@timeflow@down{% \gtr@timeflow@verticaltrue% - \let\gtrkv@node@minwidth=\gtrkv@node@minsize% - \let\gtrkv@node@maxwidth=\gtrkv@node@maxsize% - \let\gtrkv@node@minheigth=\gtrkv@level@size% - \let\gtrkv@node@maxheigth=\gtrkv@level@size% + \let\gtrNodeMinWidth=\gtr@node@minsize% + \let\gtrNodeMaxWidth=\gtr@node@maxsize% + \let\gtrNodeMinHeight=\gtr@level@size% + \let\gtrNodeMaxHeight=\gtr@level@size% } \let\gtr@init@timeflow@up=\gtr@init@timeflow@down \def\gtr@init@timeflow@left{% \gtr@timeflow@verticalfalse% - \let\gtrkv@node@minwidth=\gtrkv@level@size% - \let\gtrkv@node@maxwidth=\gtrkv@level@size% - \let\gtrkv@node@minheigth=\gtrkv@node@minsize% - \let\gtrkv@node@maxheigth=\gtrkv@node@maxsize% + \let\gtrNodeMinWidth=\gtr@level@size% + \let\gtrNodeMaxWidth=\gtr@level@size% + \let\gtrNodeMinHeight=\gtr@node@minsize% + \let\gtrNodeMaxHeight=\gtr@node@maxsize% } \let\gtr@init@timeflow@right=\gtr@init@timeflow@left +\newif\ifgtr@ignore \gtrset{% + id/.gstore in=\gtr@gkv@id, + distance/.gstore in=\gtr@gkv@distance, + pivot@@value/.gstore in=\gtr@gkv@pivot, + pivot@none/.style={pivot@@value=0}, + pivot@child/.style={pivot@@value=1}, + pivot@parent/.style={pivot@@value=2}, + pivot@both/.style={pivot@@value=3}, + pivot/.style={pivot@#1}, + pivot/.default={both}, + pivot shift/.gstore in=\gtr@gkv@pivotshift, + % + ignore/.is choice, + ignore/true/.code={\global\gtr@ignoretrue}, + ignore/false/.code={\global\gtr@ignorefalse}, + ignore/.default=true, + % + insert after node/.code n args={2}{% + \gtr@parse@init@hook{gtr@parse@afternode@hook}{gtr@per@\gtr@currentperson @id}% + \gtr@parse@appto@hook{gtr@parse@afternode@hook}{#1}{#2}% + }, + insert after family/.code n args={2}{% + \gtr@parse@init@hook{gtr@parse@afterfamily@hook}{gtr@fam@\gtr@lastfamily @id}% + \gtr@parse@appto@hook{gtr@parse@afterfamily@hook}{#1}{#2}% + }, + insert at begin family/.code n args={2}{% + \gtr@parse@init@hook{gtr@parse@beginfamily@hook}{gtr@fam@\gtr@currentfamily @id}% + \gtr@parse@appto@hook{gtr@parse@beginfamily@hook}{#1}{#2}% + }, + insert at end family/.code n args={2}{% + \gtr@parse@init@hook{gtr@parse@endfamily@hook}{gtr@fam@\gtr@currentfamily @id}% + \gtr@parse@appto@hook{gtr@parse@endfamily@hook}{#1}{#2}% + }, + % + family/.style={#1}, + subtree/.style={#1}, + node/.style={#1}, + % + box/.code={\gtrkeysappto\gtrNodeBoxOptions{#1}}, + box clear/.code={\def\gtrNodeBoxOptions{}}, + % + node box/.style={node={box={#1}}}, + family box/.style={family={box={#1}}}, + subtree box/.style={subtree={box={#1}}}, + % + label/.store in=\gtrkv@family@label, + family label/.style={family={label={#1}}}, + subtree label/.style={subtree={label={#1}}}, + label options/.store in=\gtrkv@family@label@options, + label database options/.store in=\gtrkv@database@label, + ignore family database/.style={family@database/.code=}, + use family database/.style={family@database/.code={% + \gtrset{database/.cd,db@reset,##1}% + \gtrOptionsDatabase% + \gtrset{label={\gtrPrintDatabase}}% + }}, + family database/.style={family={family@database={#1}}}, + % + node processor/.code={\let\gtr@box@content@processor=#1}, + processing/.is choice,% + % + time@flow/.store in=\gtrkv@timeflow, + timeflow/.is choice, + timeflow/down/.style={time@flow=down}, + timeflow/up/.style={time@flow=up}, + timeflow/left/.style={time@flow=left}, + timeflow/right/.style={time@flow=right}, + % + level distance/.store in=\gtrkv@level@distance, + level size/.store in=\gtrkv@level@size, + node size from/.code args={#1 to #2}{\def\gtrkv@node@minsize{#1}\def\gtrkv@node@maxsize{#2}}, + node size/.code={\def\gtrkv@node@minsize{#1}\def\gtrkv@node@maxsize{#1}},% child distance in parent graph/.store in=\gtrkv@dist@sibling@par,% child distance in child graph/.store in=\gtrkv@dist@sibling@chi,% parent distance in parent graph/.store in=\gtrkv@dist@parent@par,% @@ -56,29 +267,193 @@ child distance/.style={child distance in parent graph=#1,child distance in child graph=#1},% parent distance/.style={parent distance in parent graph=#1,parent distance in child graph=#1},% % - level/.style=, + proband level/.store in=\gtrkv@proband@level, + tree offset/.store in=\gtrkv@tree@offset, + after parser/.code={\gappto\gtrkv@after@parser{#1}}, + add child/.code args={#1 to #2}{\gappto\gtrkv@after@parser{\gtr@add@child@after@parser{#1}{#2}}},% + add parent/.code args={#1 to #2}{\gappto\gtrkv@after@parser{\gtr@add@parent@after@parser{#1}{#2}}},% + remove child/.code args={#1 from #2}{\gappto\gtrkv@after@parser{\gtr@remove@child@after@parser{#1}{#2}}},% + remove parent/.code args={#1 from #2}{\gappto\gtrkv@after@parser{\gtr@remove@parent@after@parser{#1}{#2}}},% + disconnect/.is choice, + disconnect/child/.code={% + \ifdefvoid{\gtr@currentperson}{}{% + \begingroup\edef\x{\endgroup\noexpand\gappto\noexpand\gtrkv@after@parser{% + \noexpand\gtr@disconnect@node@as@child{\gtr@currentperson}% + }}\x% + }% + }, + disconnect/parent/.code={% + \ifdefvoid{\gtr@currentperson}{}{% + \begingroup\edef\x{\endgroup\noexpand\gappto\noexpand\gtrkv@after@parser{% + \noexpand\gtr@disconnect@node@as@parent{\gtr@currentperson}% + }}\x% + }% + }, + disconnect/both/.code={% + \ifdefvoid{\gtr@currentperson}{}{% + \begingroup\edef\x{\endgroup\noexpand\gappto\noexpand\gtrkv@after@parser{% + \noexpand\gtr@disconnect@node@as@child{\gtr@currentperson}% + \noexpand\gtr@disconnect@node@as@parent{\gtr@currentperson}% + }}\x% + }% + }, + disconnect/.default=both, + % + options for subtree/.code 2 args={\gtrsetoptionsforsubtree{#1}{#2}}, + options for family/.code 2 args={\gtrsetoptionsforfamily{#1}{#2}}, + options for node/.code 2 args={\gtrsetoptionsfornode{#1}{#2}}, + % + ignore subtree/.code={\gtrignoresubtree{#1}}, + ignore node/.code={\gtrignorenode{#1}}, + ignore level/.code={% + \ifnum#1>0% + \gtrset{level #1/.style={node=ignore}}% + \edef\gtrtemp{\the\numexpr#1+1\relax}% + \gtrset{level \gtrtemp/.style=ignore}% + \else\ifnum#1<0% + \gtrset{level #1/.style={ignore,node=ignore}}% + \fi\fi% + }, + % + edges/.code={\gtredgeset{#1}}, + family edges/.style={family={edges={#1}}}, + edges for family/.style 2 args={options for family={#1}{edges={#2}}}, + subtree edges/.style={subtree={edges={#1}}}, + edges for subtree/.style 2 args={options for subtree={#1}{edges={#2}}}, + % + tikzpicture/.store in=\gtrkv@tikzpicture, + after tree/.code={\appto\gtrkv@after@tree{#1}}, + tikzset/.code={\def\gtrkv@tikzset{\tikzset{#1}}}, + tcbset/.code={\def\gtrkv@tcbset{\tcbset{#1}}}, + % + extra edges/.code={\listadd{\gtr@extra@edges@app}{#1}}, + extra edges prepend/.code={\listadd{\gtr@extra@edges@pre}{#1}}, + family extra edges/.style n args={3}{family={extra edges={#1}{#2}{#3}}}, + family extra edges prepend/.style n args={3}{family={extra edges prepend={#1}{#2}{#3}}}, + extra edges for family/.style n args={4}{options for family={#1}{extra edges={#2}{#3}{#4}}}, + extra edges prepend for family/.style n args={4}{options for family={#1}{extra edges prepend={#2}{#3}{#4}}}, + extra edges for families/.style 2 args={% + x/.style n args={3}{extra edges for family={##1}{##2}{##3}{#2}},% + #1}, + extra edges prepend for families/.style 2 args={% + x/.style n args={3}{extra edges prepend for family={##1}{##2}{##3}{#2}},% + #1}, + % + % + phantom/.style={subtree={processing=tcolorbox,deletion content interpreter,disconnect, + box={empty,no shadow,no borderline,code={\ifstrempty{#1}{}{% + \ifgtr@timeflow@vertical\tcbset{width=#1}\else\tcbset{height=#1}\fi% + }}}}}, + phantom/.default=, + phantom*/.style={subtree={processing=tcolorbox,deletion content interpreter,edges=none, + box={empty,code={\ifstrempty{#1}{}{% + \ifgtr@timeflow@vertical\tcbset{width=#1}\else\tcbset{height=#1}\fi% + }}}}}, + phantom*/.default=, +} + +\pgfkeys{/gtr/edge/.is family} +\def\gtredgeset{\pgfqkeys{/gtr/edge}} + +\gtredgeset{ + edge@mode/.store in=\gtrkv@edgemode, + perpendicular/.style={edge@mode=perpendicular}, + rounded@arc/.store in=\gtrkv@edge@arc, + rounded/.style={edge@mode=rounded,rounded@arc={#1}}, + rounded/.default=6pt, + swing@control/.store in=\gtrkv@edge@swingcontrol, + swing/.style={edge@mode=swing,swing@control={#1}}, + swing/.default=12pt, + mesh@options/.store in=\gtrkv@edge@meshoptions, + mesh/.style={edge@mode=mesh,mesh@options={#1}}, + mesh/.default=, + custom/.code n args={4}{% + \let\gtr@edge@custom@down@macro=#1% + \let\gtr@edge@custom@up@macro=#2% + \let\gtr@edge@custom@left@macro=#3% + \let\gtr@edge@custom@right@macro=#4% + \gtredgeset{edge@mode=custom}% + }, + none/.style={custom={\gtr@edge@custom@none@macro}{\gtr@edge@custom@none@macro}{\gtr@edge@custom@none@macro}{\gtr@edge@custom@none@macro}}, + foreground/.style={gtr@edge@foreground/.style={line width=1pt,draw=green!25!black,#1}}, + background/.style={gtr@edge@background/.style={line width=1.75pt,draw=green!15!white,#1}}, + no foreground/.style={gtr@edge@foreground/.style={draw=none,fill=none}}, + no background/.style={gtr@edge@background/.style={draw=none,fill=none}}, + anchoring/.is choice, + anchoring/periphery/.code={% + \def\gtrkv@edge@anchor@vert@A{north}% + \def\gtrkv@edge@anchor@vert@B{south}% + \def\gtrkv@edge@anchor@hori@A{east}% + \def\gtrkv@edge@anchor@hori@B{west}% + }, + anchoring/center/.code={% + \def\gtrkv@edge@anchor@vert@A{center}% + \def\gtrkv@edge@anchor@vert@B{center}% + \def\gtrkv@edge@anchor@hori@A{center}% + \def\gtrkv@edge@anchor@hori@B{center}% + }, + hide single leg/.is choice, + hide single leg/true/.code={\def\gtrkv@edge@noleg{1}}, + hide single leg/false/.code={\def\gtrkv@edge@noleg{0}}, + hide single leg/.default=true, + xshift/.store in=\gtrkv@edge@core@xshift, + yshift/.store in=\gtrkv@edge@core@yshift, +} + +\def\gtr@adjust@position#1 #2 of #3 distance #4 shift #5 #6\@nil{% + \gappto\gtrkv@after@parser{\gtr@adjust{#1}{#2}{#3}{#4}{#5}}% +} + +\def\gtr@adjust@node@right#1#2#3#4{\gappto\gtrkv@after@parser{\gtr@adjust{#1}{right}{#2.east}{#3}{#4}}} +\def\gtr@adjust@node@left#1#2#3#4{\gappto\gtrkv@after@parser{\gtr@adjust{#1}{left}{#2.west}{#3}{#4}}} +\def\gtr@adjust@node@above#1#2#3#4{\gappto\gtrkv@after@parser{\gtr@adjust{#1}{above}{#2.north}{#3}{#4}}} +\def\gtr@adjust@node@below#1#2#3#4{\gappto\gtrkv@after@parser{\gtr@adjust{#1}{below}{#2.south}{#3}{#4}}} + +\def\gtr@adjust@node#1 #2 of #3 distance #4 shift #5 #6\@nil{% + \csname gtr@adjust@node@#2\endcsname{#1}{#3}{#4}{#5}% +} + +\gtrset{ + adjust position/.code={\gtr@adjust@position#1 shift 0mm \@nil},% + adjust node/.code={\gtr@adjust@node#1 shift 0mm \@nil},% + set position/.code args={#1 at #2}{\gappto\gtrkv@after@parser{\gtr@setposition{#1}{#2}}},% } \gtrset{% - timeflow/.store in=\gtrkv@timeflow, - level distance/.store in=\gtrkv@level@distance, - level size/.store in=\gtrkv@level@size, - node sizes/.code args={#1~#2}{\def\gtrkv@node@minsize{#1}\def\gtrkv@node@maxsize{#2}}, - node size/.style={node sizes=#1~#1},% - proband level/.store in=\gtrkv@proband@level, - tree offset/.store in=\gtrkv@tree@offset, + turn/.is choice, + turn/.default=right, + turn/right/.style={box={rotate=90,gtrNodeDimensionsLandscape}}, + turn/left/.style={box={rotate=270,gtrNodeDimensionsLandscape}}, + turn/off/.style={box={rotate=0,gtrNodeDimensions}}, + turn/upsidedown/.style={box={rotate=180,gtrNodeDimensions}}, + % + male/.style={box={male}}, + female/.style={box={female}}, + neuter/.style={box={neuter}}, } \gtrset{% - timeflow=down, - level distance=5mm, - level size=3.5cm, - node size=2.5cm, - proband level=0, - tree offset=0pt, - child distance in parent graph=1mm,% - child distance in child graph=2mm,% - parent distance in parent graph=2mm,% - parent distance in child graph=1mm,% - further distance=3mm,% + reset/.style={% + timeflow=down, + level distance=5mm, + level size=3.5cm, + node size=2.5cm, + proband level=0, + tree offset=0pt, + level/.style=, + box clear, + processing=fit, + edges={perpendicular,foreground=,background=,anchoring=periphery,hide single leg,xshift=0pt,yshift=0pt}, + child distance in parent graph=1mm,% + child distance in child graph=2mm,% + parent distance in parent graph=2mm,% + parent distance in child graph=1mm,% + further distance=3mm,% + tikzpicture=,code={\def\gtrkv@tikzset{}\def\gtrkv@tcbset{}},% + ignore family database, + label options=, + label database options=, + no content interpreter, + }, + 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 36f83a328a0..83e24e976d6 100644 --- a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.parser.code.tex +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.parser.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package genealogytree - version 0.10 (2015/01/12) +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) %% gtrcore.parser.code.tex: Parser %% %% ------------------------------------------------------------------------------------------- @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\gtr@set@library@version{0.10} +\gtr@set@library@version{0.90} %% (local) stack implementation \def\gtrnewstack#1{% @@ -32,35 +32,36 @@ \count@\gtrstacksize{#1}% \advance\count@ 1\relax% \csedef{gtr@stack@#1@size}{\number\count@}% - \csedef{gtr@stack@#1@\romannumeral\count@}{#2}% + \csedef{gtr@stack@#1@\number\count@}{#2}% } \def\gtrstackpopto#1#2{% \count@\gtrstacksize{#1}% - \edef#2{\csname gtr@stack@#1@\romannumeral\count@\endcsname}% + \edef#2{\csname gtr@stack@#1@\number\count@\endcsname}% \advance\count@ -1\relax% \csedef{gtr@stack@#1@size}{\number\count@}% } \def\gtrstackpop#1{% \count@\gtrstacksize{#1}% - \csname gtr@stack@#1@\romannumeral\count@\endcsname% + \csname gtr@stack@#1@\number\count@\endcsname% \advance\count@ -1\relax% \csedef{gtr@stack@#1@size}{\number\count@}% } \def\gtrstackpeekto#1#2{% \count@\gtrstacksize{#1}% - \edef#2{\csname gtr@stack@#1@\romannumeral\count@\endcsname}% + \edef#2{\csname gtr@stack@#1@\number\count@\endcsname}% } \def\gtrstackpeek#1{% \count@\gtrstacksize{#1}% - \csname gtr@stack@#1@\romannumeral\count@\endcsname% + \csname gtr@stack@#1@\number\count@\endcsname% } \def\gtrmakestack#1{% \gtrnewstack{#1}% + \csedef{gtr@stack@#1@size}{0}% \csdef{#1size}{\gtrstacksize{#1}}% \csdef{#1push}{\gtrstackpush{#1}}% \csdef{#1popto}{\gtrstackpopto{#1}}% @@ -81,45 +82,13 @@ \gtrmakestack{gtr@famstack@}% \gtrmakestack{gtr@levelstack@}% -\gtr@c@family\z@\relax%---- reset ? -\gtr@c@pid\z@\relax%%---- reset ? - -\def\gtr@level@argument@reset{% - \dimdef\gtr@rv@level@distance{\gtrkv@level@distance}% - \dimdef\gtr@rv@level@size{\gtrkv@level@size}% - \dimdef\gtr@rv@node@minsize{\gtrkv@node@minsize}% - \dimdef\gtr@rv@node@maxsize{\gtrkv@node@maxsize}% - \dimdef\gtr@rv@dist@sibling@par{\gtrkv@dist@sibling@par}% - \dimdef\gtr@rv@dist@sibling@chi{\gtrkv@dist@sibling@chi}% - \dimdef\gtr@rv@dist@parent@par{\gtrkv@dist@parent@par}% - \dimdef\gtr@rv@dist@parent@chi{\gtrkv@dist@parent@chi}% - \dimdef\gtr@rv@dist@further{\gtrkv@dist@further}% - \let\gtr@rv@tcboptions\gtrkv@tcboptions% -} - - -\def\gtr@level@argument@set{% - \let\gtrkv@level@distance\gtr@rv@level@distance% - \let\gtrkv@level@size\gtr@rv@level@size% - \let\gtrkv@node@minsize\gtr@rv@node@minsize% - \let\gtrkv@node@maxsize\gtr@rv@node@maxsize% - \let\gtrkv@dist@sibling@par\gtr@rv@dist@sibling@par% - \let\gtrkv@dist@sibling@chi\gtr@rv@dist@sibling@chi% - \let\gtrkv@dist@parent@par\gtr@rv@dist@parent@par% - \let\gtrkv@dist@parent@chi\gtr@rv@dist@parent@chi% - \let\gtrkv@dist@further\gtr@rv@dist@further% - \let\gtrkv@tcboptions\gtr@rv@tcboptions% - % - \gtrset{level=\number\gtr@c@level}% - \pgfkeysifdefined{/gtr/level \number\gtr@c@level/.@cmd}{% - \gtrset{level \number\gtr@c@level}% - }{% - }% - \gtr@init@leveldimens% -} +\gtr@c@family\z@\relax +\gtr@c@pid\z@\relax \newcommand{\gtr@parsegraph}[2][]{% - \gtrset{#1}% + \gtrset{#1,ignore family database}% + \gtrkv@tikzset% + \gtrkv@tcbset% % \let\gtr@timeflow=\gtrkv@timeflow% \letcs\gtr@init@leveldimens{gtr@init@timeflow@\gtr@timeflow}% @@ -127,7 +96,7 @@ \letcs\gtr@set@position@family{gtr@set@position@family@\gtr@timeflow}% % \edef\gtr@level@reference{0pt}% - \gtr@level@argument@reset% + \gtr@proc@level@save@settings% \gtr@set@level{\gtrkv@proband@level}% \let\gtr@currentfamily=\@undefined% \numdef\gtr@num@fam@first{\gtr@c@family+1}% @@ -135,8 +104,8 @@ \gtr@parse@graphwithhandle{\gtr@handle@continue@graph}#2x% \numdef\gtr@num@fam@last{\gtr@c@family}% \numdef\gtr@num@per@last{\gtr@c@pid}% - \edef\gtr@temp{\romannumeral\number\gtr@num@fam@first}% - \csdimdef{gtr@fam@\gtr@temp @offset}{\gtrkv@tree@offset}% + \gtr@set@currentfamily{\gtr@num@fam@first}% + \csdimdef{gtr@fam@\gtr@currentfamily @offset}{\gtrkv@tree@offset}% \gtr@positioning% } @@ -158,9 +127,13 @@ \let\@next\gtr@parse@graph% \else% \ifx\@gtr@token i% - \let\@next\gtr@parse@input@% + \let\@next\gtr@parse@i% \else% - \gtr@handle@continue% + \ifx\@gtr@token\par% + \let\@next\gtr@parse@graph% + \else% + \gtr@handle@continue% + \fi% \fi% \fi% \fi% @@ -189,26 +162,32 @@ \def\gtr@parse@graph@child@ hild{% \gtr@up@level% - \dimdef\gtr@level@reference{\gtr@level@reference+\gtrkv@level@size+\gtrkv@level@distance}% + \dimdef\gtr@level@reference{\gtr@level@reference+\gtr@level@size+\gtr@level@distance}% \@ifnextchar[{\gtr@child@@child}{\gtr@child@@child[]}} \def\gtr@parse@graph@sandclock@ andclock{\@ifnextchar[{\gtr@sandclock@@}{\gtr@sandclock@@[]}} -\def\gtr@parse@input@ nput#1{\expandafter\expandafter\expandafter \gtr@parse@graph \csname @@input\endcsname #1 } +\def\gtr@parse@i n{% + \@ifnextchar p{\gtr@parse@input@}{\gtr@parse@insert@}} + +\def\gtr@parse@input@ put#1{\expandafter\expandafter\expandafter \gtr@parse@graph \csname @@input\endcsname #1 } + +\def\gtr@parse@insert@ sert#1{\expandafter\expandafter\expandafter\gtr@parse@graph\csname#1\endcsname} \def\gtr@parse@x{} \def\gtr@parse@err{% - \gtr@error{Parser error}% + \gtr@error{Parser error}{Some went wrong during parsing your genealogy tree data}% } \def\gtr@parse@error@token{% + \gtr@error{Parser: unfeasible token}{You probably used some unfeasible token in your genealogy tree data. + Press return to display this token.}% \show\@gtr@token - \gtr@error{Parser: unfeasible token}% } \long\def\gtr@parse@error#1{% - \gtr@error{Parser: undefined #1}% + \gtr@error{Parser: undefined #1}{Some went wrong during parsing your genealogy tree data}%% } @@ -397,13 +376,17 @@ %% Traversing %%%%%%%%%%%%%%%%%%%%%%% +\def\gtr@set@currentfamily#1{\edef\gtr@currentfamily{\number#1}} + \def\gtr@next@family{% + \let\gtr@lastfamily=\gtr@currentfamily% \ifdef{\gtr@currentfamily}{\gtr@famstack@push{\gtr@currentfamily}}{}% \advance\gtr@c@family 1\relax% - \edef\gtr@currentfamily{\romannumeral\gtr@c@family}% + \gtr@set@currentfamily{\gtr@c@family}% } \def\gtr@previous@family{% + \let\gtr@lastfamily=\gtr@currentfamily% \ifnum\gtr@famstack@size>0% \gtr@famstack@popto{\gtr@currentfamily}% \else% @@ -411,27 +394,27 @@ \fi% } +\def\gtr@set@currentperson#1{\edef\gtr@currentperson{\number#1}} + \def\gtr@next@person{% \advance\gtr@c@pid 1\relax% - \edef\gtr@currentperson{\romannumeral\gtr@c@pid}% + \gtr@set@currentperson{\gtr@c@pid}% } \def\gtr@set@level#1{% \gtr@c@level#1\relax% - \edef\gtr@currentlevel{\romannumeral\numexpr 1000+\gtr@c@level\relax}% - \gtr@level@argument@set% + \gtr@proc@level@opt% } \def\gtr@up@level{% \advance\gtr@c@level 1\relax% - \edef\gtr@currentlevel{\romannumeral\numexpr 1000+\gtr@c@level\relax}% - \gtr@level@argument@set% + \gtr@proc@level@opt% } \def\gtr@up@level@push{% \gtr@levelstack@push{\gtr@level@reference}% \gtr@up@level% - \dimdef\gtr@level@reference{\gtr@level@reference+\gtrkv@level@size+\gtrkv@level@distance}% + \dimdef\gtr@level@reference{\gtr@level@reference+\gtr@level@size+\gtr@level@distance}% } \def\gtr@up@level@pop{% @@ -441,13 +424,12 @@ \def\gtr@down@level{% \advance\gtr@c@level -1\relax% - \edef\gtr@currentlevel{\romannumeral\numexpr 1000+\gtr@c@level\relax}% - \gtr@level@argument@set% + \gtr@proc@level@opt% } \def\gtr@down@level@push{% \gtr@levelstack@push{\gtr@level@reference}% - \dimdef\gtr@level@reference{\gtr@level@reference-\gtrkv@level@size-\gtrkv@level@distance}% + \dimdef\gtr@level@reference{\gtr@level@reference-\gtr@level@size-\gtr@level@distance}% \gtr@down@level% } @@ -460,28 +442,48 @@ \gtr@up@level@push% \gtr@next@family% \gtr@proc@@parent@begin{#1}% - \gtr@parse@graphwithhandle{\gtr@handle@continue@parent}#2x% - \gtr@proc@@parent@end% + \ifgtr@ignore% + \advance\gtr@c@family -1\relax% + \else% + \gtr@parse@beginfamily@hook% + \gtr@parse@graphwithhandle{\gtr@handle@continue@parent}#2x% + \gtr@parse@endfamily@hook% + \gtr@proc@@parent@end% + \fi% \gtr@previous@family% \gtr@down@level@pop% + \gtr@parse@afterfamily@hook% } \long\def\gtr@trav@@child[#1]#2{% \gtr@down@level@push% \gtr@next@family% \gtr@proc@@child@begin{#1}% - \gtr@parse@graphwithhandle{\gtr@handle@continue@child}#2x% - \gtr@proc@@child@end% + \ifgtr@ignore% + \advance\gtr@c@family -1\relax% + \else% + \gtr@parse@beginfamily@hook% + \gtr@parse@graphwithhandle{\gtr@handle@continue@child}#2x% + \gtr@parse@endfamily@hook% + \gtr@proc@@child@end% + \fi% \gtr@previous@family% \gtr@up@level@pop% + \gtr@parse@afterfamily@hook% } \long\def\gtr@trav@@sandclock[#1]#2{% \gtr@up@level@push% \gtr@next@family% \gtr@proc@@sandclock@begin{#1}% - \gtr@parse@graphwithhandle{\gtr@handle@continue@sandclock}#2x% - \gtr@proc@@sandclock@end% + \ifgtr@ignore% + \advance\gtr@c@family -1\relax% + \else% + \gtr@parse@beginfamily@hook% + \gtr@parse@graphwithhandle{\gtr@handle@continue@sandclock}#2x% + \gtr@parse@endfamily@hook% + \gtr@proc@@sandclock@end% + \fi% \gtr@previous@family% \gtr@down@level@pop% } @@ -489,32 +491,137 @@ \long\def\gtr@trav@@union[#1]#2{% \gtr@next@family% \gtr@proc@@union@begin{#1}% - \gtr@parse@graphwithhandle{\gtr@handle@continue@union}#2x% - \gtr@proc@@union@end% + \ifgtr@ignore% + \advance\gtr@c@family -1\relax% + \else% + \gtr@parse@beginfamily@hook% + \gtr@parse@graphwithhandle{\gtr@handle@continue@union}#2x% + \gtr@parse@endfamily@hook% + \gtr@proc@@union@end% + \fi% \gtr@previous@family% + \gtr@parse@afterfamily@hook% +} + + +\long\def\gtr@trav@@add@node#1#2#3{% + \gtr@proc@add@node{#1}{#2}% + \ifgtr@ignore% + \advance\gtr@c@pid -1\relax% + \else% + #3% + \fi% } \long\def\gtr@trav@@parent@g[#1]#2{% \gtr@down@level@push% \gtr@next@person% - \gtr@proc@@parent@g@content{#1}{#2}% + \def\gtrnodetype{g}% + \let\gtrifcnode\@secondoftwo% + \let\gtrifpnode\@secondoftwo% + \let\gtrifgnode\@firstoftwo% + \ifcsdef{gtr@fam@\gtr@currentfamily @fam}{% + \let\gtrifroot\@secondoftwo% + \let\gtrifparent\@firstoftwo% + \let\gtrifleaf\@secondoftwo% + \let\gtrifleafchild\@secondoftwo% + }{% + \let\gtrifroot\@firstoftwo% + \let\gtrifparent\@secondoftwo% + \let\gtrifleaf\@firstoftwo% + \let\gtrifleafchild\@firstoftwo% + }% + \let\gtrifchild\@firstoftwo% + \let\gtrifleafparent\@secondoftwo% + \gtr@trav@@add@node{#1}{#2}{\gtr@proc@@parent@g@content}% \gtr@up@level@pop% + \gtr@parse@afternode@hook% } \long\def\gtr@trav@@child@g[#1]#2{% \gtr@next@person% - \gtr@proc@@child@g@content{#1}{#2}% + \def\gtrnodetype{g}% + \let\gtrifcnode\@secondoftwo% + \let\gtrifpnode\@secondoftwo% + \let\gtrifgnode\@firstoftwo% + \ifcsdef{gtr@fam@\gtr@currentfamily @fam}{% + \let\gtrifroot\@secondoftwo% + \let\gtrifchild\@firstoftwo% + \let\gtrifleaf\@secondoftwo% + \let\gtrifleafparent\@secondoftwo% + }{% + \let\gtrifroot\@firstoftwo% + \let\gtrifchild\@secondoftwo% + \let\gtrifleaf\@firstoftwo% + \let\gtrifleafparent\@firstoftwo% + }% + \let\gtrifparent\@firstoftwo% + \let\gtrifleafchild\@secondoftwo% + \gtr@trav@@add@node{#1}{#2}{\gtr@proc@@child@g@content}% + \gtr@parse@afternode@hook% } \long\def\gtr@trav@@p[#1]#2{% \gtr@next@person% - \gtr@proc@@p@content{#1}{#2}% + \def\gtrnodetype{p}% + \let\gtrifcnode\@secondoftwo% + \let\gtrifpnode\@firstoftwo% + \let\gtrifgnode\@secondoftwo% + \let\gtrifroot\@secondoftwo% + \let\gtrifchild\@secondoftwo% + \let\gtrifparent\@firstoftwo% + \let\gtrifleaf\@firstoftwo% + \let\gtrifleafchild\@secondoftwo% + \let\gtrifleafparent\@firstoftwo% + \gtr@trav@@add@node{#1}{#2}{\gtr@proc@@p@content}% + \gtr@parse@afternode@hook% } \long\def\gtr@trav@@c[#1]#2{% \gtr@down@level@push% \gtr@next@person% - \gtr@proc@@c@content{#1}{#2}% + \def\gtrnodetype{c}% + \let\gtrifcnode\@firstoftwo% + \let\gtrifpnode\@secondoftwo% + \let\gtrifgnode\@secondoftwo% + \let\gtrifroot\@secondoftwo% + \let\gtrifchild\@firstoftwo% + \let\gtrifparent\@secondoftwo% + \let\gtrifleaf\@firstoftwo% + \let\gtrifleafchild\@firstoftwo% + \let\gtrifleafparent\@secondoftwo% + \gtr@trav@@add@node{#1}{#2}{\gtr@proc@@c@content}% \gtr@up@level@pop% + \gtr@parse@afternode@hook% +} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Hooks +%%%%%%%%%%%%%%%%%%%%%%% + +\def\gtr@parse@init@hook#1#2{% + \ifcsvoid{#1@content}{% + \csdef{#1}{% + \letcs\gtr@currentid{#2}% + \ifdefvoid{\gtr@currentid}{}{\csuse{#1@content}}% + }% + }{}% +} + +\def\gtr@parse@appto@hook#1#2#3{% + \begingroup\edef\x{\endgroup\noexpand\appto\expandonce{\csname #1@content\endcsname}{% + \noexpand\ifdefstring{\noexpand\gtr@currentid}{\expandonce{#2}}{% + \noexpand\gtr@parse@graph\expandonce{#3}x}{}% + }}\x% } +%%%%%%%%%%%%%%%%%%%%%%% +%% Information +%%%%%%%%%%%%%%%%%%%%%%% + +\def\gtrnodenumber{\gtr@currentperson} +\def\gtrnodefamily{\gtr@currentfamily} +\def\gtrnodelevel{\number\gtr@c@level} + +\newrobustcmd\gtrifnodeid[2]{\ifdefvoid{\gtr@gkv@id}{#2}{#1}} +\def\gtrnodeid{\gtrifnodeid{\expandafter\detokenize\expandafter{\gtr@gkv@id}}{???}} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.processing.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.processing.code.tex new file mode 100644 index 00000000000..66597df86c7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.processing.code.tex @@ -0,0 +1,710 @@ +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) +%% gtrcore.processing.code.tex: Processing +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2013-2015 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{0.90} +%%%%%%%%%%%%%%%%%%%%%%% +%% Processing - common +%%%%%%%%%%%%%%%%%%%%%%% + + +\def\gtr@proc@level@save@settings{% + \dimdef\gtr@rv@level@distance{\gtrkv@level@distance}% + \dimdef\gtr@rv@level@size{\gtrkv@level@size}% + \dimdef\gtr@rv@node@minsize{\gtrkv@node@minsize}% + \dimdef\gtr@rv@node@maxsize{\gtrkv@node@maxsize}% + \dimdef\gtr@rv@dist@sibling@par{\gtrkv@dist@sibling@par}% + \dimdef\gtr@rv@dist@sibling@chi{\gtrkv@dist@sibling@chi}% + \dimdef\gtr@rv@dist@parent@par{\gtrkv@dist@parent@par}% + \dimdef\gtr@rv@dist@parent@chi{\gtrkv@dist@parent@chi}% + \dimdef\gtr@rv@dist@further{\gtrkv@dist@further}% +} + + +\def\gtr@proc@level@opt{% + \begingroup% + \let\gtrkv@level@distance\gtr@rv@level@distance% + \let\gtrkv@level@size\gtr@rv@level@size% + \let\gtrkv@node@minsize\gtr@rv@node@minsize% + \let\gtrkv@node@maxsize\gtr@rv@node@maxsize% + \let\gtrkv@dist@sibling@par\gtr@rv@dist@sibling@par% + \let\gtrkv@dist@sibling@chi\gtr@rv@dist@sibling@chi% + \let\gtrkv@dist@parent@par\gtr@rv@dist@parent@par% + \let\gtrkv@dist@parent@chi\gtr@rv@dist@parent@chi% + \let\gtrkv@dist@further\gtr@rv@dist@further% + % + \global\let\gtr@gkv@opt@family@level\@empty% + \global\let\gtr@gkv@opt@subtree@level\@empty% + \global\let\gtr@gkv@opt@node@level\@empty% + % + \gtrset{% + family/.code={\gtrkeysgappto\gtr@gkv@opt@family@level{##1}}, + subtree/.code={\gtrkeysgappto\gtr@gkv@opt@subtree@level{##1}}, + node/.code={\gtrkeysgappto\gtr@gkv@opt@node@level{##1}}, + }% + % + \global\gtr@ignorefalse% + \gtrset{level=\number\gtr@c@level}% + \pgfkeysifdefined{/gtr/level \number\gtr@c@level/.@cmd}{% + \gtrset{level \number\gtr@c@level}% + }{% + }% + \ifgtr@ignore% + \global\def\gtr@gkv@opt@ignore@level{ignore}% + \else% + \global\let\gtr@gkv@opt@ignore@level\@empty% + \fi% + % + \global\let\gtr@level@distance\gtrkv@level@distance% + \global\let\gtr@level@size\gtrkv@level@size% + \global\let\gtr@node@minsize\gtrkv@node@minsize% + \global\let\gtr@node@maxsize\gtrkv@node@maxsize% + \global\let\gtr@dist@sibling@par\gtrkv@dist@sibling@par% + \global\let\gtr@dist@sibling@chi\gtrkv@dist@sibling@chi% + \global\let\gtr@dist@parent@par\gtrkv@dist@parent@par% + \global\let\gtr@dist@parent@chi\gtrkv@dist@parent@chi% + \global\let\gtr@dist@further\gtrkv@dist@further% + % + \endgroup% + % + \gtr@init@leveldimens% +} + + +\long\def\gtr@proc@subtree@opt#1{% + \global\gtr@ignorefalse% + \begingroup% + \gtrset{id=,pivot shift=0pt, + family/.code={\gtrkeysgappto\gtr@gkv@opt@family{##1}}, + subtree/.code={\gtrkeysgappto\gtr@gkv@opt@subtree{##1}}, + node/.code={\gtrkeysgappto\gtr@gkv@opt@family{##1}},% sic! + }% + \global\let\gtr@gkv@opt@family\gtr@gkv@opt@family@level% + \global\let\gtr@gkv@opt@subtree\gtr@gkv@opt@subtree@level% + \gtrset{#1,code={\pgfkeysalsofrom{\gtr@gkv@opt@ignore@level}\gtr@key@keysalsofrom{/gtr/sopt/\gtr@gkv@id}}}% + \endgroup% + \csedef{gtr@fam@\gtr@currentfamily @id}{\gtr@gkv@id}% + \csedef{gtr@fam@\gtr@currentfamily @ps}{\gtr@gkv@pivotshift}% + % + \gtr@cs@storekey{gtr@fam@\gtr@currentfamily @opt@family}{\gtr@gkv@opt@family}% + % + \ifcsdef{gtr@fam@\gtr@currentfamily @fam}{% + \letcs\gtr@encfamily{gtr@fam@\gtr@currentfamily @fam}% + \letcs\gtr@temp{gtr@fam@\gtr@encfamily @opt@subtree}% + \gtr@cs@storekeys{gtr@fam@\gtr@currentfamily @opt@subtree}{\gtr@temp}{\gtr@gkv@opt@subtree}% + }{% + \gtr@cs@storekey{gtr@fam@\gtr@currentfamily @opt@subtree}{\gtr@gkv@opt@subtree}% + }% +} + + +\def\gtr@proc@@set@enc@family{% + \ifnum\gtr@famstack@size>0% + \gtr@famstack@peekto{\gtr@encfamily}% + \csedef{gtr@fam@\gtr@currentfamily @fam}{\gtr@encfamily}% + \fi% + \csdef{gtr@fam@\gtr@currentfamily @offset}{0pt}% +} + +\long\def\gtr@proc@@family@begin#1{% + \gtr@proc@@set@enc@family% + \gtr@proc@subtree@opt{#1}% +} + +\def\gtr@proc@@parent@begin{% + \csdef{gtr@fam@\gtr@currentfamily @type}{par}% + \gtr@proc@@family@begin% +} + +\def\gtr@proc@@child@begin{% + \csdef{gtr@fam@\gtr@currentfamily @type}{chi}% + \gtr@proc@@family@begin% +} + +\def\gtr@proc@@union@begin{% + \csdef{gtr@fam@\gtr@currentfamily @type}{uni}% + \gtr@proc@@family@begin% +} + +\def\gtr@proc@@sandclock@begin{% + \csdef{gtr@fam@\gtr@currentfamily @type}{san}% + \gtr@proc@@family@begin% +} + +\def\gtr@proc@pivot@reset{% + \let\gtr@current@pivot@chi=\@undefined% + \let\gtr@current@pivot@par=\@undefined% +} + + +\def\gtr@proc@pivot@check@child#1#2{% + \ifcsname gtr@per@#1@pivo@chi\endcsname% + \let\gtr@current@pivot@chi=#2% + \fi% +} + + +\def\gtr@proc@pivot@check@parent#1#2{% + \ifcsname gtr@per@#1@pivo@par\endcsname% + \let\gtr@current@pivot@par=#2% + \fi% +} + + +\def\gtr@proc@compute@pivotpoint@chi{% + \ifdefined\gtr@current@pivot@chi% + \let\gtr@tmp@chipos@mid=\gtr@current@pivot@chi% + \else% + \dimdef\gtr@tmp@chipos@mid{(\gtr@tmp@chipos@A+\gtr@tmp@chipos@B)/2}% + \fi% +} + +\def\gtr@proc@compute@pivotpoint@par{% + \ifdefined\gtr@current@pivot@par% + \let\gtr@tmp@parpos@mid=\gtr@current@pivot@par% + \else% + \dimdef\gtr@tmp@parpos@mid{(\gtr@tmp@parpos@A+\gtr@tmp@parpos@B)/2}% + \fi% +} + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Processing - parent +%%%%%%%%%%%%%%%%%%%%%%% + +\def\gtr@procpar@following@parent#1{% + \ifcsname gtr@per@#1@chiof\endcsname + \letcs\gtr@parent@fam{gtr@per@#1@chiof}% + \gtr@cont@merge@tree{\gtr@parent@fam}{\gtr@dist@parent@par}% + \else + \gtr@cont@merge@node{#1}{\gtr@dist@parent@par}% + \fi% + \let\gtr@tmp@parpos@B=\gtr@tmp@linkpos% + \gtr@proc@pivot@check@parent{#1}{\gtr@tmp@linkpos}% +} + + +\def\gtr@procpar@first@parent#1{% + \let\do=\gtr@procpar@following@parent% + \ifcsname gtr@per@#1@chiof\endcsname + \letcs\gtr@parent@fam{gtr@per@#1@chiof}% + \gtr@cont@first@tree{\gtr@parent@fam}% + \else + \gtr@cont@first@node{#1}% + \fi% + \let\gtr@tmp@parpos@A=\gtr@tmp@linkpos% + \let\gtr@tmp@parpos@B=\gtr@tmp@linkpos% + \gtr@proc@pivot@check@parent{#1}{\gtr@tmp@linkpos}% +} + + +\def\gtr@procpar@following@child#1{% + \gtr@cont@merge@anchor{#1}{\gtr@dist@sibling@par}% + \let\gtr@tmp@chipos@B=\gtr@tmp@linkpos% + \gtr@proc@pivot@check@child{#1}{\gtr@tmp@linkpos}% +} + + +\def\gtr@procpar@first@child#1{% + \let\do=\gtr@procpar@following@child% + \gtr@cont@first@anchor{#1}% + \let\gtr@tmp@chipos@A=\gtr@tmp@linkpos% + \let\gtr@tmp@chipos@B=\gtr@tmp@linkpos% + \gtr@proc@pivot@check@child{#1}{\gtr@tmp@linkpos}% +} + + +\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}% + \fi% + \gtr@proc@pivot@reset% + \csdef{gtr@fam@\gtr@currentfamily @frac}{0.5}% + \gtr@set@position@family{\gtr@currentfamily}% + \let\gtr@tmp@nextwest=\@undefined% + \let\gtr@tmp@nexteast=\@undefined% + % + \csdef{gtr@fam@\gtr@currentfamily @offset}{0pt}% + \letcs\gtr@currentchildlist{gtr@fam@\gtr@currentfamily @chi}% + \letcs\gtr@currentparentlist{gtr@fam@\gtr@currentfamily @par}% + % + \ifdefined\gtr@currentparentlist% + \let\do=\gtr@procpar@first@parent% + \dolistloop{\gtr@currentparentlist}% + \gtr@proc@compute@pivotpoint@par% + \fi% + \let\do=\gtr@procpar@first@child% + \dolistloop{\gtr@currentchildlist}% + \gtr@proc@compute@pivotpoint@chi% + \ifdefined\gtr@currentparentlist% + \dimdef\gtr@temp{\gtr@tmp@parpos@mid-\gtr@tmp@chipos@mid+\csuse{gtr@fam@\gtr@currentfamily @ps}}% + \gtr@cont@shift{\gtr@currentchildlist}{\gtr@temp}% + \fi% +} + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Processing - child +%%%%%%%%%%%%%%%%%%%%%%% + +\def\gtr@procchi@following@parent#1{% + \gtr@cont@merge@anchor{#1}{\gtr@dist@parent@chi}% + \let\gtr@tmp@parpos@B=\gtr@tmp@linkpos% + \gtr@proc@pivot@check@parent{#1}{\gtr@tmp@linkpos}% +} + + +\def\gtr@procchi@first@parent#1{% + \let\do=\gtr@procchi@following@parent% + \gtr@cont@first@anchor{#1}% + \let\gtr@tmp@parpos@A=\gtr@tmp@linkpos% + \let\gtr@tmp@parpos@B=\gtr@tmp@linkpos% + \gtr@proc@pivot@check@parent{#1}{\gtr@tmp@linkpos}% +} + + +\def\gtr@procchi@following@child#1{% + \ifcsname gtr@per@#1@parof\endcsname + \letcs\gtr@child@fam{gtr@per@#1@parof}% + \gtr@cont@merge@tree{\gtr@child@fam}{\gtr@dist@sibling@chi}% + \else + \gtr@cont@merge@node{#1}{\gtr@dist@sibling@chi}% + \fi% + \let\gtr@tmp@chipos@B=\gtr@tmp@linkpos% + \gtr@proc@pivot@check@child{#1}{\gtr@tmp@linkpos}% +} + + +\def\gtr@procchi@first@child#1{% + \let\do=\gtr@procchi@following@child% + \ifcsname gtr@per@#1@parof\endcsname + \letcs\gtr@child@fam{gtr@per@#1@parof}% + \gtr@cont@first@tree{\gtr@child@fam}% + \else + \gtr@cont@first@node{#1}% + \fi% + \let\gtr@tmp@chipos@A=\gtr@tmp@linkpos% + \let\gtr@tmp@chipos@B=\gtr@tmp@linkpos% + \gtr@proc@pivot@check@child{#1}{\gtr@tmp@linkpos}% +} + +\def\gtr@proc@@child@end{% + \ifcsname gtr@fam@\gtr@currentfamily @g\endcsname% + \else\gtr@error{No g-node in child family (\gtr@currentfamily)}{Every family needs a g-node}% + \fi% + \gtr@proc@pivot@reset% + \letcs\gtr@gnode{gtr@fam@\gtr@currentfamily @g}% + \csdef{gtr@fam@\gtr@currentfamily @offset}{0pt}% + \ifcsname gtr@fam@\gtr@currentfamily @union\endcsname% + \numdef\gtr@@parts{2}% + \def\do##1{\numdef\gtr@@parts{\gtr@@parts+1}}% + \dolistcsloop{gtr@fam@\gtr@currentfamily @union}% + \dimdef\gtr@@dimfrac{1pt/\gtr@@parts}% + \pgfmathqparse{\gtr@@dimfrac}% + \csedef{gtr@fam@\gtr@currentfamily @frac}{\pgfmathresult}% + \gtr@set@position@family{\gtr@currentfamily}% + \let\gtr@@dimsumfrac=\gtr@@dimfrac% + % + \def\dodo##1{% + \dimdef\gtr@@dimsumfrac{\gtr@@dimsumfrac+\gtr@@dimfrac}% + \pgfmathqparse{\gtr@@dimsumfrac}% + \csedef{gtr@fam@##1@frac}{\pgfmathresult}% + \gtr@set@position@family{##1}% + \ifcsname gtr@fam@##1@g\endcsname% + \else% + \listcseadd{gtr@fam@##1@par}{\gtr@gnode}% + \gtr@add@gnode{\gtr@gnode}{##1}% + \fi% + \let\do=\dodo% loop-in-loop + }% + \let\do=\dodo% + \dolistcsloop{gtr@fam@\gtr@currentfamily @union}% + \else% + \csdef{gtr@fam@\gtr@currentfamily @frac}{0.5}% + \gtr@set@position@family{\gtr@currentfamily}% + \fi% + \let\gtr@tmp@nextwest=\@undefined% + \let\gtr@tmp@nexteast=\@undefined% + % + \letcs\gtr@currentchildlist{gtr@fam@\gtr@currentfamily @patchi}% + \letcs\gtr@currentparentlist{gtr@fam@\gtr@currentfamily @patpar}% + % + \ifdefined\gtr@currentchildlist% + \let\do=\gtr@procchi@first@child% + \dolistloop{\gtr@currentchildlist}% + \gtr@proc@compute@pivotpoint@chi% + \fi% + \let\do=\gtr@procchi@first@parent% + \dolistloop{\gtr@currentparentlist}% + \gtr@proc@compute@pivotpoint@par% + \ifdefined\gtr@currentchildlist% + \dimdef\gtr@temp{\gtr@tmp@chipos@mid-\gtr@tmp@parpos@mid-\csuse{gtr@fam@\gtr@currentfamily @ps}}% + \gtr@cont@shift{\gtr@currentparentlist}{\gtr@temp}% + \fi% +} + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Processing - union +%%%%%%%%%%%%%%%%%%%%%%% + +% merge list #1 to #2 +\def\gtr@procuni@mergechild@list#1#2{% + \ifcsname#1\endcsname% + \def\do##1{% + \ifcsname gtr@per@##1@parof\endcsname% + \else% + \gtr@add@family{##1}{\gtr@encfamily}% + \fi% + \listcseadd{#2}{##1}% + }% + \dolistcsloop{#1}% + \fi% +} + +% merge list #1 to #2 +\def\gtr@procuni@mergeparent@list#1#2{% + \ifcsname#1\endcsname% + \def\do##1{% + \gtr@add@family{##1}{\gtr@encfamily}% + \listcseadd{#2}{##1}% + }% + \dolistcsloop{#1}% + \fi% +} + +\def\gtr@proc@@union@end{% + \gtr@famstack@peekto{\gtr@encfamily}% + \gtr@add@union{\gtr@currentfamily}{\gtr@encfamily}% + \gtr@procuni@mergechild@list{gtr@fam@\gtr@currentfamily @chi}{gtr@fam@\gtr@encfamily @patchi}% + \gtr@procuni@mergeparent@list{gtr@fam@\gtr@currentfamily @par}{gtr@fam@\gtr@encfamily @patpar}% + \ifcsname gtr@fam@\gtr@encfamily @g\endcsname + \letcs\gtr@gnode{gtr@fam@\gtr@encfamily @g}% + \listcseadd{gtr@fam@\gtr@currentfamily @par}{\gtr@gnode}% + \gtr@add@gnode{\gtr@gnode}{\gtr@currentfamily}% + \fi% +} + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Processing - sandclock +%%%%%%%%%%%%%%%%%%%%%%% + +\def\gtr@proc@@sandclock@end{% + \gtr@proc@pivot@reset% + \csdef{gtr@fam@\gtr@currentfamily @frac}{0.5}% + \gtr@set@position@family{\gtr@currentfamily}% + \let\gtr@tmp@nextwest=\@undefined% + \let\gtr@tmp@nexteast=\@undefined% + % + \csdef{gtr@fam@\gtr@currentfamily @offset}{0pt}% + \letcs\gtr@currentchildlist{gtr@fam@\gtr@currentfamily @chi}% + \letcs\gtr@currentparentlist{gtr@fam@\gtr@currentfamily @par}% + % + \ifdefined\gtr@currentparentlist% + \let\do=\gtr@procpar@first@parent% + \dolistloop{\gtr@currentparentlist}% + \gtr@proc@compute@pivotpoint@par% + \csedef{gtr@fam@\gtr@currentfamily @ceast@panchor}{\gtr@tmp@nexteast}% + \csedef{gtr@fam@\gtr@currentfamily @cwest@panchor}{\gtr@tmp@nextwest}% + \fi% + % + \let\gtr@tmp@nextwest=\@undefined% + \let\gtr@tmp@nexteast=\@undefined% + \ifdefined\gtr@currentchildlist% + \let\do=\gtr@procchi@first@child% + \dolistloop{\gtr@currentchildlist}% + \gtr@proc@compute@pivotpoint@chi% + \dimdef\gtr@temp{\gtr@tmp@chipos@mid-\gtr@tmp@parpos@mid-\csuse{gtr@fam@\gtr@currentfamily @ps}}% + \ifdefined\gtr@currentparentlist% + \gtr@cont@shift@sandclock{\gtr@currentparentlist}{\gtr@temp}% + \fi% + \csedef{gtr@fam@\gtr@currentfamily @ceast@canchor}{\gtr@tmp@nexteast}% + \csedef{gtr@fam@\gtr@currentfamily @cwest@canchor}{\gtr@tmp@nextwest}% + \fi% +} + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Processing - g/p/c +%%%%%%%%%%%%%%%%%%%%%%% + +\long\def\gtr@proc@@parent@g@content{% + \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% + \gtr@famstack@peekto{\gtr@childfamily}% + \gtr@add@parent{\gtr@currentperson}{\gtr@childfamily}% + \fi% +} + +\long\def\gtr@proc@@child@g@content{% + \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% + \gtr@famstack@peekto{\gtr@parentfamily}% + \gtr@add@child{\gtr@currentperson}{\gtr@parentfamily}% + \fi% +} + +\long\def\gtr@proc@@p@content{% + \gtr@add@parent{\gtr@currentperson}{\gtr@currentfamily}% + \gtr@add@family{\gtr@currentperson}{\gtr@currentfamily}% +} + +\long\def\gtr@proc@@c@content{% + \gtr@add@child{\gtr@currentperson}{\gtr@currentfamily}% + \gtr@add@family{\gtr@currentperson}{\gtr@currentfamily}% +} + +\gtrset{ + linked@family@options/.is choice, + linked@family@options/p/.code={}, + linked@family@options/c/.code={}, + linked@family@options/pc/.code={}, + linked@family@options/gc/.code={}, +} + +\def\gtr@linked@family@options@p{} +\def\gtr@linked@family@options@c{} +\def\gtr@linked@family@options@g{% + \ifnum\gtr@famstack@size>0% + \gtr@famstack@peekto{\gtr@linkedfamily}% + \gtr@cs@keysalsofrom{gtr@fam@\gtr@linkedfamily @opt@family}% + \fi% +} + +\long\def\gtr@proc@add@node#1#2{% + \ifcsdef{gtr@per@\gtr@currentperson @box}% + {\letcs\gtr@pbox{gtr@per@\gtr@currentperson @box}}% + {\newbox\gtr@pbox\csxdef{gtr@per@\gtr@currentperson @box}{\the\gtr@pbox}}% + % + \setbox\gtr@pbox\hbox{% + \begingroup% + \begin{pgfinterruptpicture}% + \global\gtr@ignorefalse% + \gtrset{id=,distance=-1sp,pivot=none, + code={% + \gtr@cs@keysalsofrom{gtr@fam@\gtr@currentfamily @opt@subtree}% + \csuse{gtr@linked@family@options@\gtrnodetype}% + \gtr@cs@keysalsofrom{gtr@fam@\gtr@currentfamily @opt@family}% + \pgfkeysalsofrom{\gtr@gkv@opt@node@level}},% + #1, + code={\gtr@key@keysalsofrom{/gtr/nopt/\gtr@gkv@id}}% + }% + \unless\ifgtr@ignore% + \gtr@box@content@interpreter{#2}% + \gtr@box@content@processor% + \fi% + \end{pgfinterruptpicture}% + \endgroup% + }% + \unless\ifgtr@ignore% + \csedef{gtr@per@\gtr@currentperson @id}{\gtr@gkv@id}% + \ifdim\gtr@gkv@distance>-1sp\relax% + \csedef{gtr@per@\gtr@currentperson @distance}{\gtr@gkv@distance}% + \fi% + \ifcase\number\gtr@gkv@pivot\relax% + \or\csedef{gtr@per@\gtr@currentperson @pivo@chi}{}% + \or\csedef{gtr@per@\gtr@currentperson @pivo@par}{}% + \else\csedef{gtr@per@\gtr@currentperson @pivo@chi}{}% + \csedef{gtr@per@\gtr@currentperson @pivo@par}{}% + \fi% + % + \gtr@set@level@position{\gtr@currentperson}% + \fi% +} + +\def\gtr@add@parent#1#2{% + \listcseadd{gtr@fam@#2@par}{#1}% + \listcseadd{gtr@fam@#2@patpar}{#1}% + \csedef{gtr@per@#1@parof}{#2}% +} + +\def\gtr@add@child#1#2{% + \listcseadd{gtr@fam@#2@chi}{#1}% + \listcseadd{gtr@fam@#2@patchi}{#1}% + \csedef{gtr@per@#1@chiof}{#2}% +} + +\def\gtr@add@gnode#1#2{% + \csedef{gtr@fam@#2@g}{#1}% +} + +\def\gtr@add@family#1#2{% + \csedef{gtr@per@#1@fam}{#2}% +} + +\def\gtr@add@union#1#2{% + \listcseadd{gtr@fam@#2@union}{#1}% +} + +% loop through a single tree + +\def\gtr@forall@nodes#1{% + \numdef\gtr@num@per@count{\gtr@num@per@first}% + \loop% + \ifnum\gtr@num@per@count<\numexpr\gtr@num@per@last+1\relax% + \gtr@set@currentperson{\gtr@num@per@count}% + #1{\gtr@currentperson}% + \numdef\gtr@num@per@count{\gtr@num@per@count+1}% + \repeat% +} + +\def\gtr@forall@families#1{% + \numdef\gtr@num@fam@count{\gtr@num@fam@first}% + \loop% + \ifnum\gtr@num@fam@count<\numexpr\gtr@num@fam@last+1\relax% + \gtr@set@currentfamily{\gtr@num@fam@count}% + #1{\gtr@currentfamily}% + \numdef\gtr@num@fam@count{\gtr@num@fam@count+1}% + \repeat% +} + +% linear search for all trees + +\def\gtr@getPerNumForId@loop#1{% + \ifnum#1<\numexpr\gtr@num@per@last+1\relax% + \gtr@set@currentperson{#1}% + \letcs\gtr@currentid{gtr@per@\gtr@currentperson @id}% + \ifx\gtr@tmp@id\gtr@currentid\relax% + \let\gtr@tmp@num\gtr@currentperson% + \else% + \expandafter\gtr@getPerNumForId@loop\expandafter{\number\numexpr#1+1\expandafter}% + \fi% + \fi% +} + +\def\gtr@getPerNumForId#1{% + \edef\gtr@tmp@id{#1}% + \edef\gtr@tmp@num{}% + \gtr@getPerNumForId@loop{1}% +} + +\def\gtr@getFamNumForId@loop#1{% + \ifnum#1<\numexpr\gtr@num@fam@last+1\relax% + \gtr@set@currentfamily{#1}% + \letcs\gtr@currentid{gtr@fam@\gtr@currentfamily @id}% + \ifx\gtr@tmp@id\gtr@currentid\relax% + \let\gtr@tmp@num\gtr@currentfamily% + \else% + \expandafter\gtr@getFamNumForId@loop\expandafter{\number\numexpr#1+1\expandafter}% + \fi% + \fi% +} + +\def\gtr@getFamNumForId#1{% + \edef\gtr@tmp@id{#1}% + \edef\gtr@tmp@num{}% + \gtr@getFamNumForId@loop{1}% +} + +% #1: child (id) +% #2: family (id) +\def\gtr@add@child@after@parser#1#2{% + \gtr@getPerNumForId{#1}% + \let\gtr@tmp@pnum\gtr@tmp@num% person number for ID + % + \gtr@getFamNumForId{#2}% + \let\gtr@tmp@fnum\gtr@tmp@num% family number for ID + % + \listcseadd{gtr@fam@\gtr@tmp@fnum @chi}{\gtr@tmp@pnum}% +} + +% #1: parent (id) +% #2: family (id) +\def\gtr@add@parent@after@parser#1#2{% + \gtr@getPerNumForId{#1}% + \let\gtr@tmp@pnum\gtr@tmp@num% person number for ID + % + \gtr@getFamNumForId{#2}% + \let\gtr@tmp@fnum\gtr@tmp@num% family number for ID + % + \listcseadd{gtr@fam@\gtr@tmp@fnum @par}{\gtr@tmp@pnum}% +} + + +\def\gtr@disconnect@child#1#2{% + \letcs\gtr@temp@list{gtr@fam@#2@chi}% + \ifdefvoid{\gtr@temp@list}{}{% + \csundef{gtr@fam@#2@chi}% + \def\do##1{% + \ifdefstring{#1}{##1}{}{\listcseadd{gtr@fam@#2@chi}{##1}}% + }% + \dolistloop{\gtr@temp@list}% + }% +} + +\def\gtr@disconnect@node@as@child#1{% + \def\gtr@tmp@pnum{#1}% + \letcs\gtr@tmp@fnum{gtr@per@#1@chiof}% + \ifdefvoid{\gtr@tmp@fnum}{}{% + \gtr@disconnect@child{\gtr@tmp@pnum}{\gtr@tmp@fnum}% + }% +} + +\def\gtr@remove@child@after@parser#1#2{% + \gtr@getPerNumForId{#1}% + \ifdefempty{\gtr@tmp@num}{}{% + \let\gtr@tmp@pnum\gtr@tmp@num% person number for ID + % + \gtr@getFamNumForId{#2}% + \ifdefempty{\gtr@tmp@num}{}{% + \let\gtr@tmp@fnum\gtr@tmp@num% family number for ID + % + \gtr@disconnect@child{\gtr@tmp@pnum}{\gtr@tmp@fnum}% + }% + }% +} + +\def\gtr@disconnect@parent#1#2{% + \letcs\gtr@temp@list{gtr@fam@#2@par}% + \ifdefvoid{\gtr@temp@list}{}{% + \csundef{gtr@fam@#2@par}% + \def\do##1{% + \ifdefstring{#1}{##1}{}{\listcseadd{gtr@fam@#2@par}{##1}}% + }% + \dolistloop{\gtr@temp@list}% + }% +} + + +\def\gtr@disconnect@node@as@parent#1{% + \def\gtr@tmp@pnum{#1}% + \letcs\gtr@tmp@fnum{gtr@per@#1@parof}% + \ifdefvoid{\gtr@tmp@fnum}{}{% + \gtr@disconnect@parent{\gtr@tmp@pnum}{\gtr@tmp@fnum}% + }% +} + + +\def\gtr@remove@parent@after@parser#1#2{% + \gtr@getPerNumForId{#1}% + \ifdefempty{\gtr@tmp@num}{}{% + \let\gtr@tmp@pnum\gtr@tmp@num% person number for ID + % + \gtr@getFamNumForId{#2}% + \ifdefempty{\gtr@tmp@num}{}{% + \let\gtr@tmp@fnum\gtr@tmp@num% family number for ID + % + \gtr@disconnect@parent{\gtr@tmp@pnum}{\gtr@tmp@fnum}% + }% + }% +} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrcore.symbols.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.symbols.code.tex new file mode 100644 index 00000000000..6569d4d2deb --- /dev/null +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrcore.symbols.code.tex @@ -0,0 +1,238 @@ +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) +%% gtrcore.symbols.code.tex: Symbols +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2013-2015 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{0.90} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Symbols +%%%%%%%%%%%%%%%%%%%%%%% + +% hide from externalization +\let\gtr@tikzpicture\tikzpicture% +\let\endgtr@tikzpicture\endtikzpicture% + +\colorlet{gtrsymbol}{black} + +\def\gtr@symbol@draw#1{\csname gtr@sym@#1@pic\endcsname} + +% Draw every time +\newcommand{\gtrSymbolsSetDraw}[1]{% + \colorlet{gtrsymbol}{#1}% + \let\gtr@symbol@core\gtr@symbol@draw% +} + +\def\gtr@symbol@copy#1{\copy\csname gtr@sym@#1@box\endcsname} + +% Draw once, copy the rest of the time +\newcommand{\gtrSymbolsSetCreate}[1]{% + \colorlet{gtrsymbol}{#1}% + \let\gtr@symbol@core\gtr@symbol@copy% + \gtr@symbol@box@hook% +} + +\newcommand{\gtrSymbolsSetCreateSelected}[2]{% + \colorlet{gtrsymbol}{#1}% + \let\gtr@symbol@core\gtr@symbol@copy% + \def\do##1{% + \begingroup\edef\x{\endgroup\noexpand\setbox\expandonce{\csname gtr@sym@##1@box\endcsname}% + =\noexpand\color@hbox\expandonce{\csname gtr@sym@##1@pic\endcsname}\noexpand\color@endbox}% + \x}% + \docsvlist{#2}% +} + +\def\gtr@symbol@print#1{% + \gtrlistseparator% + \csuse{gtrsym#1}=\csuse{gtr@sym@#1@text}% +} + +\def\gtr@symbol@do#1{\gtr@symbol@print{#1}} +\def\gtr@symbol@dont#1{} +\def\gtr@symbol@record#1{\global\cslet{gtr@sym@#1@print}{\gtr@symbol@do}} + + +\newcommand*{\gtrSymbolsRecordReset}{% + \def\do##1{\cslet{gtr@sym@##1@print}{\gtr@symbol@dont}}% + \dolistloop{\gtr@symbol@list}% +} + +\newcommand*{\gtrSymbolsFullLegend}[1][]{% + \begin{gtrprintlist}{}{\unskip,\ }{\unskip.}{}% + \def\temp@a{#1}\ifx\temp@a\@empty\else\gtrset{language=#1}\fi% + \def\gtr@symbol@record##1{}% + \forlistloop{\gtr@symbol@print}{\gtr@symbol@list}% + \end{gtrprintlist}% +} + +\newcommand*{\gtrSymbolsLegend}[1][]{% + \begin{gtrprintlist}{}{\unskip,\ }{\unskip.}{}% + \def\temp@a{#1}\ifx\temp@a\@empty\else\gtrset{language=#1}\fi% + \def\gtr@symbol@record##1{}% + \def\do##1{\csuse{gtr@sym@##1@print}{##1}}% + \dolistloop{\gtr@symbol@list}% + \end{gtrprintlist}% +} + +\def\gtr@symbol@core#1#2{% + \expandafter\def\csname gtrsym#1\endcsname{\gtr@symbol@record{#1}#2}% + \begingroup\edef\x{\endgroup\noexpand\gtrset{symlang/#1/.store in=\expandonce{\csname gtr@sym@#1@text\endcsname}}}\x% + \cslet{gtr@sym@#1@print}{\gtr@symbol@dont}% + \listeadd{\gtr@symbol@list}{#1}% +} + +\def\gtr@symbol@factory#1#2#3{% + \expandafter\newbox\csname gtr@sym@#1@box\endcsname% + \expandafter\def\csname gtr@sym@#1@pic\endcsname{#2}% + \gtr@symbol@core{#1}{% + \edef\gtr@scale{\strip@pt\dimexpr#3\dimexpr\f@size pt\relax}% + \scalebox{\gtr@scale}{\gtr@symbol@core{#1}}}% + \eappto\gtr@symbol@box@hook{\noexpand\setbox\expandonce{\csname gtr@sym@#1@box\endcsname}% + =\noexpand\color@hbox\expandonce{\csname gtr@sym@#1@pic\endcsname}\noexpand\color@endbox}% +} + +\gtr@symbol@factory{Born}{% + \begin{gtr@tikzpicture}[line width=4mm,color=gtrsymbol]% + \path[use as bounding box] (-1.1,-0.926574) rectangle (1.1,1); + \draw (0,0)--(18:1cm); + \draw (0,0)--(90:1cm); + \draw (0,0)--(162:1cm); + \draw (0,0)--(234:1cm); + \draw (0,0)--(306:1cm); + \end{gtr@tikzpicture}% +}{0.012} + +\gtr@symbol@core{Bornoutofwedlock}{% + \textcolor{gtrsymbol}{\normalfont\sffamily(\kern-.125em{\def\gtr@symbol@record##1{}\gtrsymBorn}\kern-.125em)}% +} + +\gtr@symbol@core{Stillborn}{{\def\gtr@symbol@record##1{}\gtrsymDied\gtrsymBorn}} + +\gtr@symbol@core{Diedonbirthday}{\textcolor{gtrsymbol}{{\def\gtr@symbol@record##1{}\gtrsymBorn\gtrsymDied}}} + +\gtr@symbol@factory{Baptized}{% + \begin{gtr@tikzpicture}[line width=4mm,xscale=0.5,baseline=-7mm,color=gtrsymbol]% + \path[use as bounding box] (-0.45,-0.5) rectangle (6.45,1.5); + \draw (0,0) .. controls (0.5,0.4) and (1.5,0.4) .. (2,0) .. controls (2.5,-0.4) and (3.5,-0.4) .. (4,0) .. controls (4.5,0.4) and (5.5,0.4) .. (6,0); + \draw (0,1) .. controls (0.5,1.4) and (1.5,1.4) .. (2,1) .. controls (2.5,0.6) and (3.5,0.6) .. (4,1) .. controls (4.5,1.4) and (5.5,1.4) .. (6,1); + \end{gtr@tikzpicture}% +}{0.009}% + +\gtr@symbol@factory{Engaged}{% + \begin{gtr@tikzpicture}[line width=3mm,color=gtrsymbol]% + \path[use as bounding box] (-1.15,-1.05) rectangle (1.15,1.05); + \draw (0,0) circle (9mm); + \end{gtr@tikzpicture}% +}{0.011}% + +\gtr@symbol@factory{Married}{% + \begin{gtr@tikzpicture}[line width=3mm,color=gtrsymbol]% + \path[use as bounding box] (-1.65,-1.05) rectangle (1.65,1.05); + \draw (-0.50,0) +(-40:9mm) arc (-40:285:9mm); + \draw (0.50,0) +(-220:9mm) arc (-220:105:9mm); + \end{gtr@tikzpicture}% +}{0.011}% + +\gtr@symbol@factory{Divorced}{% + \begin{gtr@tikzpicture}[line width=3mm,color=gtrsymbol]% + \path[use as bounding box] (-2.35,-1.05) rectangle (2.35,1.05); + \draw (-1.2,0) circle (9mm); + \draw (0,-0.9)--(0,0.9); + \draw (1.2,0) circle (9mm); + \end{gtr@tikzpicture}% +}{0.011}% + +\gtr@symbol@factory{Partnership}{% + \begin{gtr@tikzpicture}[line width=3mm,color=gtrsymbol]% + \path[use as bounding box] (-2.65,-1.05) rectangle (2.65,1.05); + \draw (-1.5,0) circle (9mm); + \draw (-0.5,0)--(0.5,0); + \draw (1.5,0) circle (9mm); + \end{gtr@tikzpicture}% +}{0.011}% + +\gtr@symbol@factory{Died}{% + \begin{gtr@tikzpicture}[line width=4mm,baseline=2mm,color=gtrsymbol]% + \path[use as bounding box] (-0.8,0) rectangle +(1.6,2.2); + \draw (0,0)--(0,2.2); + \draw (-0.7,1.5)--+(1.4,0); + \end{gtr@tikzpicture}% +}{0.012}% + +\gtr@symbol@factory{Killed}{% + \begin{gtr@tikzpicture}[line width=2mm,baseline=1mm,color=gtrsymbol]% + \path[use as bounding box] (-0.94,-0.08) rectangle (0.94,1.9); + \foreach \v in {,-} + { + \begin{scope}[xshift=\v7mm,rotate=\v40] + \fill (-0.1,0) [rounded corners=0.5mm] -- (-0.1,1.8) -- (0,2.5) + -- (0.1,1.8)[sharp corners] -- (0.1,0) -- cycle; + \draw (-0.4,0.4) -- (0.4,0.4); + \end{scope} + } + \end{gtr@tikzpicture}% +}{0.0133}% + +\gtr@symbol@factory{Buried}{% + \begin{gtr@tikzpicture}[line width=3mm,baseline=2mm,color=gtrsymbol]% + \path[use as bounding box] (-0.86,-.15) rectangle (0.86,2.35); + \draw[draw,fill,fill opacity=0.25] (-0.3,0) -- (-0.6,1.5) -- (-0.3,2.2) -- (0.3,2.2) -- (0.6,1.5) -- (0.3,0) -- cycle; + \end{gtr@tikzpicture}% +}{0.011}% + +\gtr@symbol@factory{Funeralurn}{% + \begin{gtr@tikzpicture}[line width=2mm,,color=gtrsymbol]% + \path[use as bounding box] (-0.78,-0.1) rectangle (0.78,1.9); + \path[fill,fill opacity=0.25] (-0.3,0) -- (-0.6,1.2) -- (0.6,1.2) -- (0.3,0) -- cycle; + \path[draw] (-0.3,0)[rounded corners=2mm] -- (-0.6,1.2)[sharp corners] -- (-0.3,1.6) -- + (0.3,1.6)[rounded corners=2mm] -- (0.6,1.2)[sharp corners] -- (0.3,0) -- cycle; + \fill (0,1.7) circle (2mm); + \end{gtr@tikzpicture}% +}{0.011}% + +\gtr@symbol@factory{Female}{% + \begin{gtr@tikzpicture}[line width=2mm,baseline=-13mm,color=gtrsymbol]% + \path[use as bounding box] (-0.9,-1.8) rectangle (0.9,0.8); + \draw (0,0) circle (7mm); + \draw (270:7mm) -- (270:18mm); + \draw (-0.4,-1.3)--(0.4,-1.3); + \end{gtr@tikzpicture}% +}{0.011}% + +\gtr@symbol@factory{Male}{% + \begin{gtr@tikzpicture}[line width=2mm,color=gtrsymbol]% + \path[use as bounding box] (-0.9,-0.8) rectangle (1.33,1.28); + \draw (0,0) circle (7mm); + \draw[arrows = {-Straight Barb[]}] (45:7mm) -- (45:18mm); + \end{gtr@tikzpicture}% +}{0.011}% + +\gtr@symbol@factory{Neuter}{% + \begin{gtr@tikzpicture}[line width=2mm,baseline=-13mm,color=gtrsymbol]% + \path[use as bounding box] (-0.9,-1.8) rectangle (0.9,0.8); + \draw (0,0) circle (7mm); + \draw (270:7mm) -- (270:18mm); + \end{gtr@tikzpicture}% +}{0.011}% + +\gtrset{% + symbols record reset/.code={\gtrSymbolsRecordReset}, + symbols record reset +} + +\AtBeginDocument{% + \gtrSymbolsSetCreate{gtrsymbol}} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.english.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.english.code.tex new file mode 100644 index 00000000000..97053ed4ef7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.english.code.tex @@ -0,0 +1,84 @@ +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) +%% gtrlang.english.code.tex: English language +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2015 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{0.90} + +\gtrset{language@/english/.code={% + \gtrset{symlang/.cd, + Born=born, + Bornoutofwedlock=born out of wedlock, + Stillborn=stillborn, + Diedonbirthday=died on the birthday, + Baptized=baptized, + Engaged=engaged, + Married=married, + Divorced=divorced, + Partnership=unmarried partnership, + Died=died, + Killed=killed in action, + Buried=buried, + Funeralurn=cremated, + Female=female, + Male=male, + Neuter=neuter + }% + \gtrset{% + month long/.cd, + 01/.initial=January, + 02/.initial=February, + 03/.initial=March, + 04/.initial=April, + 05/.initial=May, + 06/.initial=June, + 07/.initial=July, + 08/.initial=August, + 09/.initial=September, + 10/.initial=October, + 11/.initial=November, + 12/.initial=December, + }% + \gtrset{% + month short/.cd, + 01/.initial=Jan\dot, + 02/.initial=Feb\dot, + 03/.initial=Mar\dot, + 04/.initial=Apr\dot, + 05/.initial=May, + 06/.initial=Jun\dot, + 07/.initial=Jul\dot, + 08/.initial=Aug\dot, + 09/.initial=Sep\dot, + 10/.initial=Oct\dot, + 11/.initial=Nov\dot, + 12/.initial=Dec\dot, + }% + \gtrset{% + calendar text for=AD is {AD }{}, + calendar text for=BC is {}{ BC}, + calendar text for=GR is {}{\textsuperscript{greg.}}, + calendar text for=JU is {}{\textsuperscript{jul.}}, + calendar text for=caAD is {ca.~AD }{}, + calendar text for=caBC is {ca.~}{ BC}, + calendar text for=ca is {ca.~}{}, + date range full={}{--}{}, + date range before={before }{}, + date range after={after }{}, + place text={in }{}, + }% +}} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlang.german.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.german.code.tex new file mode 100644 index 00000000000..a79188c18a8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlang.german.code.tex @@ -0,0 +1,92 @@ +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) +%% gtrlang.german.code.tex: German language +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2015 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{0.90} + +\gtrset{language@/german/.code={% + \gtrset{symlang/.cd, + Born=geboren, + Bornoutofwedlock=au\ss{}erehelich geboren, + Stillborn=tot geboren, + Diedonbirthday=am Tag der Geburt gestorben, + Baptized=getauft, + Engaged=verlobt, + Married=verheiratet, + Divorced=geschieden, + Partnership=au\ss{}ereheliche Verbindung, + Died=gestorben, + Killed=gefallen, + Buried=begraben, + Funeralurn=einge\"aschert, + Female=weiblich, + Male=m\"annlich, + Neuter=Geschlecht unbekannt + }% + \gtrset{% + month long/.cd, + 01/.initial=Januar, + 02/.initial=Februar, + 03/.initial=M\"arz, + 04/.initial=April, + 05/.initial=Mai, + 06/.initial=Juni, + 07/.initial=Juli, + 08/.initial=August, + 09/.initial=September, + 10/.initial=Oktober, + 11/.initial=November, + 12/.initial=Dezember, + }% + \gtrset{% + month short/.cd, + 01/.initial=Jan\dot, + 02/.initial=Feb\dot, + 03/.initial=M\"ar\dot, + 04/.initial=Apr\dot, + 05/.initial=Mai, + 06/.initial=Jun\dot, + 07/.initial=Jul\dot, + 08/.initial=Aug\dot, + 09/.initial=Sep\dot, + 10/.initial=Okt\dot, + 11/.initial=Nov\dot, + 12/.initial=Dez\dot, + }% + \gtrset{% + calendar text for=AD is {}{ n.~Chr.}, + calendar text for=BC is {}{ v.~Chr.}, + calendar text for=GR is {}{\textsuperscript{greg.}}, + calendar text for=JU is {}{\textsuperscript{jul.}}, + calendar text for=caAD is {ca.~}{ n.~Chr.}, + calendar text for=caBC is {ca.~}{ v.~Chr.}, + calendar text for=ca is {ca.~}{}, + date range full={}{--}{}, + date range before={vor }{}, + date range after={nach }{}, + place text={in }{}, + }% +}, +% +language@/german-german/.style={language@=german}, +% +language@/german-austrian/.style={language@=german, + month long/01/.initial=J\"anner, + month short/01/.initial=J\"an\dot, +}, +} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlib.debug.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlib.debug.code.tex new file mode 100644 index 00000000000..97eb255285f --- /dev/null +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlib.debug.code.tex @@ -0,0 +1,475 @@ +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) +%% gtrlib.debug.code.tex: Debugger +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2014-2015 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{0.90} + +\RequirePackage{array,tabularx} +\tcbuselibrary{breakable} + +\definecolorseries{gtr@debug}{rgb}{grad}[rgb]{.95,.85,.55}{3,11,17} +\resetcolorseries[16]{gtr@debug} + +\def\gtr@debug@colorletfamily#1{% + \pgfmathsetmacro\gtr@temp@col{int(Mod(\gtr@currentfamily,16)+1)}% + \colorlet{#1}{gtr@debug!![\gtr@temp@col]}% +} + +%------------------- +% Parser Debugger +%------------------- + +\def\gtr@debug@setleveldistance#1{% + \pgfmathsetmacro#1{-(\gtrkv@debug@markerleft-\gtrkv@debug@markerright)*e^(-abs(\number\gtr@c@level)/4)-\gtrkv@debug@markerright}% +} + +\tcbset{% + gtr@debug@box/.style={enhanced,beforeafter skip=0pt,flushleft upper, + boxrule=0.25mm,leftrule=5mm,colframe=gtr@debug@color, + arc=5mm,boxsep=0pt,top=1mm,bottom=1mm}, + debug marker left/.store in=\gtrkv@debug@markerleft, + debug marker right/.store in=\gtrkv@debug@markerright, + debug marker left=1.3cm, + debug marker right=0.3cm, +} + +\def\gtr@debug@person@content#1#2#3#4{% + \gtr@debug@colorletfamily{gtr@debug@color}% + \begin{tcolorbox}[gtr@debug@box,sharp corners=west, + interior style={top color=gtr@debug@color!30!white,bottom color=gray!10!white}, + overlay={\node[fill=gtr@debug@color!10!white,draw=black] at ([xshift=2.5mm]frame.west) {\small #1};}] + #2: Individual~\gtr@currentperson, + Family~\gtr@currentfamily, + Level~\number\gtr@c@level% + \ifblank{#3}{}{\par Options: {\ttfamily\detokenize{#3}}}% + \par Content: {\ttfamily\detokenize{#4}}% + \end{tcolorbox}% +} + +\def\gtr@debug@family@begin#1#2{% + \gtr@debug@colorletfamily{gtr@debug@color}% + \begin{tcolorbox}[gtr@debug@box,rightrule=5mm,sharp corners, + colback=gtr@debug@color!30!white, + overlay={% + \gtr@debug@setleveldistance{\gtr@temp}% + \path[draw=gtr@debug@color,very thick,->] (frame.west) -- ++(\gtr@temp pt,0) -- ++(0,-0.5); + }]% + Start: #1 Family~\gtr@currentfamily, Level~\number\gtr@c@level + \ifblank{#2}{}{\par Options: {\ttfamily\detokenize{#2}}}% + \end{tcolorbox}% +} + +\def\gtr@debug@family@end#1{% + \gtr@debug@colorletfamily{gtr@debug@color}% + \begin{tcolorbox}[gtr@debug@box,rightrule=5mm,sharp corners, + colback=gtr@debug@color!30!white, + overlay={% + \gtr@debug@setleveldistance{\gtr@temp}% + \path[draw=gtr@debug@color,very thick,->] (frame.west) -- ++(\gtr@temp pt,0) -- ++(0,0.5); + }]% + End: #1 Family~\gtr@currentfamily, Level~\number\gtr@c@level + \end{tcolorbox}% +} + +\newcommand{\gtrparserdebug}[2][]{% + \begingroup% + \parskip0pt% + % + \let\gtr@org@@parse@err=\gtr@parse@err% + \let\gtr@org@@parse@error=\gtr@parse@error% + \let\gtr@org@@parse@error@token=\gtr@parse@error@token% + \def\gtr@parse@err{% + \fbox{\textbf{Parser error}}% + \gtr@org@@parse@err}% + \long\def\gtr@parse@error##1{% + \fbox{\textbf{Parser: undefined ##1}}% + \gtr@org@@parse@error{##1}}% + \long\def\gtr@parse@error@token{% + \fbox{\textbf{Parser: unfeasible token '\@gtr@token'}}% + \gtr@org@@parse@error@token}% + % + \def\gtr@proc@@parent@begin##1{\gtr@debug@family@begin{Parent}{##1}}% + \def\gtr@proc@@child@begin##1{\gtr@debug@family@begin{Child}{##1}}% + \def\gtr@proc@@union@begin##1{\gtr@debug@family@begin{Union}{##1}}% + \def\gtr@proc@@sandclock@begin##1{\gtr@debug@family@begin{Sandclock}{##1}}% + % + \def\gtr@proc@@parent@end{\gtr@debug@family@end{Parent}}% + \def\gtr@proc@@child@end{\gtr@debug@family@end{Child}}% + \def\gtr@proc@@union@end{\gtr@debug@family@end{Union}}% + \def\gtr@proc@@sandclock@end{\gtr@debug@family@end{Sandclock}}% + % + \long\def\gtr@proc@@parent@g@content##1##2{\gtr@debug@person@content{g}{Child}{##1}{##2}}% + \long\def\gtr@proc@@child@g@content##1##2{\gtr@debug@person@content{g}{Parent}{##1}{##2}}% + \long\def\gtr@proc@@p@content##1##2{\gtr@debug@person@content{p}{Parent}{##1}{##2}}% + \long\def\gtr@proc@@c@content##1##2{\gtr@debug@person@content{c}{Child}{##1}{##2}}% + \long\def\gtr@trav@@add@node##1##2##3{##3{##1}{##2}}% + % + \gtrset{% + ignore/true/.code={}, + } + % + \def\gtr@positioning{}% + % + \colorlet{gtr@debug@color}{black!75!white}% + \begin{tcolorbox}[gtr@debug@box,before skip=\medskipamount, + sharp corners,toprule=1mm,rightrule=5mm] + Genealogytree Parser Debugger + \ifblank{#1}{}{\par Graph Options: {\ttfamily\detokenize{#1}}}% + \end{tcolorbox}% + \gtr@reset@after% + \gtr@parsegraph[#1]{#2}% + \begin{tcolorbox}[ + gtr@debug@box,after skip=\medskipamount,sharp corners,colframe=black!75!white, + bottomrule=1mm,rightrule=5mm] + End of Genealogytree Parser Debugger + \end{tcolorbox}% + \endgroup% +} + +\newcommand{\gtrparserdebuginput}[2][]{% + \gtrparserdebug[#1]{input{#2}}} + +%------------------- +% Processor Debugger +%------------------- + +\def\gtr@debug@textnone{\textsf{$\langle$none$\rangle$}} + +\def\gtr@debug@person@tab#1#2{% + #1 &% + \ifcsname gtr@per@\gtr@currentperson @#1\endcsname% + \csuse{gtr@per@\gtr@currentperson @#1}% + \else% + \gtr@debug@textnone% + \fi% + \\% +} + +\def\gtr@debug@person@tabopt#1#2{% + #1 &% + \letcs\gtr@temp{gtr@per@\gtr@currentperson @#1}% + \ifdefvoid{\gtr@temp}{\gtr@debug@textnone}{% + \ttfamily\expandafter\detokenize\expandafter{\gtr@temp}}% + \\% +} + + +\def\gtr@debug@family@tab#1#2{% + #1 &% + \ifcsname gtr@fam@\gtr@currentfamily @#1\endcsname% + \csuse{gtr@fam@\gtr@currentfamily @#1}% + \else% + \gtr@debug@textnone% + \fi% + \\% +} + +\def\gtr@debug@family@tablist#1#2{% + #1 &% + \ifcsname gtr@fam@\gtr@currentfamily @#1\endcsname% + \def\dodo##1{, ##1}% + \def\do##1{##1\let\do\dodo}% + \dolistcsloop{gtr@fam@\gtr@currentfamily @#1}% + \else% + \gtr@debug@textnone% + \fi% + \\% +} + +\def\gtr@debug@family@tabopt#1#2{% + #1 &% + \letcs\gtr@temp{gtr@fam@\gtr@currentfamily @#1}% + \ifdefvoid{\gtr@temp}{\gtr@debug@textnone}{% + \ttfamily\expandafter\detokenize\expandafter{\gtr@temp}}% + \\% +} + +\def\gtr@debug@person#1{% + \gtr@set@currentperson{#1}% + \begin{tcolorbox}[enhanced,beforeafter skip=3pt,flushleft upper, + size=small,sharp corners,fontupper=\small, + colframe=gtr@debug@color,colback=gtr@debug@color!5, + colbacktitle=gtr@debug@color!20, + coltitle=black,fonttitle=\bfseries, + title={Person~\gtr@currentperson}, + sidebyside,lower separated=false,sidebyside gap=1mm, + code={\ifcsname gtr@per@\gtr@currentperson @box\endcsname% + \tcbset{righthand width=\wd\csuse{gtr@per@\gtr@currentperson @box}}\fi}] + \begin{tabularx}{\linewidth}{@{}>{\ttfamily}r@{: }X>{\itshape}X@{}} + \gtr@debug@person@tabopt{id}{identifier (also node alias)}% + \gtr@debug@person@tab{fam}{enclosing family}% + \gtr@debug@person@tab{chiof}{child of family}% + \gtr@debug@person@tab{parof}{parent of family}% + \gtr@debug@person@tab{x}{$x$ anchor}% + \gtr@debug@person@tab{y}{$y$ anchor}% + \gtr@debug@person@tab{dim}{width (or height)}% + \gtr@debug@person@tab{cwest@val}{west contour value}% + \gtr@debug@person@tab{cwest@next}{west contour successor}% + \gtr@debug@person@tab{cwest@thread}{west contour thread}% + \gtr@debug@person@tab{cwest@tgap}{west contour thread gap}% + \gtr@debug@person@tab{ceast@val}{east contour value}% + \gtr@debug@person@tab{ceast@next}{east contour successor}% + \gtr@debug@person@tab{ceast@thread}{east contour thread}% + \gtr@debug@person@tab{ceast@tgap}{east contour thread gap}% + \end{tabularx}% + \tcblower + \ifcsname gtr@per@\gtr@currentperson @box\endcsname% + \copy\csuse{gtr@per@\gtr@currentperson @box}% + \else\gtr@debug@textnone\fi% + \end{tcolorbox}% +} + + +\def\gtr@debug@family#1{% + \gtr@set@currentfamily{#1}% + \gtr@debug@colorletfamily{gtr@debug@color}% + \begin{tcolorbox}[enhanced,breakable,beforeafter skip=6pt,flushleft upper, + colframe=gtr@debug@color,colback=gtr@debug@color!15,fontupper=\small, + colbacktitle=gtr@debug@color!30, + coltitle=black,fonttitle=\bfseries, + title={Family~\gtr@currentfamily}, + pad at break*=1mm ] + \begin{tabularx}{\linewidth}{@{}>{\ttfamily}r@{: }X>{\itshape}X@{}} + \gtr@debug@family@tab{type}{type of family}% + \gtr@debug@family@tabopt{id}{identifier}% + \gtr@debug@family@tab{fam}{enclosing family}% + \gtr@debug@family@tab{offset}{$x$ (or $y$) offset relative to enclosing family}% + \gtr@debug@family@tab{pos}{$y$ (or $x$) absolute position}% + \gtr@debug@family@tab{cwest@anchor}{west contour starting node}% + \gtr@debug@family@tab{ceast@anchor}{east contour starting node}% + \gtr@debug@family@tab{g}{$g$-node of the family}% + \gtr@debug@family@tablist{par}{parent nodes}% + \gtr@debug@family@tablist{chi}{child nodes}% + \gtr@debug@family@tablist{patpar}{patchwork parent nodes}% + \gtr@debug@family@tablist{patchi}{patchwork child nodes}% + \gtr@debug@family@tablist{union}{further partner families}% + \gtr@debug@family@tab{ps}{pivot shift length (parents vs childs)}% + \gtr@debug@family@tab{x}{$x$ anchor}% + \gtr@debug@family@tab{y}{$y$ anchor}% + \gtr@debug@family@tab{frac}{line positioning fraction}% + \gtr@debug@family@tabopt{opt@family}{options for the family}% + \gtr@debug@family@tabopt{opt@subtree}{options for the subtree}% + \end{tabularx}% + \ifcsname gtr@fam@\gtr@currentfamily @par\endcsname% + \tcbsubtitle{Parents of Family~\gtr@currentfamily}% + \let\do\gtr@debug@person% + \dolistcsloop{gtr@fam@\gtr@currentfamily @par}% + \fi% + \ifcsname gtr@fam@\gtr@currentfamily @chi\endcsname% + \tcbsubtitle{Childs of Family~\gtr@currentfamily}% + \let\do\gtr@debug@person% + \dolistcsloop{gtr@fam@\gtr@currentfamily @chi}% + \fi% + \end{tcolorbox}% +} + +\def\gtr@debug@family@loop#1{% + \ifnum#1<\numexpr\gtr@num@fam@last+1\relax% + \gtr@debug@family{#1}% + \expandafter\gtr@debug@family@loop\expandafter{\number\numexpr#1+1\expandafter}% + \fi% +} + + +\newcommand{\gtrprocessordebug}[2][]{% + \begingroup% + \gtrset{% + ignore/true/.code={}, + } + \begin{tcolorbox}[colframe=black!75!white,colback=yellow!10, + beforeafter skip=\medskipamount,flushleft upper, + sharp corners=south] + \textbf{Genealogytree Processor Debugger} + \ifblank{#1}{}{\par Graph Options: {\ttfamily\detokenize{#1}}}% + \end{tcolorbox}% + % + \gtr@reset@after% + \gtr@parsegraph[#1]{#2}% + \gtr@debug@family@loop{\gtr@num@fam@first}% + % + \begin{tcolorbox}[ + colframe=black!75!white,colback=yellow!10, + beforeafter skip=\medskipamount,flushleft upper, + sharp corners=north] + \textbf{End of Genealogytree Processor Debugger} + \end{tcolorbox}% + \endgroup% +} + + +\newcommand{\gtrprocessordebuginput}[2][]{% + \gtrprocessordebug[#1]{input{#2}}} + + +%------------------- +% Graphical Debugger +%------------------- + +\def\gtr@debug@contour#1#2#3#4{% + \path[gtr@debug@tcb@options] \pgfextra{% + \edef\gtr@currentperson{#1}% + \tcb@gettikzxy{(p@\gtr@currentperson .#3)}{\gtr@x}{\gtr@y}% + \pgfpathmoveto{\pgfqpoint{\gtr@x}{\gtr@y}}% + \tcb@gettikzxy{(p@\gtr@currentperson .#4)}{\gtr@x}{\gtr@y}% + \pgfpathlineto{\pgfqpoint{\gtr@x}{\gtr@y}}% + \loop% + \ifcsdef{gtr@per@\gtr@currentperson @c#2@next}{% + \letcs\gtr@currentperson{gtr@per@\gtr@currentperson @c#2@next}% + }{% + \letcs\gtr@currentperson{gtr@per@\gtr@currentperson @c#2@thread}% + }% + \ifdefined\gtr@currentperson% + \tcb@gettikzxy{(p@\gtr@currentperson .#3)}{\gtr@x}{\gtr@y}% + \pgfpathlineto{\pgfqpoint{\gtr@x}{\gtr@y}}% + \tcb@gettikzxy{(p@\gtr@currentperson .#4)}{\gtr@x}{\gtr@y}% + \pgfpathlineto{\pgfqpoint{\gtr@x}{\gtr@y}}% + \repeat% + };% +} + +\def\gtr@debug@contour@west@up#1{\gtr@debug@contour{#1}{west}{south west}{north west}} +\def\gtr@debug@contour@west@down#1{\gtr@debug@contour{#1}{west}{north west}{south west}} +\def\gtr@debug@contour@west@left#1{\gtr@debug@contour{#1}{west}{north east}{north west}} +\def\gtr@debug@contour@west@right#1{\gtr@debug@contour{#1}{west}{north west}{north east}} + +\def\gtr@debug@contour@east@up#1{\gtr@debug@contour{#1}{east}{south east}{north east}} +\def\gtr@debug@contour@east@down#1{\gtr@debug@contour{#1}{east}{north east}{south east}} +\def\gtr@debug@contour@east@left#1{\gtr@debug@contour{#1}{east}{south east}{south west}} +\def\gtr@debug@contour@east@right#1{\gtr@debug@contour{#1}{east}{south west}{south east}} + +\newif\ifgtr@debug@west +\newif\ifgtr@debug@east + +\gtrset{debug/.cd, + family number/.store in=\gtrkv@debug@fam, + family id/.code={\gtr@getFamNumForId{#1}\let\gtrkv@debug@fam\gtr@tmp@num}, + contour/.is choice, + contour/west/.code={\gtr@debug@westtrue\gtr@debug@eastfalse}, + contour/east/.code={\gtr@debug@westfalse\gtr@debug@easttrue}, + contour/both/.code={\gtr@debug@westtrue\gtr@debug@easttrue}, + contour/none/.code={\gtr@debug@westfalse\gtr@debug@eastfalse}, + tikz@options/.style={/tikz/gtr@debug@tcb@options/.style={#1}}, +} + +\def\gtr@debug@contour@par@down{% + \ifgtr@debug@west\gtr@debug@contour@west@up{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@up{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi% +} + +\def\gtr@debug@contour@par@up{% + \ifgtr@debug@west\gtr@debug@contour@west@down{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@down{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi% +} + +\def\gtr@debug@contour@par@left{% + \ifgtr@debug@west\gtr@debug@contour@west@right{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@right{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi% +} + +\def\gtr@debug@contour@par@right{% + \ifgtr@debug@west\gtr@debug@contour@west@left{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@left{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi% +} + +\def\gtr@debug@contour@chi@down{% + \ifgtr@debug@west\gtr@debug@contour@west@down{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@down{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi% +} + +\def\gtr@debug@contour@chi@up{% + \ifgtr@debug@west\gtr@debug@contour@west@up{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@up{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi% +} + +\def\gtr@debug@contour@chi@left{% + \ifgtr@debug@west\gtr@debug@contour@west@left{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@left{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi% +} + +\def\gtr@debug@contour@chi@right{% + \ifgtr@debug@west\gtr@debug@contour@west@right{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@right{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi% +} + +\def\gtr@debug@contour@san@down{% + \ifgtr@debug@west\gtr@debug@contour@west@up{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@panchor}}\gtr@debug@contour@west@down{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@canchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@up{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@panchor}}\gtr@debug@contour@east@down{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@canchor}}\fi% +} + +\def\gtr@debug@contour@san@up{% + \ifgtr@debug@west\gtr@debug@contour@west@down{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@panchor}}\gtr@debug@contour@west@up{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@canchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@down{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@panchor}}\gtr@debug@contour@east@up{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@canchor}}\fi% +} + +\def\gtr@debug@contour@san@left{% + \ifgtr@debug@west\gtr@debug@contour@west@right{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@panchor}}\gtr@debug@contour@west@left{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@canchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@right{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@panchor}}\gtr@debug@contour@east@left{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@canchor}}\fi% +} + +\def\gtr@debug@contour@san@right{% + \ifgtr@debug@west\gtr@debug@contour@west@left{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@panchor}}\gtr@debug@contour@west@right{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@canchor}}\fi% + \ifgtr@debug@east\gtr@debug@contour@east@left{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@panchor}}\gtr@debug@contour@east@right{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@canchor}}\fi% +} + +% no contour for union + +\newcommand{\gtrdebugdrawcontour}[2]{% + \gtrset{debug/.cd,family number=1,contour=both,tikz@options={draw,#2},#1}% + \csuse{gtr@debug@contour@\csuse{gtr@fam@\gtrkv@debug@fam @type}@\gtrkv@timeflow}% +} + +\def\gtr@show@family@id#1{% + \node[fill=white,fill opacity=0.8,outer sep=0pt,inner sep=2pt] at (f@#1) + {\ifcsvoid{gtr@fam@#1@id}{\def\gtr@temp{???}}{\letcs\gtr@temp{gtr@fam@#1@id}}% + \ttfamily\expandafter\detokenize\expandafter{\gtr@temp}}; +} + +\def\gtr@show@family@number#1{% + \node[fill=white,fill opacity=0.8,outer sep=0pt,inner sep=2pt] at (f@#1) + {\ttfamily\expandafter\detokenize\expandafter{#1}}; +} + +\gtrset{ + show/.style={box={finish={% + \node[fill=white,fill opacity=0.8,outer sep=0pt,inner sep=2pt] at (frame.center) {% + \setbox0=\hbox{\resizebox{\the\dimexpr\tcb@width-4pt}{!}{\bfseries#1}}% + \ifdim\dimexpr\ht0+\dp0>\dimexpr\tcb@height-4pt\relax% + \resizebox*{!}{\the\dimexpr\tcb@height-4pt}{\usebox0}% + \else% + \usebox0% + \fi% + };}}}, + show@family@number/.style={after tree={% + \begin{scope}% + \ifgtr@timeflow@vertical\else\tikzset{every node/.style={rotate=90,transform shape}}\fi% + \gtr@forall@families{\gtr@show@family@number}% + \end{scope}% + }}, + show@family@id/.style={after tree={% + \begin{scope}% + \ifgtr@timeflow@vertical\else\tikzset{every node/.style={rotate=90,transform shape}}\fi% + \gtr@forall@families{\gtr@show@family@id}% + \end{scope}% + }}, + show number/.style={show={\ttfamily\gtr@currentperson},show@family@number}, + show family/.style={show={\ttfamily\gtr@currentfamily},show@family@number}, + show id/.style={show={\ttfamily\gtrnodeid},show@family@id% + }, + show level/.style={show={\ttfamily\number\gtr@c@level}}, + show type/.style={show={\ttfamily\strut\gtrnodetype}}, +} diff --git a/Master/texmf-dist/tex/latex/genealogytree/gtrlib.templates.code.tex b/Master/texmf-dist/tex/latex/genealogytree/gtrlib.templates.code.tex new file mode 100644 index 00000000000..5d6ea8bc4a6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/genealogytree/gtrlib.templates.code.tex @@ -0,0 +1,419 @@ +%% The LaTeX package genealogytree - version 0.90 (2015/05/22) +%% gtrlib.templates.code.tex: Templates +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2013-2015 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{0.90} + +% Templates + +\gtrset{ + template/.is choice, +% + template/formal graph/.style={ + processing=tcbox*, + level distance=5mm, + level size=8mm, + node size=8mm, + box clear, + box={enhanced,size=fbox,boxsep=0.15mm,boxrule=0.5mm,arc=1mm,valign=center, + before upper={\strut$\displaystyle},after upper={$}, + colback=gtr_Peach_Back,colframe=gtr_Peach_Frame + } + }, +% + template/signpost/.style={ + processing=fit, + level distance=1cm, + level size=1.5cm, + node size from=2cm to 4cm, + box clear, + box={enhanced,fit basedim=8pt, + halign=center,valign=center, + before upper={\parskip 0.15\tcbfitdim plus 0pt minus 0pt}, + drop fuzzy shadow + } + }, +% + template/symbol nodes/.style={ + processing=tcbox*, + level distance=5mm, + level size=5mm, + node size=5mm, + box clear, + box={enhanced,size=fbox,boxsep=0mm,boxrule=0.25mm,valign=center,fontupper=\fontsize{4.7mm}{4.7mm}\selectfont}, + content interpreter code={% + \gtrset{box={temp@late/symopt/##1}}% + \def\gtrBoxContent{\centering\gtrset{sex@/##1}}% + }, + edges={anchoring=center,background={white,line width=0.6mm},foreground={green!25!black,line width=0.3mm}}, + }, +% + template/tiny boxes/.style={ + processing=tcbox*, + level distance=5mm, + level size=3mm, + node size=3mm, + box clear, + box={enhanced,size=fbox,boxsep=0mm,boxrule=0.15mm,colframe=black,colback=black!10}, + deletion content interpreter, + edges={perpendicular,anchoring=center,background={white,line width=0.5mm},foreground={black,line width=0.2mm}}, + }, +% + template/tiny circles/.style={ + processing=tcbox*, + level distance=5mm, + level size=3mm, + node size=3mm, + child distance=2mm, + parent distance=2mm, + further distance=2mm, + box clear, + box={enhanced,size=fbox,boxsep=0mm,boxrule=0.15mm,circular arc,colframe=black,colback=black!50}, + deletion content interpreter, + edges={mesh,anchoring=center,background={white,line width=0.5mm},foreground={black,line width=0.2mm}}, + }, +% + template/directory/.style={ + processing=tcbox*, + content interpreter content={\detokenize{##1}}, + timeflow=right, + level distance=3mm, + level size=3cm, + node size=6mm, + box clear, + box={enhanced, + tcbox width=minimum left, + size=fbox, + colframe=black!20, + colback=yellow!20, + boxrule=0.3mm, + valign=center, + fontupper=\ttfamily, + before upper=\strut, + code={\ifdefstring{\gtrnodetype}{g}{\tcbset{after upper={/}}}{}}, + }, + edges={perpendicular, + foreground={black,line width=0.3mm}, + background={white,line width=0.8mm} + }, + }, +% + database@malefemale/.style={ + tcbset={male/.style={colframe=blue!50!black,colback=blue!50!yellow!5,arc is angular,drop fuzzy shadow=blue!25!black!30}, + female/.style={colframe=red!50!black,colback=red!50!yellow!5,drop fuzzy shadow=red!25!black!30}, + neuter/.style={colframe=black!75,colback=yellow!5,drop fuzzy shadow=black!30}}, + }, +% + template/database pole/.style={ + processing=database, + database format=full marriage above, + level distance=6mm, + level size=4.5cm, + node size=2cm, + name font=\bfseries, + surn code=##1, + database@malefemale, + box clear, + box={enhanced,boxrule=0.3mm, + fit basedim=7pt, + halign=flush center, + fontupper=\sffamily, + before upper={\parskip 0.15\tcbfitdim plus 0pt minus 0pt}, + segmentation style={solid,shorten >=1mm,shorten <=1mm}, + \gtrDBsex, + }, + edges={perpendicular, + foreground={black,line width=0.3mm}, + background={white,line width=0.8mm} + }, + }, +% + template/database portrait/.style={ + processing=database, + database format=short no marriage, + level distance=6mm, + level size=4cm, + node size=2cm, + name font=\bfseries, + surn code=##1, + event format=prefix date, + database@malefemale, + box clear, + box={enhanced,boxrule=0.3mm, + top=25mm+0.2\tcbfitdim, + fit basedim=7pt, + halign=flush center, + valign=center, + fontupper=\sffamily, + before upper={\parskip 0.15\tcbfitdim plus 0pt minus 0pt}, + \gtrDBsex, + underlay={\begin{tcbclipinterior}% + \gtrifimagedefined{\path[fill overzoom image=\gtrDBimage] + ([yshift=-25mm]interior.north west) rectangle (interior.north east);}{% + \path[fill overzoom picture=\gtrDrawSymbolicPortrait] + ([yshift=-25mm]interior.north west) rectangle (interior.north east); + }% + \end{tcbclipinterior}% + }, + }, + edges={perpendicular, + foreground={black,line width=0.3mm}, + background={white,line width=0.8mm} + }, + }, +% + template/database traditional/.style={ + timeflow=down, + processing=database, + database format=short no marriage, + level distance=6mm, + level size=2cm, + node size=2cm, + event format=prefix date, + name font=\bfseries, + surn code={##1}, + tcbset={gtrnodealign/.code={% + \gtrifleafchild{\tcbset{valign=top}}{% + \gtrifleafparent{\tcbset{valign=bottom}}{\tcbset{valign=center}}% + }% + }}, + 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 + }, + edges={rounded=1mm, + foreground={black,line width=0.3mm}, + background={white,line width=0.8mm} + }, + }, +% + ahnentafel@malefemale/.style={ + tcbset={male/.style={colframe=blue!50!black,colback=blue!50!yellow!5,arc is angular}, + female/.style={colframe=red!50!black,colback=red!50!yellow!5}, + neuter/.style={colframe=black!75,colback=yellow!5}}, + }, +% + template/ahnentafel 3/.style={ + timeflow=left, + processing=database, + database format=medium, + level distance=2mm, + level size=55mm, + node size=26mm, + parent distance=0mm, + further distance=0mm, + list separators hang, + ahnentafel@malefemale, + box={\gtrDBsex,before upper={\parskip=0.1\tcbfitdim},halign=flush left,}, + edges={mesh,anchoring=center,no background,foreground={line width=10mm,green!50!black!50}}, + level/.code={\ifnum\numexpr##1>2\relax% + \gtrset{% + parent distance=1mm, + further distance=0.5mm, + node box={boxrule=0.3mm,arc=0.6mm,valign=center,fit basedim=9pt}, + family edges={foreground={line width=8mm,green!50!black!50}}, + }% + \fi}, + level 2/.style={ + level distance=3mm, + level size=36mm, + node size=40mm, + parent distance=2mm, + further distance=1mm, + node box={boxrule=0.4mm,arc=0.8mm,fit basedim=9pt} + }, + level 1/.style={ + level size=37mm, + node size=50mm, + parent distance=4mm, + further distance=2mm, + node box={fit basedim=9pt} + }, + level 0/.style={ + level size=42mm, + node size=50mm, + node box={fit basedim=10pt} + }, + }, +% + template/ahnentafel 4/.style={ + timeflow=left, + processing=database, + database format=medium, + level distance=2mm, + level size=46mm, + node size=16mm, + parent distance=0mm, + further distance=0mm, + list separators hang, + ahnentafel@malefemale, + box={\gtrDBsex,before upper={\parskip=0.1\tcbfitdim},halign=flush left,}, + edges={mesh,anchoring=center,no background,foreground={line width=10mm,green!50!black!50}}, + level/.code={\ifnum\numexpr##1>3\relax% + \gtrset{% + parent distance=0.25mm, + further distance=0.25mm, + node box={boxrule=0.2mm,arc=0.4mm,valign=center,fit basedim=8pt}, + family edges={foreground={line width=7mm,green!50!black!50}}, + }% + \fi}, + level 3/.style={ + level size=38mm, + node size=26mm, + parent distance=1mm, + further distance=0.5mm, + node box={boxrule=0.3mm,arc=0.6mm,valign=center,fit basedim=8pt}, + family edges={foreground={line width=8mm,green!50!black!50}}, + }, + level 2/.style={ + level distance=3mm, + level size=36mm, + node size=40mm, + parent distance=2mm, + further distance=1mm, + node box={boxrule=0.4mm,arc=0.8mm,fit basedim=9pt} + }, + level 1/.style={ + level distance=-25mm, + level size=37mm, + node size=50mm, + parent distance=58mm, + further distance=2mm, + node box={fit basedim=9pt} + }, + level 0/.style={ + level size=42mm, + node size=50mm, + node box={fit basedim=10pt} + }, + }, +% + template/ahnentafel 5/.style={ + timeflow=left, + processing=database, + database format=medium, + level distance=2mm, + level size=34mm, + node size=8.2mm, + parent distance=0mm, + further distance=0mm, + list separators hang, + ahnentafel@malefemale, + box={\gtrDBsex,before upper={\parskip=0.1\tcbfitdim},halign=flush left,}, + edges={mesh,anchoring=center,no background,foreground={line width=5mm,green!50!black!50}}, + level/.code={\ifnum\numexpr##1>4\relax% + \gtrset{% + node={database format=short,list separators={, }{, }{.}{}}, + node box={size=fbox,boxsep=0.5mm,boxrule=0.1mm,arc=0.2mm, + valign=center,fit basedim=6pt}, + family edges={foreground={line width=5mm,green!50!black!50}}, + }% + \fi}, + level 4/.style={ + level size=34mm, + node size=16mm, + parent distance=0.25mm, + further distance=0.25mm, + node={list separators={\par}{, }{.\par}{\par}}, + node box={boxrule=0.2mm,arc=0.4mm,valign=center,fit basedim=7pt}, + family edges={foreground={line width=7mm,green!50!black!50}}, + }, + level 3/.style={ + level size=30mm, + node size=26mm, + parent distance=1mm, + further distance=0.5mm, + node box={boxrule=0.3mm,arc=0.6mm,fit basedim=7pt}, + family edges={foreground={line width=8mm,green!50!black!50}}, + }, + level 2/.style={ + level distance=3mm, + level size=30mm, + node size=40mm, + parent distance=2mm, + further distance=1mm, + node box={boxrule=0.4mm,arc=0.8mm,fit basedim=8pt}, + family edges={foreground={line width=10mm,green!50!black!50}}, + }, + level 1/.style={ + level distance=-25mm, + level size=35mm, + node size=50mm, + parent distance=58mm, + further distance=2mm, + node box={fit basedim=9pt}, + family edges={foreground={line width=10mm,green!50!black!50}}, + }, + level 0/.style={ + level size=40mm, + node size=50mm, + node box={fit basedim=10pt}, + family edges={foreground={line width=10mm,green!50!black!50}}, + }, + }, +% +} + + +% Auxiliary +\tcbset{ + temp@late/symopt/m/.style={colframe=blue!50!black,colback=blue!8,arc=0.15mm}, + temp@late/symopt/male/.style={colframe=blue!50!black,colback=blue!8,arc=0.15mm}, + temp@late/symopt/f/.style={colframe=red!50!black,colback=red!8,circular arc}, + temp@late/symopt/female/.style={colframe=red!50!black,colback=red!8,circular arc}, + temp@late/symopt/.unknown/.style={colframe=black!75,colback=black!5,arc=1.2mm} +} + +\csdef{gtrparent1}{p{male} p{female}} +\csdef{gtrparent2}{parent{g{male} p{male} p{female}} parent{g{female} p{male} p{female}}} +\csdef{gtrparent3}{parent{g{male} insert{gtrparent2}} parent{g{female} insert{gtrparent2}}} +\csdef{gtrparent4}{parent{g{male} insert{gtrparent3}} parent{g{female} insert{gtrparent3}}} +\csdef{gtrparent5}{parent{g{male} insert{gtrparent4}} parent{g{female} insert{gtrparent4}}} +\csdef{gtrparent6}{parent{g{male} insert{gtrparent5}} parent{g{female} insert{gtrparent5}}} +\csdef{gtrparent7}{parent{g{male} insert{gtrparent6}} parent{g{female} insert{gtrparent6}}} + +\def\gtrDrawSymbolicPortrait{% +\path[top color=tcbcol@frame!25!tcbcol@back,bottom color=tcbcol@frame!25!tcbcol@back, + middle color=tcbcol@back] + (-1.75,0) rectangle (1.75,4.5); + \path[fill=tcbcol@frame!75!tcbcol@back] (0,2.5) circle (1cm); + \path[fill=tcbcol@frame!75!tcbcol@back] (1.5,0) arc + [start angle=0, end angle=180, x radius=15mm, y radius=12mm] -- cycle; +} + +% Colors + +\definecolor{gtr_Peach_Back}{rgb}{1.000000, 0.917647, 0.788235} +\definecolor{gtr_Peach_Frame}{rgb}{0.611765, 0.160784, 0.015686} + +\definecolor{gtr_Yellow_Back}{rgb}{1.000000, 1.000000, 0.862745} +\definecolor{gtr_Yellow_Frame}{rgb}{0.764706, 0.678431, 0.407843} + +\definecolor{gtr_Blue_1}{rgb}{0.090196,0.211765,0.364706} +\definecolor{gtr_Blue_2}{rgb}{0.211765,0.372549,0.568627} +\definecolor{gtr_Blue_3}{rgb}{0.309804,0.505882,0.741176} +\definecolor{gtr_Blue_4}{rgb}{0.584314,0.701961,0.843137} +\definecolor{gtr_Blue_5}{rgb}{0.721569,0.800000,0.894118} +\definecolor{gtr_Blue_6}{rgb}{0.858824,0.898039,0.945098} + +\definecolor{gtr_Bright_Red}{rgb}{1.000000,0.294118,0.062745} |