6

It is quite easy to generate an arrow with a double head and a hooked tail using tikz-cd, but I would quite like a way to do this inline. I can't find a specific LaTeX command (I've read through a lot of those 'list of all symbols' lists). Does anybody have any suggestions?

6

Set a hook arrow, back up and set a standard arrow:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\hookdoubleheadrightarrow}{%
  \hookrightarrow\mathrel{\mspace{-15mu}}\rightarrow
}

\begin{document}

$A \hookdoubleheadrightarrow B_{A \hookdoubleheadrightarrow B}$

\end{document}

enter image description here

Extensible version:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\hookdoubleheadrightarrow}{%
  \hookrightarrow\mathrel{\mspace{-15mu}}\rightarrow
}

\makeatletter
\newcommand{\xhookdoubleheadrightarrow}[2][]{%
  \lhook\joinrel
  \ext@arrow 0359\rightarrowfill@ {#1}{#2}%
  \mathrel{\mspace{-15mu}}\rightarrow
}
\makeatother


\begin{document}

$A \hookdoubleheadrightarrow B_{A \hookdoubleheadrightarrow B}$

$A \xhookdoubleheadrightarrow{aaaaaa} B$

\end{document}

enter image description here

  • works just great as long as it doesn't have to be lengthened. (i was sure this had been answered before, but i couldn;t find it. don't worry, i gave it +1.) – barbara beeton Feb 26 '16 at 18:21
  • @barbarabeeton Piece of cake. ;-) – egreg Feb 26 '16 at 18:31
  • yup.. stolen from plain.tex + amscd.sty no doubt. (well, that's where i would have stolen it from.) – barbara beeton Feb 26 '16 at 18:39
  • @barbarabeeton Actually the inner part could simply be \xrightarrow[#1]{#2} – egreg Feb 26 '16 at 18:40
  • yup. i think you may know amsmath better than i do. (on the other hand, you actually use it; i only have to vet authors' problems.) – barbara beeton Feb 26 '16 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.