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.
Asked
Active
Viewed 5,242 times
7
Troy
- 13,741
Aaron Mazel-Gee
- 185
-
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 Answers
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.
\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
-
This is great! Thanks a bunch -- and thanks for cleaning up the question too :o) – Aaron Mazel-Gee May 10 '17 at 07:12
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}
egreg
- 1,121,712

