diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.shapes.uncenteredrectangle.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.shapes.uncenteredrectangle.code.tex | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.shapes.uncenteredrectangle.code.tex b/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.shapes.uncenteredrectangle.code.tex new file mode 100644 index 00000000000..71ee1d6be8f --- /dev/null +++ b/Master/texmf-dist/tex/generic/tikz-ext/tikzlibraryext.shapes.uncenteredrectangle.code.tex @@ -0,0 +1,46 @@ +% Copyright 2023 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\usepgflibrary{ext.shapes.uncenteredrectangle} +\newif\iftikzext@uncrec@mathmode +\pgfqkeys{/tikz-ext}{ + tikz-cd fix/.code={% #1 + \tikzcdset{ + /tikz-ext/tikz-cd fix/.code=, + urc/.style={/pgf/uncentered rectangle center={##1}}, + every diagram/.append style={% ##1 + /pgf/uncentered rectangle center yshift=axis_height, + /tikz/uncentered rectangle/.style={ + /tikz/shape=uncentered rectangle, + /tikz/commutative diagrams/math mode=false, + }, + /tikz/matrix of math nodes/.style={ + /tikz/matrix of nodes, + /tikz/nodes={ + execute at begin node=\iftikzcd@mathmode$\fi, + execute at end node=\iftikzcd@mathmode$\fi + } + }, + /utils/exec=% + \def\uncrec####1####2####3{% + \iftikzext@uncrec@mathmode$\fi####2\iftikzext@uncrec@mathmode$\fi + \nodepart{left}\iftikzext@uncrec@mathmode$\fi####1\iftikzext@uncrec@mathmode$\fi + \nodepart{right}\iftikzext@uncrec@mathmode$\fi####3\iftikzext@uncrec@mathmode$\fi + }, + /tikz/uncrec math mode/.is if=tikzext@uncrec@mathmode, + /tikz/uncrec math mode=true, + /tikz/uncrec/.style={% ####1 + /tikz/uncentered rectangle, + /pgf/uncentered rectangle center={####1} + }, + install uncentered rectangle in column/.style={ + /tikz/column ####1/.append style={/tikz/uncentered rectangle} + } + } + } + } +}
\ No newline at end of file |