I am trying to make a diagram in xy-pic with the xy-matrix environment where I need to have a node which is product of sets like, but I always seem to get a compilation error when I try to use the command for products within an xymatrix environment:
\documentclass{memoir}
\usepackage{kpfonts}
\usepackage[all]{xy}
\CompileMatrices
\usepackage{amssymb,amsmath,amsfonts}
\begin{document}
\begin{equation}
\xymatrix{
\prod_{i:I} A_i \ar@<-.5ex>[r]_c \ar@<.5ex>[r]^d & \prod_{j:J} A_j
}
\end{equation}
\end{document}
But when I try to compile this I get the error:
! Undefined control sequence.
<argument> ...COORD@ =\xymatrixCOORD@ \prodop \kp
@slimits _{i:I} A_i \ar @<...
l.19 \xy@{\save }{\save@ }
%
Any help with how to get this working is much appreciated since I haven't been able to find anyone here with similar problems.
EDIT: After having messed around with the code, it seems like the error arises because of the \CompileMatrices
command in the preamble.
\begin{document}
in its proper place and adding say\documentclass{article}
, then your MWE compiles for me. What exactly is your question?\documentclass{article}
and moving\begin{document}
to the proper place, I get no error from the example. The error message suggests you're using thekpfonts
package: please make a better example.