# 2-cells in xy-pic annoying problem

The following part of my code does not compile

\usepackage[all,2cell]{xy}
\begin{document}
\UseTwocells
\xymatrix
{     B &        {}   & {} &    C\llltwocell}
\end{document}


The funny thing is that:

\usepackage[all,2cell]{xy}
\begin{document}
\UseTwocells
\xymatrix
{     B &        {}   & {} &    C\lltwocell}
\end{document}


compile very well. As you can see the difference is the number of l-letters preceding "twocell" command Can you please tell me how can I fix it?

• Why do you think that there's a command \llltwocell? Is it documented? Otherwise, attaching characters to commands may lead to unknown commands. – Stefan Kottwitz Jun 6 '13 at 12:52
• So there is no possibility of making long two cell, since there is no such command? – user31840 Jun 6 '13 at 12:56

Your question could have been clearer but comparing \ltwocell and \lltwocell I assume you want:

\documentclass{article}
\usepackage[all,2cell]{xy}
\begin{document}
\UseTwocells
\typeout{\meaning\ltwocell}
\typeout{\meaning\lltwocell}
\typeout{\meaning\llltwocell}

\makeatletter
\def\llltwocell{\supermorphism {\xy@ {start of 2-cell}{\begingroup }\twocell@ }[0,-3]{}}
\makeatother
\xymatrix
{     B &        {}   & {} &    C\llltwocell}
\end{document}


The three typeout produce:

macro:->\supermorphism {\xy@ {start of 2-cell}{\begingroup }\twocell@ }[0,-1]{}

macro:->\supermorphism {\xy@ {start of 2-cell}{\begingroup }\twocell@ }[0,-2]{}

undefined


A solution with tikz-cd. You can just adapt the column sep to your needs. If you want, you can specify the bending radius as I did in order to get both arcs two the same height.

% arara: pdflatex

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
$\begin{tikzcd} B & C \ar[bend right, ""name=U]{l} \ar[bend left, ""{name=L, above}]{l} \ar[Rightarrow, from=L, to=U] \end{tikzcd}\vee \begin{tikzcd}[column sep=20ex] B & C \ar[bend right=14, ""name=U]{l} \ar[bend left=14, ""{name=L, above}]{l} \ar[Rightarrow, from=L, to=U] \end{tikzcd}$
\end{document}


This is an old question, but I have an answer for this which stays within the xypic package and doesn't require to define any new commands.

I don't know the reason why \llltwocell is not allowed. What you have to use is the command \xtwocell

Although I am not aware of why the syntax is like it is, because I discovered it by long ago and possibly by trial and error, you can write:

\documentclass{article}
\usepackage[all,2cell]{xy}
\UseTwocells
\begin{document}
$\xymatrix{ B&&&C\xtwocell[lll]{}{\alpha} }$
\end{document}


So if you only want the cell and not the arrows you can write \xtwocell[lll]{}<>{\alpha} or \xtwocell[lll]{}<\omit>{\alpha} these have worked the same for me without any problem.