[Xy-pic] Xy-pic with cyrtex

Dmitry Pavlov dmitry.pavlov at gmail.com
Sat Jun 3 12:02:41 CEST 2006


Hello Ross,

> The problem on loading the Xy-pic package is due to the fact that
> Cyr-TeX has redefined the TeX primitive  \lowercase .
> viz.  these lines from the CyrTeX source coding:
> plainenc.tex:101:% support for uppercase/lowercase
> plainenc.tex:103:\let\@lowercase\lowercase

Thanks for pointing on that!

> So before you do   \input xy
> it is necessary to revert the meaning of  \lowercase  to its original
> value;
> e.g.
>    \let \cyrtexlowercase \lowercase
>    \catcode`\@ 11
>    \let \lowercase \@lowercase
>    \catcode`\@ 12
>    \input xy
>    \let \lowercase \cyrtexlowercase

I found a nice macros in plainenc.tex: \PROTECT and \UNPROTECT,
which save and restore \lowercase, \uppercase, \edef and \xdef,
just like in the workaround you proposed.

> Please try it with a real example, and report back on your results.

The following example is compiled correctly in cyrtex:

--- test.tex
\UNPROTECT
\input xy
\xyoption{all}
\PROTECT

\centerline{\xymatrix{
     U \ar@/_/[ddr]_y \ar@/^/[drr]^x
       \ar@{.>}[dr]|-{(x,y)}            \\
      & \hbox{X} \times_Z Y \ar[d]^q \ar[r]_p
                     & X \ar[d]_f       \\
      & Y \ar[r]^g   & Z                }}
\bye
---

A real texfile is also compiled well. Thank you.

[offtopic]
By the way, do you have an idea why miniltx package does not load in cyrtex
even inside \UNPROTECT .. \PROTECT ?
The following file:

\UNPROTECT
\input miniltx
\PROTECT

Gives an error:
/usr/share/texmf-tetex/tex/plain/graphics/miniltx.tex
Illegal parameter number in definition of \@yargdef.
<to be read again>
                   \relax
l.170   \let\@hash@\relax

regards,
                            Dmitry


More information about the xy-pic mailing list