Debian Codegraph @

texmf-dist/tex/latex/genealogytree/gtrlib.debug.code.tex

raw
1 %% The LaTeX package genealogytree - version 2.4.0 (2026/05/06)
2 %% gtrlib.debug.code.tex: Debugger
3 %%
4 %% -------------------------------------------------------------------------------------------
5 %% Copyright (c) 2013-2026 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
6 %% -------------------------------------------------------------------------------------------
7 %%
8 %% This work may be distributed and/or modified under the
9 %% conditions of the LaTeX Project Public License, either version 1.3
10 %% of this license or (at your option) any later version.
11 %% The latest version of this license is in
12 %% http://www.latex-project.org/lppl.txt
13 %% and version 1.3 or later is part of all distributions of LaTeX
14 %% version 2005/12/01 or later.
15 %%
16 %% This work has the LPPL maintenance status `author-maintained'.
17 %%
18 %% This work consists of all files listed in README
19 %%
20 \gtr@set@library@version{2.4.0}
21
22 \RequirePackage{array,tabularx}
23 \tcbuselibrary{breakable}
24
25 \definecolorseries{gtr@debug}{rgb}{grad}[rgb]{.95,.85,.55}{3,11,17}
26 \resetcolorseries[16]{gtr@debug}
27
28 \def\gtr@debug@colorletfamily#1{%
29 \pgfmathsetmacro\gtr@temp@col{int(Mod(\gtr@currentfamily,16)+1)}%
30 \colorlet{#1}{gtr@debug!![\gtr@temp@col]}%
31 }
32
33 %-------------------
34 % Parser Debugger
35 %-------------------
36
37 \def\gtr@debug@setleveldistance#1{%
38 \pgfmathsetmacro#1{-(\gtrkv@debug@markerleft-\gtrkv@debug@markerright)*e^(-abs(\number\gtr@c@level)/4)-\gtrkv@debug@markerright}%
39 }
40
41 \tcbset{%
42 gtr@debug@box/.style={enhanced,beforeafter skip=0pt,flushleft upper,
43 boxrule=0.25mm,leftrule=5mm,colframe=gtr@debug@color,
44 arc=5mm,boxsep=0pt,top=1mm,bottom=1mm},
45 debug marker left/.store in=\gtrkv@debug@markerleft,
46 debug marker right/.store in=\gtrkv@debug@markerright,
47 debug marker left=1.3cm,
48 debug marker right=0.3cm,
49 }
50
51 \def\gtr@debug@person@content#1#2#3#4{%
52 \gtr@debug@colorletfamily{gtr@debug@color}%
53 \begin{tcolorbox}[gtr@debug@box,sharp corners=west,
54 interior style={top color=gtr@debug@color!30!white,bottom color=gray!10!white},
55 overlay={\node[fill=gtr@debug@color!10!white,draw=black] at ([xshift=2.5mm]frame.west) {\small #1};}]
56 #2: Individual~\gtr@currentperson,
57 Family~\gtr@currentfamily,
58 Level~\number\gtr@c@level%
59 \ifblank{#3}{}{\par Options: {\ttfamily\detokenize{#3}}}%
60 \par Content: {\ttfamily\detokenize{#4}}%
61 \end{tcolorbox}%
62 }
63
64 \def\gtr@debug@family@begin#1#2{%
65 \gtr@debug@colorletfamily{gtr@debug@color}%
66 \begin{tcolorbox}[gtr@debug@box,rightrule=5mm,sharp corners,
67 colback=gtr@debug@color!30!white,
68 overlay={%
69 \gtr@debug@setleveldistance{\gtr@temp}%
70 \path[draw=gtr@debug@color,very thick,->] (frame.west) -- ++(\gtr@temp pt,0) -- ++(0,-0.5);
71 }]%
72 Start: #1 Family~\gtr@currentfamily, Level~\number\gtr@c@level
73 \ifblank{#2}{}{\par Options: {\ttfamily\detokenize{#2}}}%
74 \end{tcolorbox}%
75 }
76
77 \def\gtr@debug@family@end#1{%
78 \gtr@debug@colorletfamily{gtr@debug@color}%
79 \begin{tcolorbox}[gtr@debug@box,rightrule=5mm,sharp corners,
80 colback=gtr@debug@color!30!white,
81 overlay={%
82 \gtr@debug@setleveldistance{\gtr@temp}%
83 \path[draw=gtr@debug@color,very thick,->] (frame.west) -- ++(\gtr@temp pt,0) -- ++(0,0.5);
84 }]%
85 End: #1 Family~\gtr@currentfamily, Level~\number\gtr@c@level
86 \end{tcolorbox}%
87 }
88
89 \newcommand{\gtrparserdebug}[2][]{%
90 \begingroup%
91 \parskip0pt%
92 %
93 \let\gtr@org@@parse@err=\gtr@parse@err%
94 \let\gtr@org@@parse@error=\gtr@parse@error%
95 \let\gtr@org@@parse@error@token=\gtr@parse@error@token%
96 \def\gtr@parse@err{%
97 \fbox{\textbf{Parser error}}%
98 \gtr@org@@parse@err}%
99 \long\def\gtr@parse@error##1{%
100 \fbox{\textbf{Parser: undefined ##1}}%
101 \gtr@org@@parse@error{##1}}%
102 \long\def\gtr@parse@error@token{%
103 \fbox{\textbf{Parser: unfeasible token '\@gtr@token'}}%
104 \gtr@org@@parse@error@token}%
105 %
106 \def\gtr@proc@@parent@begin##1{\gtr@debug@family@begin{Parent}{##1}}%
107 \def\gtr@proc@@child@begin##1{\gtr@debug@family@begin{Child}{##1}}%
108 \def\gtr@proc@@union@begin##1{\gtr@debug@family@begin{Union}{##1}}%
109 \def\gtr@proc@@sandclock@begin##1{\gtr@debug@family@begin{Sandclock}{##1}}%
110 %
111 \def\gtr@proc@@parent@end{\gtr@debug@family@end{Parent}}%
112 \def\gtr@proc@@child@end{\gtr@debug@family@end{Child}}%
113 \def\gtr@proc@@union@end{\gtr@debug@family@end{Union}}%
114 \def\gtr@proc@@sandclock@end{\gtr@debug@family@end{Sandclock}}%
115 %
116 \long\def\gtr@proc@@parent@g@content##1##2{\gtr@debug@person@content{g}{Child}{##1}{##2}}%
117 \long\def\gtr@proc@@child@g@content##1##2{\gtr@debug@person@content{g}{Parent}{##1}{##2}}%
118 \long\def\gtr@proc@@p@content##1##2{\gtr@debug@person@content{p}{Parent}{##1}{##2}}%
119 \long\def\gtr@proc@@c@content##1##2{\gtr@debug@person@content{c}{Child}{##1}{##2}}%
120 \long\def\gtr@trav@@add@node##1##2##3{##3{##1}{##2}}%
121 %
122 \gtrset{%
123 ignore/true/.code={},
124 }
125 %
126 \def\gtr@positioning{}%
127 %
128 \colorlet{gtr@debug@color}{black!75!white}%
129 \begin{tcolorbox}[gtr@debug@box,before skip=\medskipamount,
130 sharp corners,toprule=1mm,rightrule=5mm]
131 Genealogytree Parser Debugger
132 \ifblank{#1}{}{\par Graph Options: {\ttfamily\detokenize{#1}}}%
133 \end{tcolorbox}%
134 \gtr@reset@before@parser%
135 \gtr@parsegraph[#1]{#2}%
136 \begin{tcolorbox}[
137 gtr@debug@box,after skip=\medskipamount,sharp corners,colframe=black!75!white,
138 bottomrule=1mm,rightrule=5mm]
139 End of Genealogytree Parser Debugger
140 \end{tcolorbox}%
141 \endgroup%
142 }
143
144 \newcommand{\gtrparserdebuginput}[2][]{%
145 \gtrparserdebug[#1]{input{#2}}}
146
147 %-------------------
148 % Processor Debugger
149 %-------------------
150
151 \def\gtr@debug@textnone{\textsf{$\langle$none$\rangle$}}
152
153 \def\gtr@debug@person@tab#1#2{%
154 #1 &%
155 \ifcsname gtr@per@\gtr@currentperson @#1\endcsname%
156 \csuse{gtr@per@\gtr@currentperson @#1}%
157 \else%
158 \gtr@debug@textnone%
159 \fi%
160 &#2\\%
161 }
162
163 \def\gtr@debug@person@tabopt#1#2{%
164 #1 &%
165 \letcs\gtr@temp{gtr@per@\gtr@currentperson @#1}%
166 \ifdefvoid{\gtr@temp}{\gtr@debug@textnone}{%
167 \ttfamily\expandafter\detokenize\expandafter{\gtr@temp}}%
168 &#2\\%
169 }
170
171
172 \def\gtr@debug@family@tab#1#2{%
173 #1 &%
174 \ifcsname gtr@fam@\gtr@currentfamily @#1\endcsname%
175 \csuse{gtr@fam@\gtr@currentfamily @#1}%
176 \else%
177 \gtr@debug@textnone%
178 \fi%
179 &#2\\%
180 }
181
182 \def\gtr@debug@family@tablist#1#2{%
183 #1 &%
184 \ifcsname gtr@fam@\gtr@currentfamily @#1\endcsname%
185 \def\dodo##1{, ##1}%
186 \def\do##1{##1\let\do\dodo}%
187 \dolistcsloop{gtr@fam@\gtr@currentfamily @#1}%
188 \else%
189 \gtr@debug@textnone%
190 \fi%
191 &#2\\%
192 }
193
194 \def\gtr@debug@family@tabopt#1#2{%
195 #1 &%
196 \letcs\gtr@temp{gtr@fam@\gtr@currentfamily @#1}%
197 \ifdefvoid{\gtr@temp}{\gtr@debug@textnone}{%
198 \ttfamily\expandafter\detokenize\expandafter{\gtr@temp}}%
199 &#2\\%
200 }
201
202 \def\gtr@debug@person#1{%
203 \gtr@set@currentperson{#1}%
204 \begin{tcolorbox}[enhanced,beforeafter skip=3pt,flushleft upper,
205 size=small,sharp corners,fontupper=\small,
206 colframe=gtr@debug@color,colback=gtr@debug@color!5,
207 colbacktitle=gtr@debug@color!20,
208 coltitle=black,fonttitle=\bfseries,
209 title={Person~\gtr@currentperson},
210 sidebyside,lower separated=false,sidebyside gap=1mm,
211 code={\ifcsname gtr@per@\gtr@currentperson @box\endcsname%
212 \tcbset{righthand width=\wd\csuse{gtr@per@\gtr@currentperson @box}}\fi}]
213 \begin{tabularx}{\linewidth}{@{}>{\ttfamily}r@{: }X>{\itshape}X@{}}
214 \gtr@debug@person@tabopt{id}{identifier (also node alias)}%
215 \gtr@debug@person@tab{fam}{enclosing family}%
216 \gtr@debug@person@tab{chiof}{child of family}%
217 \gtr@debug@person@tab{parof}{parent of family}%
218 \gtr@debug@person@tab{x}{$x$ anchor}%
219 \gtr@debug@person@tab{y}{$y$ anchor}%
220 \gtr@debug@person@tab{dim}{width (or height)}%
221 \gtr@debug@person@tab{cwest@val}{west contour value}%
222 \gtr@debug@person@tab{cwest@next}{west contour successor}%
223 \gtr@debug@person@tab{cwest@thread}{west contour thread}%
224 \gtr@debug@person@tab{cwest@tgap}{west contour thread gap}%
225 \gtr@debug@person@tab{ceast@val}{east contour value}%
226 \gtr@debug@person@tab{ceast@next}{east contour successor}%
227 \gtr@debug@person@tab{ceast@thread}{east contour thread}%
228 \gtr@debug@person@tab{ceast@tgap}{east contour thread gap}%
229 \end{tabularx}%
230 \tcblower
231 \ifcsname gtr@per@\gtr@currentperson @box\endcsname%
232 \copy\csuse{gtr@per@\gtr@currentperson @box}%
233 \else\gtr@debug@textnone\fi%
234 \end{tcolorbox}%
235 }
236
237
238 \def\gtr@debug@family#1{%
239 \gtr@set@currentfamily{#1}%
240 \gtr@debug@colorletfamily{gtr@debug@color}%
241 \begin{tcolorbox}[enhanced,breakable,beforeafter skip=6pt,flushleft upper,
242 colframe=gtr@debug@color,colback=gtr@debug@color!15,fontupper=\small,
243 colbacktitle=gtr@debug@color!30,
244 coltitle=black,fonttitle=\bfseries,
245 title={Family~\gtr@currentfamily},
246 pad at break*=1mm ]
247 \begin{tabularx}{\linewidth}{@{}>{\ttfamily}r@{: }X>{\itshape}X@{}}
248 \gtr@debug@family@tab{type}{type of family}%
249 \gtr@debug@family@tabopt{id}{identifier}%
250 \gtr@debug@family@tab{fam}{enclosing family}%
251 \gtr@debug@family@tab{offset}{$x$ (or $y$) offset relative to enclosing family}%
252 \gtr@debug@family@tab{pos}{$y$ (or $x$) absolute position}%
253 \gtr@debug@family@tab{cwest@anchor}{west contour starting node}%
254 \gtr@debug@family@tab{ceast@anchor}{east contour starting node}%
255 \gtr@debug@family@tab{g}{$g$-node of the family}%
256 \gtr@debug@family@tablist{par}{parent nodes}%
257 \gtr@debug@family@tablist{chi}{child nodes}%
258 \gtr@debug@family@tablist{patpar}{patchwork parent nodes}%
259 \gtr@debug@family@tablist{patchi}{patchwork child nodes}%
260 \gtr@debug@family@tablist{union}{further partner families}%
261 \gtr@debug@family@tab{ps}{pivot shift length (parents vs childs)}%
262 \gtr@debug@family@tab{x}{$x$ anchor}%
263 \gtr@debug@family@tab{y}{$y$ anchor}%
264 \gtr@debug@family@tab{frac}{line positioning fraction}%
265 \gtr@debug@family@tabopt{opt@family}{options for the family}%
266 \gtr@debug@family@tabopt{opt@subtree}{options for the subtree}%
267 \end{tabularx}%
268 \ifcsname gtr@fam@\gtr@currentfamily @par\endcsname%
269 \tcbsubtitle{Parents of Family~\gtr@currentfamily}%
270 \let\do\gtr@debug@person%
271 \dolistcsloop{gtr@fam@\gtr@currentfamily @par}%
272 \fi%
273 \ifcsname gtr@fam@\gtr@currentfamily @chi\endcsname%
274 \tcbsubtitle{Childs of Family~\gtr@currentfamily}%
275 \let\do\gtr@debug@person%
276 \dolistcsloop{gtr@fam@\gtr@currentfamily @chi}%
277 \fi%
278 \end{tcolorbox}%
279 }
280
281 \def\gtr@debug@family@loop#1{%
282 \ifnum#1<\numexpr\gtr@num@fam@last+1\relax%
283 \gtr@debug@family{#1}%
284 \expandafter\gtr@debug@family@loop\expandafter{\number\numexpr#1+1\expandafter}%
285 \fi%
286 }
287
288
289 \newcommand{\gtrprocessordebug}[2][]{%
290 \begingroup%
291 \gtrset{%
292 ignore/true/.code={},
293 }
294 \begin{tcolorbox}[colframe=black!75!white,colback=yellow!10,
295 beforeafter skip=\medskipamount,flushleft upper,
296 sharp corners=south]
297 \textbf{Genealogytree Processor Debugger}
298 \ifblank{#1}{}{\par Graph Options: {\ttfamily\detokenize{#1}}}%
299 \end{tcolorbox}%
300 %
301 \gtr@reset@before@parser%
302 \gtr@parsegraph[#1]{#2}%
303 \gtr@debug@family@loop{\gtr@num@fam@first}%
304 %
305 \begin{tcolorbox}[
306 colframe=black!75!white,colback=yellow!10,
307 beforeafter skip=\medskipamount,flushleft upper,
308 sharp corners=north]
309 \textbf{End of Genealogytree Processor Debugger}
310 \end{tcolorbox}%
311 \endgroup%
312 }
313
314
315 \newcommand{\gtrprocessordebuginput}[2][]{%
316 \gtrprocessordebug[#1]{input{#2}}}
317
318
319 %-------------------
320 % Graphical Debugger
321 %-------------------
322
323 \def\gtr@debug@contour#1#2#3#4{%
324 \path[gtr@debug@tcb@options] \pgfextra{%
325 \edef\gtr@currentperson{#1}%
326 \tcb@gettikzxy{(p@\gtr@currentperson .#3)}{\gtr@x}{\gtr@y}%
327 \pgfpathmoveto{\pgfqpoint{\gtr@x}{\gtr@y}}%
328 \tcb@gettikzxy{(p@\gtr@currentperson .#4)}{\gtr@x}{\gtr@y}%
329 \pgfpathlineto{\pgfqpoint{\gtr@x}{\gtr@y}}%
330 \loop%
331 \ifcsdef{gtr@per@\gtr@currentperson @c#2@next}{%
332 \letcs\gtr@currentperson{gtr@per@\gtr@currentperson @c#2@next}%
333 }{%
334 \letcs\gtr@currentperson{gtr@per@\gtr@currentperson @c#2@thread}%
335 }%
336 \ifdefined\gtr@currentperson%
337 \tcb@gettikzxy{(p@\gtr@currentperson .#3)}{\gtr@x}{\gtr@y}%
338 \pgfpathlineto{\pgfqpoint{\gtr@x}{\gtr@y}}%
339 \tcb@gettikzxy{(p@\gtr@currentperson .#4)}{\gtr@x}{\gtr@y}%
340 \pgfpathlineto{\pgfqpoint{\gtr@x}{\gtr@y}}%
341 \repeat%
342 };%
343 }
344
345 \def\gtr@debug@contour@west@up#1{\gtr@debug@contour{#1}{west}{south west}{north west}}
346 \def\gtr@debug@contour@west@down#1{\gtr@debug@contour{#1}{west}{north west}{south west}}
347 \def\gtr@debug@contour@west@left#1{\gtr@debug@contour{#1}{west}{north east}{north west}}
348 \def\gtr@debug@contour@west@right#1{\gtr@debug@contour{#1}{west}{north west}{north east}}
349
350 \def\gtr@debug@contour@east@up#1{\gtr@debug@contour{#1}{east}{south east}{north east}}
351 \def\gtr@debug@contour@east@down#1{\gtr@debug@contour{#1}{east}{north east}{south east}}
352 \def\gtr@debug@contour@east@left#1{\gtr@debug@contour{#1}{east}{south east}{south west}}
353 \def\gtr@debug@contour@east@right#1{\gtr@debug@contour{#1}{east}{south west}{south east}}
354
355 \newif\ifgtr@debug@west
356 \newif\ifgtr@debug@east
357
358 \gtrset{debug/.cd,
359 family number/.store in=\gtrkv@debug@fam,
360 family id/.code={\gtr@getFamNumForId{#1}\let\gtrkv@debug@fam\gtr@tmp@num},
361 contour/.is choice,
362 contour/west/.code={\gtr@debug@westtrue\gtr@debug@eastfalse},
363 contour/east/.code={\gtr@debug@westfalse\gtr@debug@easttrue},
364 contour/both/.code={\gtr@debug@westtrue\gtr@debug@easttrue},
365 contour/none/.code={\gtr@debug@westfalse\gtr@debug@eastfalse},
366 tikz@options/.style={/tikz/gtr@debug@tcb@options/.style={#1}},
367 }
368
369 \def\gtr@debug@contour@par@down{%
370 \ifgtr@debug@west\gtr@debug@contour@west@up{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi%
371 \ifgtr@debug@east\gtr@debug@contour@east@up{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi%
372 }
373
374 \def\gtr@debug@contour@par@up{%
375 \ifgtr@debug@west\gtr@debug@contour@west@down{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi%
376 \ifgtr@debug@east\gtr@debug@contour@east@down{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi%
377 }
378
379 \def\gtr@debug@contour@par@left{%
380 \ifgtr@debug@west\gtr@debug@contour@west@right{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi%
381 \ifgtr@debug@east\gtr@debug@contour@east@right{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi%
382 }
383
384 \def\gtr@debug@contour@par@right{%
385 \ifgtr@debug@west\gtr@debug@contour@west@left{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi%
386 \ifgtr@debug@east\gtr@debug@contour@east@left{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi%
387 }
388
389 \def\gtr@debug@contour@chi@down{%
390 \ifgtr@debug@west\gtr@debug@contour@west@down{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi%
391 \ifgtr@debug@east\gtr@debug@contour@east@down{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi%
392 }
393
394 \def\gtr@debug@contour@chi@up{%
395 \ifgtr@debug@west\gtr@debug@contour@west@up{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi%
396 \ifgtr@debug@east\gtr@debug@contour@east@up{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi%
397 }
398
399 \def\gtr@debug@contour@chi@left{%
400 \ifgtr@debug@west\gtr@debug@contour@west@left{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi%
401 \ifgtr@debug@east\gtr@debug@contour@east@left{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi%
402 }
403
404 \def\gtr@debug@contour@chi@right{%
405 \ifgtr@debug@west\gtr@debug@contour@west@right{\csuse{gtr@fam@\gtrkv@debug@fam @cwest@anchor}}\fi%
406 \ifgtr@debug@east\gtr@debug@contour@east@right{\csuse{gtr@fam@\gtrkv@debug@fam @ceast@anchor}}\fi%
407 }
408
409 \def\gtr@debug@contour@san@down{%
410 \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%
411 \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%
412 }
413
414 \def\gtr@debug@contour@san@up{%
415 \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%
416 \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%
417 }
418
419 \def\gtr@debug@contour@san@left{%
420 \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%
421 \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%
422 }
423
424 \def\gtr@debug@contour@san@right{%
425 \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%
426 \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%
427 }
428
429 % no contour for union
430
431 \newcommand{\gtrdebugdrawcontour}[2]{%
432 \gtrset{debug/.cd,family number=1,contour=both,tikz@options={draw,#2},#1}%
433 \csuse{gtr@debug@contour@\csuse{gtr@fam@\gtrkv@debug@fam @type}@\gtrkv@timeflow}%
434 }
435
436 \def\gtr@show@family@id#1{%
437 \node[fill=white,fill opacity=0.8,outer sep=0pt,inner sep=2pt] at (f@#1)
438 {\ifcsvoid{gtr@fam@#1@id}{\def\gtr@temp{???}}{\letcs\gtr@temp{gtr@fam@#1@id}}%
439 \ttfamily\expandafter\detokenize\expandafter{\gtr@temp}};
440 }
441
442 \def\gtr@show@family@number#1{%
443 \node[fill=white,fill opacity=0.8,outer sep=0pt,inner sep=2pt] at (f@#1)
444 {\ttfamily\expandafter\detokenize\expandafter{#1}};
445 }
446
447 \gtrset{
448 show/.style={box={finish={%
449 \node[fill=white,fill opacity=0.8,outer sep=0pt,inner sep=2pt] at (frame.center) {%
450 \setbox0=\hbox{\resizebox{\the\dimexpr\tcb@width-4pt}{!}{\bfseries#1}}%
451 \ifdim\dimexpr\ht0+\dp0>\dimexpr\tcb@height-4pt\relax%
452 \resizebox*{!}{\the\dimexpr\tcb@height-4pt}{\usebox0}%
453 \else%
454 \usebox0%
455 \fi%
456 };}}},
457 show@family@number/.style={after tree={%
458 \begin{scope}%
459 \ifgtr@timeflow@vertical\else\tikzset{every node/.style={rotate=90,transform shape}}\fi%
460 \gtr@forall@families{\gtr@show@family@number}%
461 \end{scope}%
462 }},
463 show@family@id/.style={after tree={%
464 \begin{scope}%
465 \ifgtr@timeflow@vertical\else\tikzset{every node/.style={rotate=90,transform shape}}\fi%
466 \gtr@forall@families{\gtr@show@family@id}%
467 \end{scope}%
468 }},
469 show number/.style={show={\ttfamily\gtr@currentperson},show@family@number},
470 show family/.style={show={\ttfamily\gtr@currentfamily},show@family@number},
471 show id/.style={show={\ttfamily\gtrnodeid},show@family@id%
472 },
473 show level/.style={show={\ttfamily\number\gtr@c@level}},
474 show type/.style={show={\ttfamily\strut\gtrnodetype}},
475 }