7

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?

1 Answer 1

8

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

5
  • 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.) Commented Feb 26, 2016 at 18:21
  • @barbarabeeton Piece of cake. ;-)
    – egreg
    Commented Feb 26, 2016 at 18:31
  • yup.. stolen from plain.tex + amscd.sty no doubt. (well, that's where i would have stolen it from.) Commented Feb 26, 2016 at 18:39
  • @barbarabeeton Actually the inner part could simply be \xrightarrow[#1]{#2}
    – egreg
    Commented Feb 26, 2016 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.) Commented Feb 26, 2016 at 18:42

You must log in to answer this question.

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