add fix for equal arrows in tikz-cd

This commit is contained in:
Maximilian Keßler 2022-06-27 16:02:01 +02:00
parent c939483b42
commit b7ba678943

View File

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