Discussion:
[Xy-pic] injection
Olivier Wittenberg
2003-10-09 20:28:27 UTC
Permalink
Hello,

This time I'm trying to produce an arrow in an xymatrix which
looks like \hookrightarrow. I have no idea how to do it right.

My best attempt at it was the following:
\ar@<-0.3ex>@{^{(}->}[r]

Which is definitely not satisfactory. Any idea ?

--Olivier
Les Saper
2003-10-09 20:54:25 UTC
Permalink
Dear Olivier,

I define a tip style in the preamble:

\newdir^{ (}{{}*!/-5pt/@^{(}}% % A new tip style for right hook arrows.
% This means the object given by
% directional ^{(} has its reference point
% shifted ! by the vector /-5pt/ .

Then to produce a righthook arrow in an xymatrix I use (for
example):

\ar@{^{ (}->}[r]

Hope this helps.

- Les
Post by Olivier Wittenberg
Hello,
This time I'm trying to produce an arrow in an xymatrix which
looks like \hookrightarrow. I have no idea how to do it right.
Which is definitely not satisfactory. Any idea ?
--Olivier
_______________________________________________
xy-pic mailing list
http://tug.org/mailman/listinfo/xy-pic
-----------------------------------------------------------
Leslie Saper e-mail: ***@math.duke.edu
Department of Mathematics phone: 919-660-2843
Duke University Fax: 919-660-2821
Box 90320
Durham, NC 27708-0320
USA
Vadim Yu. Radionov
2003-10-09 21:13:26 UTC
Permalink
Dear Oliver!
Post by Les Saper
Dear Olivier,
% This means the object given by
% directional ^{(} has its reference point
% shifted ! by the vector /-5pt/ .
Then to produce a righthook arrow in an xymatrix I use (for
Hope this helps.
- Les
This is an excellent XYpic code; but it looks quite different from
\hookrightarrow. For horizontal arrows, you can type

\xymatrix{A \lhook\mkern-7mu \ar[r] & B}

together with

\entrymodifiers={+!!<0pt,\fontdimen22\textfont2>}

and similar for \hookleftarrow

Sincerely yours,
Vadim
Olivier Wittenberg
2003-10-09 23:39:12 UTC
Permalink
Post by Vadim Yu. Radionov
\xymatrix{A \lhook\mkern-7mu \ar[r] & B}
How to make the \lhook part of the arrow so that it gets rotated
if the arrow is not horizontal ?

Thanks for both suggestions, they're much better than mine. I think
a new arrow tip could be implemented in Xy-pic, though; having to
adjust the spacing manually is quite ugly.

--Olivier

Les Saper
2003-10-09 21:28:47 UTC
Permalink
Vadim,

Having the smaller hook looks very nice; thank you! Of course in
either method, users will want to include the command

\SelectTips{cm}{}

in the preamble to ensure that the arrow tips are compatible with
Computer Modern.

- Les
Post by Vadim Yu. Radionov
Dear Oliver!
Post by Les Saper
Dear Olivier,
% This means the object given by
% directional ^{(} has its reference point
% shifted ! by the vector /-5pt/ .
Then to produce a righthook arrow in an xymatrix I use (for
Hope this helps.
- Les
This is an excellent XYpic code; but it looks quite different from
\hookrightarrow. For horizontal arrows, you can type
\xymatrix{A \lhook\mkern-7mu \ar[r] & B}
together with
\entrymodifiers={+!!<0pt,\fontdimen22\textfont2>}
and similar for \hookleftarrow
Sincerely yours,
Vadim
_______________________________________________
xy-pic mailing list
http://tug.org/mailman/listinfo/xy-pic
-----------------------------------------------------------
Leslie Saper e-mail: ***@math.duke.edu
Department of Mathematics phone: 919-660-2843
Duke University Fax: 919-660-2821
Box 90320
Durham, NC 27708-0320
USA
Loading...