I want to define 3 commands similar to \vec
. The first, \Mono
, must place over the argument an arrow just like in \vec
, but with another arrowhead in the beginning of the arrow, and also pointing rightwards. This is to represent injections or monomorphisms.
The second,\Epi
, must place over the argument an arrow just like in \vec
, but with two arrowheads in the end of the arrow, both pointing rightwards. This is to represent surjections or epimorphisms.
The third, \Iso
, must place over the argument an arrow just like in \vec
, but with another arrowhead in the beginning of the arrow, but pointing leftwards. This is to represent bijections or isomorphisms.
My first attempt was to define the following commands
\newcommand{\Mono}[1]{\overset{\rightarrowtail}{#1}}
\newcommand{\Epi}[1]{\overset{\twoheadrightarrow}{#1}}
\newcommand{\Iso}[1]{\overset{\leftrightarrow}{#1}}
But these commands create too much space between the letter in the argument and the arrows above them, and the arrows themselves are too big. Ideally, I would like to know how \vec
is defined and also to have commands that behave well in superscripts etc.