I have some symbol for homomorphisms with a certain property "property" whose code is something like


(The idea is to insert the word "property" above the arrow. Of course "property" is just a dummy word, for the purpose.)

Now I use the symbol \twoheadrightarrow to indicate that a homomorphism is surjective.
If the homomorphism happens to be surjective and have property "property", I'd like to add "property" above the arrow like before.

This is done more or less right, except that, when above \twoheadrightarrow, I get the text a bit higher than with \rightarrow.

A solution that came to my mind was to use a \raisebox. However, this is even worse, because (I suppose this is the reason) it creates a new box that 'forgets' that it is inside the \overset scope and prints the name of the property in normal size.

Is there a better way of doing this?

(I really don't know if I choose the tags correctly. Please feel free to edit.)

  • 1
    Do you know about \xrightarrow{\text{property}} and family? You may find one already defined with two heads, or, if not, you could define them yourself. About the different vertical position, I've had problems myself and don't know the answer (this has to do with how TeX core behaves with \halign and other primitives), but you can always use \text or \scriptstyle when needed to get the right size. – Manuel Sep 25 '16 at 9:57
  • 1
    @Manuel Since you seem to have run into the same problem, I would like to recommend you to take a look at this post (tex.stackexchange.com/questions/260554/…), with answers that solved my problem. Maybe it will also help to improve your writing :) – amrsa Sep 25 '16 at 10:37

Instead of creating your own \verylongrightarrow macro, I'd like to suggest that you either use \xrightarrow or load the extarrows package and use its \xlongrightarrow macro. Arrows produced by \xlongrightarrow are slightly longer than those produced by \xrightarrow.

Note that with \xrightarrow and \xlongrightarrow one needn't decide in advance how many \relbars should be employed in the long arrow. Moreover, with these macros there is no risk of the letter "y" in the word "property" tangling with the arrow head.

enter image description here



$u\hompropa v$

$u\hompropb v$
| improve this answer | |
  • 1
    You don't answer exactly what I asked for (text to high with double-head arrow), but the reference to xrightarrow led me to search in that particular direction, and find here: tex.stackexchange.com/questions/260554/… two very nice answers. Your answer was useful (in other contexts) and also led me to the precise answer I was looking for. Therefore, I accepted it. Thanks a lot! – amrsa Sep 25 '16 at 10:34
  • @amrsa - Aah, I had indeed missed the part about the two-headed arrow part. Glad you found the posting that mentions the directive \xtwoheadrightarrow of the extpfeil package. – Mico Sep 25 '16 at 10:43

This is specific to the default font (I don't have this flaw using Minion Pro). A workaround consists in ‘smashing’ the \twoheadrightarrow. However, I propose a variant: defining an extensible double head right arrow which behaves like \xrightarrow, with one argument above the arrow, and one optional argument under the arrow, both in \scriptsize. This is documented in § 38 of the Mathmode guide.

On this basis I defined a \xhompropand a \xhomontoprop commands. You can see n the following code both solutions:

\usepackage{amsfonts, amssymb, latexsym}
\usepackage{lmodern, mathtools}

  \ext@arrow 0099\xtwoheadfill@{#1}{#2}%
  \arrowfill@\relbar\relbar{\mathrel{\vphantom{ → }\smash{\twoheadrightarrow}}}
\newcommand*{\verylongrightarrow}{\relbar\joinrel\relbar\joinrel\relbar\joinrel → }

\newcommand*{\verylongtwoheadrightarrow}{\vphantom{ → }\smash{\relbar\joinrel\relbar\joinrel\relbar\joinrel\twoheadrightarrow}}


\[ \begin{array}{l@{\qquad}ll}
  \homprop & \homontoprop \\
  \xrightarrow{\text{property}} & \xtwoheadrightarrow{\text{property}}
  \end{array} \]


enter image description here

| improve this answer | |
  • 1
    Yes, this is what I did. See my comment to Mico's answer. Thanks (and +1). – amrsa Sep 25 '16 at 11:06

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.