I would like to have a symbol that looks like the symbol \rightleftarrows from amssymb, but I want the morphism to the right to be a twoheadrightarrow and the morphism to the left to be a hookleftarrow. Can you help me?
-
1Could you draw a picture for exaction? I think, there are several options for this.– cisJul 7, 2014 at 19:38
-
Please have a look into the comprehensive symbol list: mirrors.ctan.org/info/symbols/comprehensive/symbols-a4.pdf, with a lot of arrow symbols, perhaps the one you look for is listed there.– user31729Jul 7, 2014 at 19:48
-
Thank you. Meanwhile, I also found tex.stackexchange.com/questions/65017/…, which seems to be a good solution.– PupsJul 7, 2014 at 19:50
-
\newcommand\retraction{\ensuremath{\begin{array}{c} \displaystyle\twoheadrightarrow\[-7pt] \displaystyle\hookleftarrow\end{array}}} scheint das gewünschte zu leisten. Allerdings würde ich das Pfeilpaar gerne in einer Überschrift verwenden, bekomme aber bisher lauter Fehlermeldungen. Hat jemand einen Tipp?– PupsJul 7, 2014 at 20:00
-
1@RooibosTee: Ok,but we have no idea what you want to achieve: Please post an image in your question.– user31729Jul 7, 2014 at 20:15
2 Answers
The arrowheads of \twoheadrightarrow
are quite different from the arrowhead of \hookleftarrow
; here's a solution that makes up a two head right arrow from two \rightarrow
.
\documentclass{article}
\usepackage{amsmath,calc}
\makeatletter
\newcommand{\retraction@inner}[2]{%
\vcenter{\offinterlineskip
\halign{%
##\cr
$\m@th#1\hookleftarrow$\cr
\makebox[\widthof{$\m@th#1\hookleftarrow$}][s]{%
$\m@th#1\mkern-.5mu\to\hss\to\mkern-.5mu$%
}\cr
}%
}%
}
\DeclareRobustCommand{\retraction}{%
\mathrel{\mathpalette\retraction@inner\relax}%
}
\makeatother
\begin{document}
$A\retraction B_{\retraction}$
\end{document}
-
Thank you. This even works within a \section{...}, which is fine, even though I'm not exactly sure why it does...– PupsJul 7, 2014 at 22:23
-
-
@egreg -- much nicer than mine. but does it matter here to the meaning which is above and which below? (i've always assumed that it usually does.) Jul 8, 2014 at 14:24
-
@barbarabeeton I've never cared; in this case the hook arrow is best placed above because of the relative shapes.– egregJul 8, 2014 at 14:27
here's my attempt, using a technique stolen from the \substack
command in amsmath
.
the arrow without the tail is a bit shorter than the other, since the tail is simply added onto tn existing arrow (and they're all the same length), so i've used the minus sign (as traditional with computer modern) to extend it a bit.
this version will scale to the current size, since it might appear in a footnote
(smaller), or possibly a heading (larger), with the use of ex
(vertical) and
mu
(horizontal) units.
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\newcommand\retraction
{\ensuremath{\mathrel{\subarray{c}
\mkern.7mu{-}\mkern-12mu\twoheadrightarrow\\[-.55ex]
\hookleftarrow\endsubarray}}}
\begin{document}
\[
A \retraction B
\]
\Large
\[
A \retraction B
\]
\small
\[
A \retraction B
\]
\end{document}
-
Argument braces are missing for
\ensuremath
. In text mode only token\mathrel
is put into math mode. Jul 7, 2014 at 21:52 -
@HeikoOberdiek -- right. thanks. (i never use
\ensuremath
, but i should really know better what the syntax should be.) fixed. Jul 8, 2014 at 14:21