Instantly share code, notes, and snippets.

Embed
What would you like to do?
\documentclass[12pt]{standalone}
\usepackage{tikz-cd}
\usetikzlibrary{decorations.markings}
\makeatletter
\tikzcdset{
open/.code={\tikzcdset{hook, circled};},
closed/.code={\tikzcdset{hook, slashed};},
open'/.code={\tikzcdset{hook', circled};},
closed'/.code={\tikzcdset{hook', slashed};},
circled/.code={\tikzcdset{markwith={\draw (0,0) circle (.375ex);}};},
slashed/.code={\tikzcdset{markwith={\draw[-] (-.4ex,-.4ex) -- (.4ex,.4ex);}};},
markwith/.code={
\pgfutil@ifundefined{tikz@library@decorations.markings@loaded}%
{\pgfutil@packageerror{tikz-cd}{You need to say %
\string\usetikzlibrary{decorations.markings} to use arrow with markings}{}}{}%
\pgfkeysalso{/tikz/postaction={/tikz/decorate,
/tikz/decoration={
markings,
mark = at position 0.5 with
{#1}}}}},
}
\makeatother
\begin{document}
\begin{tikzcd}[sep = large]
A \ar[r, circled, "j"] \ar[dr, closed] & B \ar[r, closed, "i"] & C \ar[dl, closed']\\
F \ar[u, closed] \ar[r, markwith={\arrow{stealth}}]& D & E \ar[l, closed'] \ar[u, open'] \ar[ull, crossing over, closed']
\end{tikzcd}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment