<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%
% CoDi: Commutative Diagrams for TeX
% Copyright (c) 2015-2024 Paolo Brasolin &lt;paolo.brasolin@gmail.com&gt;
% SPDX-License-Identifier: MIT
%
% This file is part of CoDi 1.1.2, released on 2024/04/22 under MIT license.
%

% Î²Î¬Ï€Ï„Ï‰ â€¢ (bÃ¡ptÅ)
%   1. I dip, submerge
%   2. I dye, colour
%   3. I baptise

% Bapto is a node labeling mechanism.
% It allows non-invasive relabeling and preprocessing.

% ,-- input           input hook
% `-&gt; controller --.  the controller conditionally
% ,---[overwrite]--'    (depending upon the given overwriting behaviour)
% `-&gt; trigger -----.    calls the trigger
% ,--- ??? &lt;-------'  either short the keys or do preprocessing here
% `-&gt; dispatcher --.  the dispatcher conditionally
% ,---[overwrite]--|    (depending upon the given overwriting behaviour)
% `-&gt; (name|alias) |    assigns the label
%     output &lt;-----'  output hook

%==[ input ]====================================================================

\pgfqkeys{/bapto/input}{
  .forward to=/bapto/controller
}

%==[ controller/dispatcher ]====================================================

\pgfqkeys{/bapto/overwrite}{.is choice,
  false/.style={/bapto/controller/.code={\def\kDTmp{##1}\ifx\kDTmp\empty\else
                                         \ifx\tikz@fig@name\empty
                                         \pgfqkeys{/bapto}{trigger={##1}}\fi\fi},
                /bapto/dispatcher/.code={\pgfqkeys{/tikz}{name=##1}%
                                         \pgfqkeys{/bapto}{output=##1}}},
  alias/.style={/bapto/controller/.code={\def\kDTmp{##1}\ifx\kDTmp\empty\else
                                         \pgfqkeys{/bapto}{trigger={##1}}\fi},
                /bapto/dispatcher/.code={\pgfqkeys{/tikz}{alias=##1}%
                                         \pgfqkeys{/bapto}{output=##1}}},
  true/.style= {/bapto/controller/.code={\def\kDTmp{##1}\ifx\kDTmp\empty\else
                                         \pgfqkeys{/bapto}{trigger={##1}}\fi},
                /bapto/dispatcher/.code={\pgfqkeys{/tikz}{name=##1}%
                                         \pgfqkeys{/bapto}{output=##1}}},
  false, % default is no name overwriting and no aliasing
}

%==[ output ]===================================================================

\pgfqkeys{/bapto/output}{
  .code={}
}
</pre></body></html>