[Xy-pic] Code for mid-arrows
Richard Dybowski
rdybowski@btinternet.com
Fri, 24 Aug 2001 11:24:42 +0100
Recently, I found myself needing a new symbol for a research paper. The
required symbol is an arrow with the head located halfway along the shaft
of the arrow; in other words, -->-- but without the gaps. Unfortunately,
this symbol is not present amongst the arrows provided by the AMS TeX
collection; therefore, I devised the following code to produce it. For the
head pointing to the right, I defined
\newcommand{\rightmidarrow}{\ensuremath{\xymatrix@1@C-4mm{\ar@{-}[r]|-{\SelectTips{cm}{}\object@{>}}&}}\xspace}
And for the head pointing to the right, I defined
\newcommand{\leftmidarrow}{\ensuremath{\xymatrix@1@C-4mm{\ar@{-}[r]|-{\SelectTips{cm}{}\object@{<}}&}}\xspace}
If anyone can think of a more eloquent way of doing this, please let me know.
The above approach is fine when used for diagrams, but one problem with the
above code is that I cannot use it to produce the midarrow symbol as a
subscript because the size remains the same. I have tried to create the
subscripted version of the symbol by combining the font symbols "-" and ">"
using the \! command (i.e. - \!\!\!\!\!\!\! >), but the result is not
satisfactory. Part of the problem here is that the "-" is too short. Is
there a TeX command to produce a horizontal line longer than "-"?
Richard
-------------------------------
Richard Dybowski, 143 Village Way, Pinner, Middlesex HA5 5AA, UK
Tel (mobile): 079 76 25 00 92