%% %% This is file `forest-lib-ext.multi-debug.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% forest-ext-multi.dtx (with options: `sty,debug') %% Copyright (C) 2025-2026 Clea F. Rees. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c %% of this license or (at your option) any later version. %% The latest version of this license is in %% https://www.latex-project.org/lppl.txt %% and version 1.3c or later is part of all distributions of LaTeX %% version 2008-05-04 or later. %% %% This work has the LPPL maintenance status `maintained'. %% %% The Current Maintainer of this work is Clea F. Rees. %% %% This file may only be distributed together with a copy of the package %% forest-ext. You may however distribute the package forest-ext without %% such generated files. %% %% This work consists of all files listed in manifest.txt. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} %% $Id: forest-ext-multi.dtx 11668 2026-02-21 02:34:38Z cfrees $} \ProvidesForestLibrary{ext.multi-debug}[2025-12-05 v0.1] \disable@package@load {forest-lib-ext.multi} {% \PackageWarning {ext.multi-debug (forest library)} {Only one of ext.multi and ext.multi-debug should be loaded. Since the ext.multi-debug library has already been loaded, I will ignore your request for ext.multi.% }% } \SetDefaultHookLabel{forest-ext/multi} \forestset{ declare keylist={every parent}{}, declare keylist={other parents}{}, declare boolean={multi@connector}{0}, declare count={multi@n@parents}{0}, declare count={multi@connects@fosterling}{-1}, declare count={multi@connects@foster@parent}{-1}, declare keylist={multi@foster@parents}{}, declare keylist={multi@fosterlings}{}, declare keylist={multi@all@parents}{}, declare toks={multi@edge}{}, declare toks={multi@edge@subpath}{edge}, declare toks={multi@edge@sublast}{--}, declare toks={multi@edge@route}{--}, declare toks={multi@parent@of}{}, declare boolean register={debug multi phantoms}, not debug multi phantoms, declare count register={multi@temp@counta}, multi@temp@counta=0, declare toks register={multi@temp@toksa}, multi@temp@toksa={}, declare toks register={multi@temp@toksb}, multi@temp@toksb={}, define long step={fosterlings}{}{% if multi@fosterlings={}{}{% split option={multi@fosterlings}{,}{id}% }% }, define long step={foster parents}{}{% if multi@foster@parents={}{}{% split option={multi@foster@parents}{,}{id}% }% }, define long step={every fosterling}{n args=1}{% filter={#1}{>O_=!{multi@foster@parents}{}}% }, define long step={every foster parent}{n args=1}{% filter={#1}{>O_=!{multi@fosterlings}{}}% }, define long step={c fosterling}{}{% id/.option=multi@connects@fosterling% }, define long step={c foster parent}{}{% id/.option=multi@connects@foster@parent% }, multi/.style={% debug@multi=Execute style multi at, debug@multi@option=id, split={#1}{,}{multi@parent}, debug@multi@option=multi@n@parents, debug@multi@option=multi@all@parents, before typesetting nodes={% multi@parents/.process={% OOOw {name} {multi@n@parents} {multi@all@parents} {{##1}}% }, delay n=2{% multi@edge+= {(.child anchor) }, multi@temp@counta'=0, split option={multi@all@parents}{,}{multi@also@parent}, }, delay n=3{% debug@multi@option=id, debug@multi@option=multi@edge, edge path'/.option=multi@edge, }, }, }, multi@also@parent/.style={% debug@multi=Execute style multi@also@parent to for #1 at, debug@multi@option=id, multi@temp@counta'+=1, multi@edge+/.process={ OR= ? O w {multi@n@parents}{multi@temp@counta} {multi@edge@sublast}{multi@edge@subpath} {##1 (#1.parent anchor) } }, }, multi@parent/.style={% debug@multi=Execute style multi@parent to add #1 at, debug@multi@option=id, debug@multi@option=every parent, multi@n@parents'+=1, delay/.process={Ow{multi@n@parents}{% multi@all@parents+/.process={Ow{name}{parent ##1 of ####1}}, insert before/.process={% OOw2{name}{every parent} {% [#1,name=parent ##1 of ####1,multi@parent@of=####1, ####2]% }% }, }% }, }, multi@parents/.style n args=3{% debug@multi=Executing style multi@parents with, debug@multi=options #1 #2 and #3, if={>nw+P{#2}{isodd(##1)}}{% multi@temp@counta/.expanded=\inteval{(#2 + 1)/2}, for nodewalk={% name/.expanded=parent \foresteregister{multi@temp@counta} of #1 % }{% append=#1, }, }{% multi@temp@counta/.expanded=\inteval{#2/2}, debug@multi@register=multi@temp@counta, for nodewalk={% name/.expanded=parent \foresteregister{multi@temp@counta} of #1 % }{% insert after={% [,coordinate,no edge, tier=multi@tier@#1@parents, delay={% debug@multi=Appending #1 to, debug@multi@option=name, append=#1, }, ]% }, }, }, }, multi@add@parent/.style n args=4{% debug@multi=Execute style multi@add@parent to add #4 at, debug@multi@option=id, debug@multi=Arguments: #1: #2: #3: #4, debug@multi@option=every parent, delay n=2{% for nodewalk={% id=#4% }{% multi@fosterlings+=#1, debug@multi=dynamic action #2, debug@multi@option=parent anchor, #2={% [, multi@phantom, multi@connector, multi@connects@fosterling=#1, multi@connects@foster@parent=#4, for current/.option=!{id=#1}.every parent, delay n=3{% do dynamics, edge path'/.process={% Ow {!{id=#1}.multi@edge@route} {% (!c fosterling.child anchor) ##1 (!c foster parent.parent anchor) % }% }, also={#3}, debug@multi@option=id, debug@multi=edge path and edge, typeout/.option=edge path, debug@multi@option=edge, }, ]% },% }, }, }, also parent/.style 2 args={% debug@multi=Executing style also parent at, debug@multi@option=id, delay={% split={#2}{:}{multi@temp@toksa,multi@temp@toksb}, debug@multi@register=multi@temp@toksa, debug@multi@register=multi@temp@toksb, if nodewalk valid={name/.register=multi@temp@toksa}{% multi@temp@counta/.option=!{name/.register=multi@temp@toksa}.id, }{% multi@temp@counta/.option/.process={Rw{multi@temp@toksa}{##1.id}}, }, debug@multi@register=multi@temp@counta, multi@foster@parents+/.register=multi@temp@counta, multi@add@parent/.process={% O_RwR {id} {#1} {multi@temp@toksb} {{##1}} {multi@temp@counta}% }, }, }, +also parent/.style={% debug@multi=Executing style +also parent at, debug@multi@option=id, also parent={prepend}{#1}, }, also parent+/.style={% debug@multi=Executing style also parent+ at, debug@multi@option=id, also parent={append}{#1}, }, multi@phantom/.style={ before drawing tree={% if debug multi phantoms={% rectangle, if content={}{, draw=red, }{% red, }, }{% coordinate, }, typeset node, }, }, debug@multi/.code={% \ExpandArgs {e} \typeout{[Forest ext.multi debug]:: \detokenize{#1}}% }, debug@multi@register/.code={% \ExpandArgs {e} \typeout{[Forest ext.multi debug]:: \detokenize{#1} = \foresteregister{#1}% }% }, debug@multi@option/.code={% \ExpandArgs {e} \typeout{[Forest ext.multi debug]:: \detokenize{#1} = \foresteoption{#1}% }% }, libraries/ext.multi-debug/defaults/.style= {}, } \AddToHook{begindocument}{% \IfPackageLoadedT{forest-lib-edges}{% \PackageInfo{forest-lib-ext.multi-debug} {Found the edges library. Enabling support code.}% \usetikzlibrary{ext.paths.ortho}% \forestset{% multi@forked@edge/.style={% /forest/.cd, /tikz/ext/ortho/distance/.process={Ow{fork sep}{-##1}}, every parent+={% forked edge, /tikz/ext/ortho/distance/.process={Ow{fork sep}{-##1}}, }, multi@edge@subpath={% (.child anchor) -|- }, multi@edge@sublast={% (.child anchor) -|- }, multi@edge@route={% -|- }, }, libraries/ext.multi-debug/defaults/.style= {% default preamble+={ Autoforward={fork sep}{% every parent+={% fork sep=##1, edge+={/tikz/ext/ortho/distance=-##1}, }, edge+={/tikz/ext/ortho/distance=-##1}, }, fork sep'=0.5em, forked edge'/.forward to=/forest/multi@forked@edge, }, }, libraries/edges/defaults/.append style={% libraries/ext.multi-debug/defaults, /utils/exec={% \PackageInfo{forest-lib-ext.multi-debug} {% Appending compatibility code for forked edges to default settings.% }% }, }% }% }% \ifcsname l_forestext_tagging_custom_bool\endcsname \PackageInfo{forest-lib-ext.multi-debug} {% Found the ext.tagging or ext.tagging-debug library. Enabling support code.% }% \forestset{% libraries/ext.multi-debug/defaults/.append style= {% also parent/.append style={% before collating tags={% alt text+/.process={Ow{##2.content}{ also child of ####1 }}, }, }, multi/.append style={% before collating tags={% alt text+={multiple parents: }, split={#1}{,}{multi@to@alt}, }, multi@to@alt/.style={% alt text+={#1, }, }, }, }, }% \fi } \endinput %% %% End of file `forest-lib-ext.multi-debug.sty'.