2

arrow without body

I would like to draw the arrow above on the right, which is the same as the arrow above on the left without the body. tikz-cd gives options to draw no head (no head), and tails are not drawn by default, but there does not appear to be an option to draw no body. How can this be achieved?

If it is possible to change the arrowhead and tail colour separately from the body, this would be one possible solution, by using draw=none for the body and then overriding the head and tail colours, but I have not been able to find information about this either.

\documentclass{article}

\begin{document}

\begin{tikzcd}
    A & B
    \arrow[from=1-1, to=1-2, hook]
\end{tikzcd}

\end{document}

1 Answer 1

2

I have a potential solution, though if there are more idiomatic ways to achieve this, I would still like to hear them.

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
    A & B
    \arrow[from=1-1, to=1-2, hook, dash pattern=on 0 off 1mm]
\end{tikzcd}

\end{document}

produces:

arrow without body

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .