From 8c5b9ad7a43452dd729b066ea7818e2a7436a149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Mon, 27 Jun 2022 17:03:35 +0200 Subject: [PATCH] load missing decorations library for tikz-cd --- src/math/mathfig/mathfig.pysty | 40 ++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/math/mathfig/mathfig.pysty b/src/math/mathfig/mathfig.pysty index d791492..95e1191 100644 --- a/src/math/mathfig/mathfig.pysty +++ b/src/math/mathfig/mathfig.pysty @@ -8,7 +8,7 @@ __HEADER__(Math figures with TikZ / pgfplots / xy) \pgfplotsset{compat=1.7} \RequirePackage{tikz} % Plots / drawings -\usetikzlibrary{calc, intersections, through, quotes, angles, babel, positioning, snakes} +\usetikzlibrary{calc, intersections, through, quotes, angles, babel, positioning, snakes, decorations.markings} \RequirePackage{tikz-cd} %Commutative diagrams \RequirePackage{xparse} @@ -47,24 +47,26 @@ __HEADER__(Math figures with TikZ / pgfplots / xy) %% Fix for equal arrows in tikz, see % https://tex.stackexchange.com/questions/443017/equal-arrows-without-transparent-ends-possible-in-tikzcd -\usetikzlibrary{decorations.markings} \tikzset { - double line with arrow/.style args= - { #1, #2 } - { decorate, decoration = - { - markings, - mark = at position 0 with - { - \coordinate (ta-base-1) at (0,1pt); - \coordinate (ta-base-2) at (0,-1pt); - }, - mark = at position 1 with - { - \draw[#1] (ta-base-1) -- (0,1pt); - \draw[#2] (ta-base-2) -- (0,-1pt); - } - } - } + double line with arrow/.style args = + {#1,#2}% + { + decorate, decoration = + { + markings, + mark = at position 0 with + { + \coordinate (ta-base-1) at (0,1pt); + \coordinate (ta-base-2) at (0,-1pt); + } + , + mark = at position 1 with + { + \draw[#1] (ta-base-1) -- (0,1pt); + \draw[#2] (ta-base-2) -- (0,-1pt); + } + } + } } + \tikzset{Equal/.style={-,double line with arrow={-,-}}}