[Xy-pic] Xypic infinite loop
Ross Moore
ross at ics.mq.edu.au
Wed Mar 12 00:55:09 CET 2008
Hello Richard,
On 06/03/2008, at 7:53 PM, Richard Garner wrote:
>
> Dear all,
>
> Below is a minimal example of a tex file which seems to send xypic
> into an
> infinite loop, leading to a stack overflow.
Yes, it does indeed.
>
> ----
>
> \documentclass{article}
> \usepackage[arrow, matrix]{xy}
>
> \begin{document}
> \[
> \xymatrix{
> **{!/l 10em/} a \ar[r] & b
> }
> \]
> \end{document}
>
> ----
>
> The problem seems to go away if:
>
> - you remove the \ar[r];
> - you change the /l 10em/ to any other <vector> (cf. xyrefer, p.8);
> - you add the option \CompileMatrices to the preamble.
>
> I think this may be a bug in xypic. Does anyone have any
> suggestions?
>
I've traced the problem to how the \xy@@ix@ macro
is redefined at different stages of the processing.
The problem only occurs when there are object-modifiers,
specified using &**{....} and perhaps not all modifiers
are affected, but sliding most certainly is.
Put the following coding into your (LaTeX) document preamble,
after the Xy-pic package has been loaded.
\makeatletter
\def\matrixobject@{%
\edef \next@{={\DirectionfromtheDirection@ }}%
\expandafter \toks@ \next@ \plainxy@
\let\xy@@ix@=\xyq@@toksix@
\xyFN@ \OBJECT@}
\let\xy at entry@@norm=\entry@@norm
\def\entry@@norm at patched{%
\let\object@=\matrixobject@
\xy at entry@@norm }
\AtBeginDocument{\let\entry@@norm\entry@@norm at patched}
\makeatother
It certainly fixes your example.
Hopefully it will not introduce errors in other situations.
Kris Rose, if you are listening, there is quite a problem here
that needs fixing. Contact me please, so we can discuss whether
the above patch has any hidden land-mines.
> Thanks,
>
> Richard
Hope this helps,
Ross
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 +2 9850 8955
Sydney, Australia 2109 fax: +61 +2 9850 8114
------------------------------------------------------------------------
More information about the xy-pic
mailing list