%% %% This is file `forest-lib-ext.multi.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% forest-ext-multi.dtx (with options: `sty') %% 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}[2025-12-05 v0.1] \disable@package@load {forest-lib-ext.multi-debug} {% \PackageWarning {ext.multi (forest library)} {Only one of ext.multi and ext.multi-debug should be loaded. Since the ext.multi library has already been loaded, I will ignore your request for ext.multi-debug.% }% } \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 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={% split={#1}{,}{multi@parent}, 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{% edge path'/.option=multi@edge, }, }, }, multi@also@parent/.style={% 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={% 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{% 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}, for nodewalk={% name/.expanded=parent \foresteregister{multi@temp@counta} of #1 % }{% insert after={% [,coordinate,no edge, tier=multi@tier@#1@parents, delay={% append=#1, }, ]% }, }, }, }, multi@add@parent/.style n args=4{% delay n=2{% for nodewalk={% id=#4% }{% multi@fosterlings+=#1, #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}, }, ]% },% }, }, }, also parent/.style 2 args={% delay={% split={#2}{:}{multi@temp@toksa,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}}, }, 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={% also parent={prepend}{#1}, }, also parent+/.style={% also parent={append}{#1}, }, multi@phantom/.style={ before drawing tree={% coordinate, typeset node, }, }, debug multi phantoms/.code={% \PackageWarning{forest-lib-ext.multi}{% You requested the style 'debug multi phantoms', but did not load the debugging code. Either load 'ext.multi-debug' instead of 'ext.multi' or remove this style. }% }, node debug multi phantoms/.code={% \PackageWarning{forest-lib-ext.multi}{% You requested the style 'not debug multi phantoms', but did not load the debugging code. Either load 'ext.multi-debug' instead of 'ext.multi' or remove this style. }% }, libraries/ext.multi/defaults/.style= {}, } \AddToHook{begindocument}{% \IfPackageLoadedT{forest-lib-edges}{% \PackageInfo{forest-lib-ext.multi} {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/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/defaults, /utils/exec={% \PackageInfo{forest-lib-ext.multi} {% Appending compatibility code for forked edges to default settings.% }% }, }% }% }% \ifcsname l_forestext_tagging_custom_bool\endcsname \PackageInfo{forest-lib-ext.multi} {% Found the ext.tagging or ext.tagging-debug library. Enabling support code.% }% \forestset{% libraries/ext.multi/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.sty'.