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={-,-}}}