5

What's wrong with the following?

\documentclass{amsart}
\usepackage[all]{xy}
\begin{document}
\xymatrix{
        \text{Long string of text that causes an error during the compilation of this document} \\
        X
}
\end{document}

Strangely if there's no second row it compiles fine.

5

It seems to be a deficiency of xypic, this problem with simple but wide matrix cells. As a workaround, you could reduce the width as xy sees it, if the other parts of the matrix wouldn't be affected, such as with \makebox:

\xymatrix{
        \makebox[.8\textwidth][l]{Long string of  that causes an error during the 
                                  compilation of this document}\\% not any more
        X
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.