# [Xy-pic] xy-pic conflicts with Babel?

Aivo Jürgenson kala at tux.linux.ee
Sat Apr 15 08:42:17 CEST 2006

Hi,

Thanks for this explanation. Although the proposed fix to load Xy-pic
after other packages do not work and still gives the same error message,
I was able to find another solution from
http://www.tug.org/TeXnik/mainFAQ.cgi?file=misc/misc

"xypic and babel
The xy-package redefines the catcode for " which causes problems with
babel. So still use it in the following way:

\shorthandoff{"}
% xypic stuff
\shorthandon{"}"

So, the following test-file works fine:

\documentclass{article}
\usepackage[estonian]{babel}
\usepackage[all]{xy}
\begin{document}
\shorthandoff{"}
\xy
\xygraph{
}
\endxy
\shorthandon{"}
\end{document}

On Sat, 15 Apr 2006, Henning Makholm wrote:

> Scripsit Aivo Jürgenson <kala at tux.linux.ee>
>
> > It seems that I have found the conflict between xypic and babel
> > packages. The following file
>
> It is well known. The problem is that Babel changes the catcode of the
> " character, but so when the Xy-pic parser compares the "s in your
> picture to the " tokens that were created when xy.tex were read, they
> have different catcodes, and you get a parse error.
>
> The cure is to load Xy-pic _after_ other packages (such as Babel) that
> do catcode tricks.
>
> --
> Henning Makholm                                    "*Vi vil ha wienerbrød!*"
>