4

I tried using the \rtwocell command to produce twocells in a commutative diagram and my LaTeX installation (TeX Live on a Mac) does not recognize it. It seems to recognize everything else I have tried with xypic. Are there are known issues with xypic on TeX Live?

This is the example I tried:

\documentclass[11pt]{article}
\usepackage[all,2cell]{xy}
\begin{document}
\[ \xymatrix{A\rtwocell^f_g{\eta}& B} \]
\end{document} 

This is the error that is produced

! Undefined control sequence.
<argument> \xyeatall@ \everyentry@ A\rtwocell 
                                              ^f_g{\eta }
l.4 \[ \xymatrix{A\rtwocell^f_g{\eta}& B}
                                          \]
egreg
  • 1,121,712
Prakash
  • 101
  • Please, next time add the code and the error message to the question, rather than in comments. Looking forward for other contributions from you on the site. – egreg May 10 '12 at 14:14

1 Answers1

2

As the manual says in a rather hidden place, you have to say

\UseTwocells

after loading xy (page 44).

\documentclass[11pt]{article}
\usepackage[all,2cell]{xy}
\UseTwocells

\begin{document}
\[ \xymatrix{A\rtwocell^f_g{\eta}& B} \]
\end{document} 

See also https://tex.stackexchange.com/a/41784/4427

There should be a new syntax for two-cells, but unfortunately the manual doesn't describe it.

egreg
  • 1,121,712
  • Thanks, I did not see that hidden place. Next time I will post the example with the question. Thanks again. – Prakash May 10 '12 at 14:29
  • @PrakashPanangaden It's so well hidden that every time I need to read the manual for finding it. :) – egreg May 10 '12 at 14:36