6

I would really like to have an arrow which is a combination of $\hookrightarrow$ and $\twoheadrightarrow$. That is, and arrow with two heads and a hook. If anyone could help me out, it would be appreciated.

2 Answers 2

7

One way to do this is to use a \hookrightarrow followed by \to to get another head, and then decrease the space between them:

\newcommand{\bij}{\mathrel{\hookrightarrow\hspace{-1.8ex}\to}}

Thus, $A \bij B looks like this, and you can play with the spacing if you want.

enter image description here

1
  • 6
    Maybe better: \newcommand{\bij}{\hookrightarrow\mathrel{\mskip-14mu}\rightarrow}, because this will work also in subscripts/superscripts
    – egreg
    Commented Dec 6, 2015 at 0:25
5

I'd like to suggest using the \twoheadrightarrow from the amssymb package. Using this symbol avoids the overlay of two arrows, which might look emboldened when printed. Also, it scales correctly in script- and scriptscriptstyle.

\documentclass{article}
\usepackage{amssymb}
\newcommand\bij{\lhook\joinrel\twoheadrightarrow}
\begin{document}
$A \bij B_{A \bij B_{A \bij B}}$
\end{document}

enter image description here

I think, that this is very superior to any solution which inserts negative skips. Here is a screenshot of the other answer for comparison.

enter image description here

2
  • this works well with computer modern, but is it reliably available with other fonts? Commented Dec 6, 2015 at 13:49
  • @barbarabeeton It depends. The lucimatx package for instance defines an own version of \lhook and \twoheadrightarrow, so it looks really nice. The same holds for newtxmath and txfonts. One has to be careful though, as combining newtxmath with amssymb does not throw an error, but intermixes the symbols in a malicious way. Commented Dec 6, 2015 at 14:07

You must log in to answer this question.

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