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
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.
-
6Maybe better:
\newcommand{\bij}{\hookrightarrow\mathrel{\mskip-14mu}\rightarrow}
, because this will work also in subscripts/superscripts– egregDec 6, 2015 at 0:25
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}
I think, that this is very superior to any solution which inserts negative skips. Here is a screenshot of the other answer for comparison.
-
this works well with computer modern, but is it reliably available with other fonts? 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 fornewtxmath
andtxfonts
. One has to be careful though, as combiningnewtxmath
withamssymb
does not throw an error, but intermixes the symbols in a malicious way. Dec 6, 2015 at 14:07