# xypic: 2cell diagram label position issue

This code

\xymatrix{z & y\ltwocell_{f}^{g}{^{\alpha}} & x\ltwocell_{f'}^{g'}{^{\beta}}}
=\xymatrix{z &  & y\lltwocell_{f\cdot f'}^{g\cdot g'}{^{\alpha\circ\beta}}}


produced this diagram

What I want is to slide the alpha comp beta label to the right for the evident reasons, I'm quit sure there are many ways to do it and that they are all in the manual, but I didn't find the right way.

• If you replace this chunk: {\alpha\circ\beta} with {\;\;\;\;\alpha\circ\beta}, the latters and the down arrow won't overlap. Sep 1 '14 at 20:12

% arara: pdflatex

\documentclass{article}
\usepackage[all,cmtip,2cell]{xy}
\usepackage{mathtools}
\usepackage{tikz-cd}

\begin{document}
\UseTwocells
$\xymatrix{z & y\ltwocell_{f}^{g}{^\alpha} & x\ltwocell_{f'}^{g'}{^\beta}} = \xymatrix{z & & y\lltwocell_{f\cdot f'}^{g\cdot g'}{^\mathrlap{\alpha\circ\beta}}}$
$\begin{tikzcd} z & y \ar[bend right=45, ""{name=1, below}]{l}[swap]{f} \ar[bend left=45, ""{name=2, above}]{l}{g} & x \ar[bend right=45, ""{name=3, below}]{l}[swap]{f'} \ar[bend left=45, ""{name=4, above}]{l}{g'} \ar[Rightarrow, from=1, to=2, "\alpha"] \ar[Rightarrow, from=3, to=4, "\beta"] \end{tikzcd} = \begin{tikzcd} z && y \ar[bend right, ""{name=5, below}]{ll}[swap]{f\cdot f'} \ar[bend left, ""{name=6, above}]{ll}{g\cdot g'} \ar[Rightarrow, from=5, to=6, "\alpha\circ\beta"] \end{tikzcd}$
\end{document}


I cannot understand why it doesn't work, but this code seems to work perfectly:

\documentclass{article}
\pdfoutput1
\input diagxy

\begin{document}

$$\bfig \morphism|a|/{@{<-}@/^10pt/}/[zy;f] \morphism|b|/{@{<-}@/_10pt/}/[zy;g] \morphism(250,120)|r|/=>/<0,-200>[;\alpha] \morphism(500,0)|a|/{@{<-}@/^10pt/}/[yx;f'] \morphism(500,0)|b|/{@{<-}@/_10pt/}/[yx;g'] \morphism(750,120)|r|/=>/<0,-200>[;\beta] \place(1100,0)[=] \morphism(1200,0)|a|/{@{<-}@/^10pt/}/<1000,0>[zx;f\cdot f'] \morphism(1200,0)|b|/{@{<-}@/_10pt/}/<1000,0>[zx;g\cdot g'] \morphism(1700,120)|r|/=>/<0,-200>[;\alpha\circ\beta] \efig$$

\end{document}


It should be noted that diagxy is a front end to Xy-pic that is now an option (called barr, not the name I would have chosen) in the latest version. It can be intermixed with any Xy-pic code, the only thing to remember being that the \unitlength parameter is made much smaller to allow finer control and any Xy-pic code mixed in must be adjusted accordingly. There is a tutorial along with called diaxydoc.tex that must be read.

Okay, as no one seems to know how to fix it. A (not very clean) hack is to add spaces before $\alpha \circ \beta$

• Another hack that is probably cleaner (if it works) is to enclose \alpha \circ \beta in \mathrlap{...}. This may require using the mathtools` package. Oct 3 '13 at 20:02