[Xy-pic] Change the orientation of Arrow of xtwocell

Philip Hirschhorn psh at math.mit.edu
Sun Aug 25 00:24:44 CEST 2013

If you don't mind ignoring the twocell method and experimenting a bit
to aim the arrow correctly, you can just insert that double shafted
arrow by having it point from the lower node to a spot displaced from
the upper left hand node.  That is:

     {A} \ar[r]^{X} \ar[d]_{F}
     & {C}\\
     {B} \ar@{-->}[ur]_{R}
     \ar@{=>} [u]+<1.7em,-0.5ex>

That arrow at the bottom goes from the B to a spot 1.7em to the right
and 0.5ex below the node above.  It's crude (the 1.7em and -0.5ex were
found by trial and error), but it might be what you want.

Hope this helps,
Phil Hirschhorn

On Sat, 24 Aug 2013, Joe Hannon wrote:

> I'm trying to make a diagram similar to this one from wikipedia: (http://upload.wikimedia.org/wikipedia/commons/c/cb/Right_Kan_Extension.png)
> Except that I want to the 2cell double arrow $\eta$ two be pointing from node $B$ in the bottom corner toward the middle of arrow $X$ in the top row(it is, after all, a natural transformation from $RF$ to $X$), whereas the diagram on wikipedia, which I was able to duplicate using the \xtwocell command, only wants to make the 2cell point in a direction perpendicular to some line chosen by the hop argument of the xtwocell command.
> In subsection 3 (Excursions) of section 25.4 (extra options) of chapter 25 (two-cell) on page 47 of the xyrefer manual (http://www.ctex.org/documents/packages/graphics/xyrefer.pdf), it is stated 
> `\xtwocell[⟨hop⟩]{⟨displace⟩}...` connects to the ⟨pos⟩ displaced by ⟨displace⟩ from the relative cell location specified by ⟨hop⟩. The displacement can be any string of valid XY-pic commands, but they must be enclosed within a group {...}. When the cell location is the target, a null grouping {} must be given. When used with the <\omit> nudge, such excursions allow a labelled Arrow to be placed anywhere within an XY-pic diagram; furthermore the Arrow can be oriented to point in any direction.
> So it sounds like it is possible to change the orientation of the arrow using the displace argument of the xtwocell command, but I can't figure out how to do so. What "string of valid XY-pic commands" can I use to change the orientation of the 2cell Arrow, if any?
> Here's my example markup
> \xymatrix{
> A\ar[d]_F\ar[r]^X\xtwocell[1,0]{}\omit{^<-2>\eta} & C\\
> B\ar@{-->}[ur]_R &
> }
> Nothing I tried in the displace argument of \xtwocell[1,0]{} changed the arrow in any way. 
> Alternatively, I tried to use \..compositemap. This oriented the 2cell perfectly, but I could not figure out how to put a label at the common source/target of the composite arrows.
> Any tips would be appreciated.
> Regards,
> Joe Hannon
> _______________________________________________
> xy-pic mailing list
> http://tug.org/mailman/listinfo/xy-pic

More information about the xy-pic mailing list