| 1 |
% Copyright 2023 by Qrrbrbirlbel |
| 2 |
% |
| 3 |
% This file may be distributed and/or modified |
| 4 |
% |
| 5 |
% 1. under the LaTeX Project Public License and/or |
| 6 |
% 2. under the GNU Free Documentation License. |
| 7 |
% |
| 8 |
\usepgflibrary{ext.shapes.uncenteredrectangle} |
| 9 |
\newif\iftikzext@uncrec@mathmode |
| 10 |
\tikzextset{ |
| 11 |
tikz-cd fix/.code={% #1 |
| 12 |
\tikzcdset{ |
| 13 |
/tikz/ext/tikz-cd fix/.code=, |
| 14 |
urc/.style={/pgf/ext/uncentered rectangle center={##1}}, |
| 15 |
every diagram/.append style={% ##1 |
| 16 |
/pgf/ext/uncentered rectangle center yshift=axis_height, |
| 17 |
/tikz/uncentered rectangle/.style={ |
| 18 |
/tikz/shape=ext_uncentered rectangle, |
| 19 |
/tikz/commutative diagrams/math mode=false, |
| 20 |
}, |
| 21 |
/tikz/matrix of math nodes/.style={ |
| 22 |
/tikz/matrix of nodes, |
| 23 |
/tikz/nodes={ |
| 24 |
execute at begin node=\iftikzcd@mathmode$\fi, |
| 25 |
execute at end node=\iftikzcd@mathmode$\fi |
| 26 |
} |
| 27 |
}, |
| 28 |
/utils/exec=% |
| 29 |
\def\uncrec####1####2####3{% |
| 30 |
\iftikzext@uncrec@mathmode$\fi####2\iftikzext@uncrec@mathmode$\fi |
| 31 |
\nodepart{left}\iftikzext@uncrec@mathmode$\fi####1\iftikzext@uncrec@mathmode$\fi |
| 32 |
\nodepart{right}\iftikzext@uncrec@mathmode$\fi####3\iftikzext@uncrec@mathmode$\fi |
| 33 |
}, |
| 34 |
/tikz/uncrec math mode/.is if=tikzext@uncrec@mathmode, |
| 35 |
/tikz/uncrec math mode=true, |
| 36 |
/tikz/uncrec/.style={% ####1 |
| 37 |
/tikz/uncentered rectangle, |
| 38 |
/pgf/ext/uncentered rectangle center={####1} |
| 39 |
}, |
| 40 |
install uncentered rectangle in column/.style={ |
| 41 |
/tikz/column ####1/.append style={/tikz/uncentered rectangle} |
| 42 |
} |
| 43 |
} |
| 44 |
} |
| 45 |
} |
| 46 |
} |