From b7ba678943aae7a865556f4295a4509fb3f9bd7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Mon, 27 Jun 2022 16:02:01 +0200 Subject: [PATCH] add fix for equal arrows in tikz-cd --- src/math/mathfig/mathfig.pysty | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/math/mathfig/mathfig.pysty b/src/math/mathfig/mathfig.pysty index ab8974d..d791492 100644 --- a/src/math/mathfig/mathfig.pysty +++ b/src/math/mathfig/mathfig.pysty @@ -42,3 +42,29 @@ __HEADER__(Math figures with TikZ / pgfplots / xy) \NewDocumentCommand\pullback{ O{dr} }{ \arrow[phantom, pos=0.45]{#1}{\pullbacksymbol} } + + +%% 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); + } + } + } +} +\tikzset{Equal/.style={-,double line with arrow={-,-}}}