I'm trying to recreate example 2 from the xypic reference manual (http://mirrors.ctan.org/macros/generic/diagrams/xypic/doc/xyrefer.pdf p.43 )
\diagram
A\ruppertwocell^f{\alpha}
\rlowertwocell_h{\beta}
\rto_(.35)g & B\\
\enddiagram
I got the first example working in the following manner with inspiration from Natural transformation arrow
\documentclass{article}
\usepackage[all,cmtip,2cell]{xy}
\UseTwocells
\xyoption{2cell}
\begin{document}
$$
\xymatrix@C+2pc{
A \rtwocell<6>^{f}_{g}{\;\;\;\alpha} & B}
$$
\end{document}
But just pasting the second example gives me
! Undefined control sequence.
l.15 \diagram
and changing \diagram to \xymatrix@C+2pc{... as above gives me:
...
(/usr/share/texlive/texmf-dist/tex/generic/xypic/xy2cell.tex
Xy-pic option: Two-cell feature v.3.7 not reloaded) (./test2cells.aux)
<xymatrix 2x1 20> <xymatrix
! Undefined control sequence.
<argument> ...atall@ \everyentry@ A\ruppertwocell
^f{\alpha } \rlowertwocell...
l.19 \rto_(.35)g & B}
$$
What is the proper way to get this to work in xy-pic? Should I really be using the diagrams package?

xymanual which you reference includes "Bug: This document still uses version 2-style commmands, as described in appendix B." looking at Appendix B,xyoption{v2}should be used although this only shifts the error. – Dai Bowen Nov 20 '16 at 20:50