I would like to place an arrow tip in the middle of an arrow, like one does in TikZ with markings
, but in a tikz-cd
diagram. The documentation seems not to tell me anything about how to achieve this. I thought of using \to
as a description
. I haven't tried that yet, and it may work fine, but it seems cumbersome to use a label description to achieve a mid-arrow tip. Is there a more semantically proper way to do this?
1 Answer
tikz-cd
is still Tikz, so you can use \tikzset
to set up a style for the middle arrow. Of course, this means that markings
works as well.
Output
Code
\documentclass[margin=10pt]{standalone}
\usepackage{tikz-cd}
\usetikzlibrary{decorations.markings, arrows.meta}
\tikzset{
marrow/.style={decoration={markings,mark=at position 0.5 with {\arrow{#1}}}, postaction=decorate}
}
\begin{document}
\begin{tikzcd}
a \ar[rrr, marrow=>] & & & b \\[2mm]
c \ar[rrr, -Latex, marrow=Latex] & & & d
\end{tikzcd}
\end{document}
pstricks
…