summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-06-06 21:11:51 +0000
committerKarl Berry <karl@freefriends.org>2020-06-06 21:11:51 +0000
commit204a15684f2ee547b4b0816480b87b3c30d3ef6f (patch)
tree34c8f919e87413a026b3718c985735de7368f19c /Master/texmf-dist/tex/generic/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex
parent632dd1c4a26f2687cefe49e59c2071c4f7b2c5ee (diff)
commutative-diagrams (6jun20)
git-svn-id: svn://tug.org/texlive/trunk@55438 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex58
1 files changed, 58 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex b/Master/texmf-dist/tex/generic/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex
new file mode 100644
index 00000000000..07d375cc434
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex
@@ -0,0 +1,58 @@
+%
+% CoDi: Commutative Diagrams for TeX
+% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com>
+% SPDX-License-Identifier: MIT
+%
+% This file is part of CoDi 1.0.0, released on 2020/06/06 under MIT license.
+%
+
+% όζος • (ózos)
+% 1. node
+% 2. nodule
+% 3. gnarl
+
+% Ozos is an alternative parsing mechanism for TiKz nodes.
+% It implements the following transformation
+% \kDOzos ... {CONTENTS}; ---> \node ... [node contents={CONTENTS}];
+% to ensure the node contents always pass through the TikZ key.
+
+\usetikzlibrary{commutative-diagrams.koinos}
+
+%==[ TikZ/pgf layer ]===========================================================
+
+\pgfkeys{/ozos/every node/.style={}}
+
+%==[ main macro ]===============================================================
+
+\def\kDOzos%
+ {\kDOzosFetchThen
+ {\kDOzosMaybeDumpThen
+ \kDOzosOutput}}
+
+%==[ fetching routine ]=========================================================
+
+% I use the general one implemented by koinos.
+\let\kDOzosFetchThen\kDFetchOptAndGrpThen
+
+%==[ parsing routine ]==========================================================
+
+% Trivially solved by fetching.
+
+%==[ dumping routine ]==========================================================
+
+\def\kDOzosMaybeDumpThen#1{%
+ \kDDump{options: '\the\kDOptTok'}%
+ \kDDump{content: '\the\kDGrpTok'}%
+ #1}
+
+%==[ output routine ]===========================================================
+
+\def\kDOzosOutput{
+ \edef\kDAct{
+ \noexpand\node
+ [/ozos/every node]
+ \the\kDOptTok
+ [/tikz/node contents={\the\kDGrpTok}];
+ }
+ \kDAct
+}