| 1 |
%% The LaTeX package genealogytree - version 2.4.0 (2026/05/06) |
| 2 |
%% gtrcore.contour.code.tex: Contours |
| 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 |
%%%%%%%%%%%%%%%%%%%%%%% |
| 23 |
%% Contour |
| 24 |
%%%%%%%%%%%%%%%%%%%%%%% |
| 25 |
|
| 26 |
% #1 east/west |
| 27 |
% #2 pid |
| 28 |
% #3 sum |
| 29 |
\def\gtr@cont@next#1#2#3{% |
| 30 |
\ifcsname gtr@per@#2@c#1@next\endcsname% |
| 31 |
\let\gtr@tmp@oldper#2% |
| 32 |
\letcs\gtr@tmp@oldfam{gtr@per@#2@fam}% |
| 33 |
\letcs#2{gtr@per@#2@c#1@next}% |
| 34 |
\letcs\gtr@tmp@fam{gtr@per@#2@fam}% |
| 35 |
\ifdefequal{\gtr@tmp@oldfam}{\gtr@tmp@fam}{% |
| 36 |
\dimdef#3{#3-\csuse{gtr@per@\gtr@tmp@oldper @c#1@val}+\csuse{gtr@per@#2@c#1@val}}% |
| 37 |
}{% |
| 38 |
\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}}% |
| 39 |
}% |
| 40 |
\else |
| 41 |
\ifcsname gtr@per@#2@c#1@thread\endcsname% |
| 42 |
\dimdef#3{#3+\csuse{gtr@per@#2@c#1@tgap}}% |
| 43 |
\letcs#2{gtr@per@#2@c#1@thread}% |
| 44 |
\else% |
| 45 |
\let#2=\@undefined% |
| 46 |
\fi% |
| 47 |
\fi% |
| 48 |
} |
| 49 |
|
| 50 |
% #1 east/west |
| 51 |
% #2 pid |
| 52 |
% #3 sum |
| 53 |
\def\gtr@cont@origin#1#2#3{% |
| 54 |
\letcs\gtr@tmp@fam{gtr@per@#2@fam}% |
| 55 |
\dimdef#3{\csuse{gtr@fam@\gtr@tmp@fam @offset}+\csuse{gtr@per@#2@c#1@val}}% |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
\def\gtr@cont@sew{% |
| 60 |
\let\gtr@tmp@A@west@pid@old=\gtr@tmp@A@west@pid% |
| 61 |
\gtr@cont@next{west}{\gtr@tmp@A@west@pid}{\gtr@tmp@A@west@sum}% |
| 62 |
\gtr@cont@next{east}{\gtr@tmp@A@east@pid}{\gtr@tmp@A@east@sum}% |
| 63 |
\gtr@cont@next{west}{\gtr@tmp@B@west@pid}{\gtr@tmp@B@west@sum}% |
| 64 |
\let\gtr@tmp@B@east@pid@old=\gtr@tmp@B@east@pid% |
| 65 |
\gtr@cont@next{east}{\gtr@tmp@B@east@pid}{\gtr@tmp@B@east@sum}% |
| 66 |
% |
| 67 |
\let\gtr@sew@next=\relax% |
| 68 |
\ifdefined\gtr@tmp@A@east@pid |
| 69 |
% A tree present |
| 70 |
\ifdefined\gtr@tmp@B@west@pid |
| 71 |
% B tree present |
| 72 |
\gtr@cont@set@distance{\gtr@tmp@B@west@pid}{\gtr@dist@further}% |
| 73 |
\dimdef\gtr@temp{\gtr@tmp@A@east@sum-\gtr@tmp@B@west@sum+\gtr@cont@distance}% |
| 74 |
\ifdim\gtr@temp>\gtr@tmp@offset\relax\let\gtr@tmp@offset=\gtr@temp\fi% |
| 75 |
\let\gtr@sew@next=\gtr@cont@sew% |
| 76 |
\else |
| 77 |
% B tree finished |
| 78 |
\cslet{gtr@per@\gtr@tmp@B@east@pid@old @ceast@thread}{\gtr@tmp@A@east@pid}% |
| 79 |
\csdimdef{gtr@per@\gtr@tmp@B@east@pid@old @ceast@tgap}{\gtr@tmp@A@east@sum-\gtr@tmp@B@east@sum-\gtr@tmp@offset}% |
| 80 |
\fi |
| 81 |
\else |
| 82 |
% A tree finished |
| 83 |
\ifdefined\gtr@tmp@B@west@pid% |
| 84 |
% B tree present |
| 85 |
\cslet{gtr@per@\gtr@tmp@A@west@pid@old @cwest@thread}{\gtr@tmp@B@west@pid}% |
| 86 |
\csdimdef{gtr@per@\gtr@tmp@A@west@pid@old @cwest@tgap}{\gtr@tmp@B@west@sum-\gtr@tmp@A@west@sum+\gtr@tmp@offset}% |
| 87 |
% \else nothing to do |
| 88 |
% B tree finished |
| 89 |
\fi% |
| 90 |
\fi% |
| 91 |
\gtr@sew@next% |
| 92 |
} |
| 93 |
|
| 94 |
|
| 95 |
% Set distance value |
| 96 |
% #1 node number |
| 97 |
% #2 default distance |
| 98 |
\def\gtr@cont@set@distance#1#2{% |
| 99 |
\ifcsname gtr@per@#1@distance\endcsname% |
| 100 |
\letcs\gtr@cont@distance{gtr@per@#1@distance}% |
| 101 |
\else |
| 102 |
\let\gtr@cont@distance=#2% |
| 103 |
\fi% |
| 104 |
} |
| 105 |
|
| 106 |
|
| 107 |
% Merge tree (family) to existing tree |
| 108 |
% #1 family number |
| 109 |
% #2 distance |
| 110 |
\def\gtr@cont@merge@tree#1#2{% |
| 111 |
\let\gtr@tmp@A@west@pid=\gtr@tmp@nextwest% |
| 112 |
\let\gtr@tmp@A@east@pid=\gtr@tmp@nexteast% |
| 113 |
\letcs\gtr@tmp@B@west@pid{gtr@fam@#1@cwest@anchor}% |
| 114 |
\letcs\gtr@tmp@B@east@pid{gtr@fam@#1@ceast@anchor}% |
| 115 |
% |
| 116 |
\gtr@cont@origin{west}{\gtr@tmp@A@west@pid}{\gtr@tmp@A@west@sum}% |
| 117 |
\gtr@cont@origin{east}{\gtr@tmp@A@east@pid}{\gtr@tmp@A@east@sum}% |
| 118 |
\gtr@cont@origin{west}{\gtr@tmp@B@west@pid}{\gtr@tmp@B@west@sum}% |
| 119 |
\gtr@cont@origin{east}{\gtr@tmp@B@east@pid}{\gtr@tmp@B@east@sum}% |
| 120 |
% |
| 121 |
\edef\gtr@tmp@nexteast{\gtr@tmp@B@east@pid}% |
| 122 |
\gtr@cont@set@distance{\gtr@tmp@B@west@pid}{#2}% |
| 123 |
\dimdef\gtr@tmp@offset{\gtr@tmp@A@east@sum-\gtr@tmp@B@west@sum+\gtr@cont@distance}% |
| 124 |
% |
| 125 |
\gtr@cont@sew% |
| 126 |
% |
| 127 |
\csdimdef{gtr@fam@#1@offset}{\gtr@tmp@offset}% |
| 128 |
\letcs\gtr@gnode{gtr@fam@#1@g}% |
| 129 |
\gtr@cont@settomid\gtr@tmp@linkpos{\gtr@gnode}% |
| 130 |
\dimdef\gtr@tmp@linkpos{\gtr@tmp@offset+\gtr@tmp@linkpos}% |
| 131 |
} |
| 132 |
|
| 133 |
|
| 134 |
% Merge node (person) to existing tree |
| 135 |
% #1 node number |
| 136 |
% #2 distance |
| 137 |
\def\gtr@cont@merge@node#1#2{% |
| 138 |
\let\gtr@tmp@A@east@pid=\gtr@tmp@nexteast% |
| 139 |
\gtr@cont@origin{east}{\gtr@tmp@A@east@pid}{\gtr@tmp@A@east@sum}% |
| 140 |
\gtr@cont@set@distance{#1}{#2}% |
| 141 |
\dimdef\gtr@temp{\gtr@tmp@A@east@sum+\gtr@cont@distance}% |
| 142 |
\csdimdef{gtr@per@#1@cwest@val}{\gtr@temp}% |
| 143 |
\csdimdef{gtr@per@#1@ceast@val}{\csuse{gtr@per@#1@dim}+\gtr@temp}% |
| 144 |
\edef\gtr@tmp@nexteast{#1}% |
| 145 |
\gtr@cont@next{east}{\gtr@tmp@A@east@pid}{\gtr@tmp@A@east@sum}% |
| 146 |
\ifdef{\gtr@tmp@A@east@pid}{% |
| 147 |
\cslet{gtr@per@#1@ceast@thread}{\gtr@tmp@A@east@pid}% |
| 148 |
\csdimdef{gtr@per@#1@ceast@tgap}{\gtr@tmp@A@east@sum-\csuse{gtr@per@#1@ceast@val}}% |
| 149 |
}{}% |
| 150 |
\gtr@cont@settomid\gtr@tmp@linkpos{#1}% |
| 151 |
} |
| 152 |
|
| 153 |
|
| 154 |
% Setup a first tree (family) |
| 155 |
% #1 family number |
| 156 |
\def\gtr@cont@first@tree#1{% |
| 157 |
\letcs\gtr@tmp@nextwest{gtr@fam@#1@cwest@anchor}% |
| 158 |
\letcs\gtr@tmp@nexteast{gtr@fam@#1@ceast@anchor}% |
| 159 |
\letcs\gtr@gnode{gtr@fam@#1@g}% |
| 160 |
\gtr@cont@settomid\gtr@tmp@linkpos{\gtr@gnode}% |
| 161 |
} |
| 162 |
|
| 163 |
|
| 164 |
% Setup a node (person) |
| 165 |
% #1 node number |
| 166 |
\def\gtr@cont@first@node#1{% |
| 167 |
\edef\gtr@tmp@nextwest{#1}% |
| 168 |
\edef\gtr@tmp@nexteast{#1}% |
| 169 |
\csdimdef{gtr@per@#1@cwest@val}{\z@}% |
| 170 |
\csletcs{gtr@per@#1@ceast@val}{gtr@per@#1@dim}% |
| 171 |
\gtr@cont@settomid\gtr@tmp@linkpos{#1}% |
| 172 |
} |
| 173 |
|
| 174 |
|
| 175 |
% Merge an anchor node (person) |
| 176 |
% #1 node number |
| 177 |
% #2 distance |
| 178 |
\def\gtr@cont@merge@anchor#1#2{% |
| 179 |
\letcs\gtr@tmp@A@east@pid{gtr@fam@\gtr@currentfamily @ceast@anchor}% |
| 180 |
% |
| 181 |
\gtr@cont@set@distance{#1}{#2}% |
| 182 |
\dimdef\gtr@temp{\csuse{gtr@per@\gtr@tmp@A@east@pid @ceast@val}+\gtr@cont@distance}% |
| 183 |
% |
| 184 |
\csdimdef{gtr@per@#1@cwest@val}{\gtr@temp}% |
| 185 |
\csdimdef{gtr@per@#1@ceast@val}{\gtr@temp+\csuse{gtr@per@#1@dim}}% |
| 186 |
\csedef{gtr@fam@\gtr@currentfamily @ceast@anchor}{#1}% |
| 187 |
\ifdef{\gtr@tmp@nexteast}{\cslet{gtr@per@#1@ceast@next}{\gtr@tmp@nexteast}}{}% |
| 188 |
\gtr@cont@settomid\gtr@tmp@linkpos{#1}% |
| 189 |
} |
| 190 |
|
| 191 |
|
| 192 |
% Setup an anchor node (person) |
| 193 |
% #1 node number |
| 194 |
\def\gtr@cont@first@anchor#1{% |
| 195 |
\csedef{gtr@fam@\gtr@currentfamily @cwest@anchor}{#1}% |
| 196 |
\csedef{gtr@fam@\gtr@currentfamily @ceast@anchor}{#1}% |
| 197 |
\ifdef{\gtr@tmp@nextwest}{\cslet{gtr@per@#1@cwest@next}{\gtr@tmp@nextwest}}{}% |
| 198 |
\ifdef{\gtr@tmp@nexteast}{\cslet{gtr@per@#1@ceast@next}{\gtr@tmp@nexteast}}{}% |
| 199 |
\csdimdef{gtr@per@#1@cwest@val}{\z@}% |
| 200 |
\csletcs{gtr@per@#1@ceast@val}{gtr@per@#1@dim}% |
| 201 |
\gtr@cont@settomid\gtr@tmp@linkpos{#1}% |
| 202 |
} |
| 203 |
|
| 204 |
|
| 205 |
% Shift contourvalues |
| 206 |
% #1 list of persons (macro) |
| 207 |
% #2 shift value |
| 208 |
\def\gtr@cont@shift#1#2{% |
| 209 |
\def\do##1{% |
| 210 |
\csdimdef{gtr@per@##1@cwest@val}{\csuse{gtr@per@##1@cwest@val}+#2}% |
| 211 |
\csdimdef{gtr@per@##1@ceast@val}{\csuse{gtr@per@##1@ceast@val}+#2}% |
| 212 |
}% |
| 213 |
\dolistloop{#1}% |
| 214 |
} |
| 215 |
|
| 216 |
% Shift contourvalues |
| 217 |
% #1 list of persons (macro) |
| 218 |
% #2 shift value |
| 219 |
\def\gtr@cont@shift@sandclock#1#2{% |
| 220 |
\def\do##1{% |
| 221 |
\ifcsname gtr@per@##1@chiof\endcsname% |
| 222 |
\letcs\gtr@temp@fam{gtr@per@##1@fam}% |
| 223 |
\csdimdef{gtr@fam@\gtr@temp@fam @offset}{\csuse{gtr@fam@\gtr@temp@fam @offset}+#2}% |
| 224 |
\else% |
| 225 |
\csdimdef{gtr@per@##1@cwest@val}{\csuse{gtr@per@##1@cwest@val}+#2}% |
| 226 |
\csdimdef{gtr@per@##1@ceast@val}{\csuse{gtr@per@##1@ceast@val}+#2}% |
| 227 |
\fi% |
| 228 |
}% |
| 229 |
\dolistloop{#1}% |
| 230 |
} |
| 231 |
|
| 232 |
|
| 233 |
% Set to mid of person |
| 234 |
% #1 macro which gets the value |
| 235 |
% #2 node number |
| 236 |
\def\gtr@cont@settomid#1#2{% |
| 237 |
\dimdef#1{(\csuse{gtr@per@#2@cwest@val}+\csuse{gtr@per@#2@ceast@val})/2}% |
| 238 |
} |
| 239 |
|
| 240 |
|
| 241 |
%%%%%%%%%%%%%%%%%%%%%%% |
| 242 |
%% Positioning |
| 243 |
%%%%%%%%%%%%%%%%%%%%%%% |
| 244 |
|
| 245 |
|
| 246 |
\def\gtr@positioning@fam@down#1#2{% |
| 247 |
\csdimdef{gtr@fam@#1@x}{\csuse{gtr@fam@#2@x}+\csuse{gtr@fam@#1@offset}}% |
| 248 |
} |
| 249 |
|
| 250 |
\let\gtr@positioning@fam@up=\gtr@positioning@fam@down |
| 251 |
|
| 252 |
\def\gtr@positioning@fam@left#1#2{% |
| 253 |
\csdimdef{gtr@fam@#1@y}{\csuse{gtr@fam@#2@y}-\csuse{gtr@fam@#1@offset}}% |
| 254 |
} |
| 255 |
|
| 256 |
\let\gtr@positioning@fam@right=\gtr@positioning@fam@left |
| 257 |
|
| 258 |
\def\gtr@positioning@famoff@down#1{% |
| 259 |
\csdimdef{gtr@fam@#1@x}{\csuse{gtr@fam@#1@offset}}% |
| 260 |
} |
| 261 |
|
| 262 |
\let\gtr@positioning@famoff@up=\gtr@positioning@famoff@down |
| 263 |
|
| 264 |
\def\gtr@positioning@famoff@left#1{% |
| 265 |
\csdimdef{gtr@fam@#1@y}{-\csuse{gtr@fam@#1@offset}}% |
| 266 |
} |
| 267 |
|
| 268 |
\let\gtr@positioning@famoff@right=\gtr@positioning@famoff@left |
| 269 |
|
| 270 |
\def\gtr@positioning@family#1{% |
| 271 |
\ifcsname gtr@fam@#1@fam\endcsname% |
| 272 |
\letcs\gtr@encfamily{gtr@fam@#1@fam}% |
| 273 |
\gtr@positioning@fam{#1}{\gtr@encfamily}% |
| 274 |
\else% |
| 275 |
\ifcsname gtr@fam@#1@offset\endcsname% |
| 276 |
\gtr@positioning@famoff{#1}% |
| 277 |
\fi% |
| 278 |
\fi% |
| 279 |
} |
| 280 |
|
| 281 |
\def\gtr@positioning@per@down#1#2{% |
| 282 |
\csdimdef{gtr@per@#1@x}{\csuse{gtr@fam@#2@x}+\csuse{gtr@per@#1@cwest@val}}% |
| 283 |
} |
| 284 |
|
| 285 |
\let\gtr@positioning@per@up=\gtr@positioning@per@down |
| 286 |
|
| 287 |
\def\gtr@positioning@per@left#1#2{% |
| 288 |
\csdimdef{gtr@per@#1@y}{\csuse{gtr@fam@#2@y}-\csuse{gtr@per@#1@cwest@val}}% |
| 289 |
} |
| 290 |
|
| 291 |
\let\gtr@positioning@per@right=\gtr@positioning@per@left |
| 292 |
|
| 293 |
\def\gtr@positioning@person#1{% |
| 294 |
\letcs\gtr@encfamily{gtr@per@#1@fam}% |
| 295 |
\gtr@positioning@per{#1}{\gtr@encfamily}% |
| 296 |
} |
| 297 |
|
| 298 |
|
| 299 |
\def\gtr@positioning{% |
| 300 |
\letcs\gtr@positioning@fam{gtr@positioning@fam@\gtr@timeflow}% |
| 301 |
\letcs\gtr@positioning@famoff{gtr@positioning@famoff@\gtr@timeflow}% |
| 302 |
\letcs\gtr@positioning@per{gtr@positioning@per@\gtr@timeflow}% |
| 303 |
% |
| 304 |
\gtr@forall@families{\gtr@positioning@family}% |
| 305 |
\gtr@forall@nodes{\gtr@positioning@person}% |
| 306 |
} |
| 307 |
|
| 308 |
|
| 309 |
\def\gtr@shift@node#1{% |
| 310 |
\csdimdef{gtr@per@#1@x}{\csuse{gtr@per@#1@x}+\gtr@tmp@xshift}% |
| 311 |
\csdimdef{gtr@per@#1@y}{\csuse{gtr@per@#1@y}+\gtr@tmp@yshift}% |
| 312 |
} |
| 313 |
|
| 314 |
\def\gtr@shift@family#1{% |
| 315 |
\csdimdef{gtr@fam@#1@pos}{\csuse{gtr@fam@#1@pos}+\gtr@tmp@pshift}% |
| 316 |
} |
| 317 |
|
| 318 |
\def\gtr@shiftall{% |
| 319 |
\gtr@forall@nodes{\gtr@shift@node}% |
| 320 |
\gtr@forall@families{\gtr@shift@family}% |
| 321 |
} |
| 322 |
|
| 323 |
\def\gtr@dimen@correction@up#1#2#3#4{} |
| 324 |
\def\gtr@dimen@correction@down#1#2#3#4{\dimdef#2{#2-#4}} |
| 325 |
\def\gtr@dimen@correction@left#1#2#3#4{\dimdef#1{#1-#3}\dimdef#2{#2-#4}} |
| 326 |
\def\gtr@dimen@correction@right#1#2#3#4{\dimdef#2{#2-#4}} |
| 327 |
|
| 328 |
|
| 329 |
% #1: person id |
| 330 |
% #2: x (out) |
| 331 |
% #3: y (out) |
| 332 |
% #4: width (out) |
| 333 |
% #5: height (out) |
| 334 |
\def\gtr@getDimenForId#1#2#3#4#5{% |
| 335 |
\gtr@getPerNumForId{#1}% |
| 336 |
\let\gtr@tmp@pnum\gtr@tmp@num% node number for ID |
| 337 |
\letcs#2{gtr@per@\gtr@tmp@pnum @x}% |
| 338 |
\letcs#3{gtr@per@\gtr@tmp@pnum @y}% |
| 339 |
\dimdef#4{\wd\csuse{gtr@per@\gtr@tmp@num @box}}% |
| 340 |
\dimdef#5{\ht\csuse{gtr@per@\gtr@tmp@num @box}+\dp\csuse{gtr@per@\gtr@tmp@num @box}}% |
| 341 |
\csuse{gtr@dimen@correction@\gtr@timeflow}{#2}{#3}{#4}{#5}% |
| 342 |
} |
| 343 |
|
| 344 |
\def\gtr@adjust@right#1#2{% |
| 345 |
\dimdef\gtr@tmp@xshift{\gtr@xa-\gtr@xb+#1}% |
| 346 |
\dimdef\gtr@tmp@yshift{\gtr@ya-\gtr@yb-\gtr@hb/2+#2}% |
| 347 |
} |
| 348 |
|
| 349 |
\def\gtr@adjust@left#1#2{% |
| 350 |
\dimdef\gtr@tmp@xshift{\gtr@xa-\gtr@xb-\gtr@wb-#1}% |
| 351 |
\dimdef\gtr@tmp@yshift{\gtr@ya-\gtr@yb-\gtr@hb/2+#2}% |
| 352 |
} |
| 353 |
|
| 354 |
\def\gtr@adjust@above#1#2{% |
| 355 |
\dimdef\gtr@tmp@xshift{\gtr@xa-\gtr@xb-\gtr@wb/2+#2}% |
| 356 |
\dimdef\gtr@tmp@yshift{\gtr@ya-\gtr@yb+#1}% |
| 357 |
} |
| 358 |
|
| 359 |
\def\gtr@adjust@below#1#2{% |
| 360 |
\dimdef\gtr@tmp@xshift{\gtr@xa-\gtr@xb-\gtr@wb/2+#2}% |
| 361 |
\dimdef\gtr@tmp@yshift{\gtr@ya-\gtr@yb-\gtr@hb-#1}% |
| 362 |
} |
| 363 |
|
| 364 |
% #1: node to be adjusted |
| 365 |
% #2: direction |
| 366 |
% #3: reference position |
| 367 |
% #4: distance |
| 368 |
% #5: shift |
| 369 |
\def\gtr@adjust#1#2#3#4#5{% |
| 370 |
\tcb@gettikzxy{(#3)}{\gtr@xa}{\gtr@ya}% |
| 371 |
\gtr@getDimenForId{#1}{\gtr@xb}{\gtr@yb}{\gtr@wb}{\gtr@hb}% |
| 372 |
\ifcsname gtr@adjust@#2\endcsname% |
| 373 |
\csuse{gtr@adjust@#2}{#4}{#5}% |
| 374 |
\ifgtr@timeflow@vertical% |
| 375 |
\let\gtr@tmp@pshift=\gtr@tmp@yshift% |
| 376 |
\else% |
| 377 |
\let\gtr@tmp@pshift=\gtr@tmp@xshift% |
| 378 |
\fi% |
| 379 |
\gtr@shiftall% |
| 380 |
\else\gtr@error{adjust direction '#2' undefined}{% |
| 381 |
You passed an unknown value '#2'}\fi% |
| 382 |
} |
| 383 |
|
| 384 |
% #1: node to be set |
| 385 |
% #2: reference position |
| 386 |
\def\gtr@setposition#1#2{% |
| 387 |
\tcb@gettikzxy{(#2)}{\gtr@xa}{\gtr@ya}% |
| 388 |
\gtr@getDimenForId{#1}{\gtr@xb}{\gtr@yb}{\gtr@wb}{\gtr@hb}% |
| 389 |
\dimdef\gtr@tmp@xshift{\gtr@xa-\gtr@xb-\gtr@wb/2}% |
| 390 |
\dimdef\gtr@tmp@yshift{\gtr@ya-\gtr@yb-\gtr@hb/2}% |
| 391 |
\ifgtr@timeflow@vertical% |
| 392 |
\let\gtr@tmp@pshift=\gtr@tmp@yshift% |
| 393 |
\else% |
| 394 |
\let\gtr@tmp@pshift=\gtr@tmp@xshift% |
| 395 |
\fi% |
| 396 |
\gtr@shiftall% |
| 397 |
} |