7

In tikz-cd, I would like to combine hookleftarrow and two heads. It works just fine to write \arrow[hook, two heads]{r}, but if this arrow runs leftwards instead (with {l} instead of {r}) then the hook goes downwards instead of upwards, and \arrow[hookleftarrow, two heads]{r} just gives something like $<--->>$. So I would also be happy with a way of either reflecting an arrow or rotating it by 180 degrees.

Troy
  • 13,741
  • this probably doesn't belong here, but i also don't feel like making a question for it. why do "two heads" and "->>" look different? – peter Feb 01 '21 at 12:30

2 Answers2

6

Is this acceptable? I used \usetikzlibrary{arrows} to use syntax from arrows library to construct the left-ward double hook manually.

I also included the normal rightward hook for reference.

left double hook

\documentclass[]{article}
\usepackage{tikz-cd}
\usetikzlibrary{arrows}

\begin{document}
        \begin{tikzcd}
         A \arrow[cm double to - cm left hook]{r} & B
        \end{tikzcd}

    \begin{tikzcd}
        A \arrow[hook, two heads]{r} & B
    \end{tikzcd}
\end{document}
Troy
  • 13,741
6

You can use hook':

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

\begin{document}

\begin{tikzcd}
A & B \arrow[l,hook,two heads] \arrow[r,hook] & C \\
A & B \arrow[l,hook',two heads] \arrow[r,hook,two heads] & C \\
\end{tikzcd}

\end{document}

enter image description here

egreg
  • 1,121,712