[Xy-pic] Problem with skewing(?)
Ross Moore
ross at ics.mq.edu.au
Mon Mar 29 10:15:29 CEST 2004
Hi Richard,
On 28/03/2004, at 11:41 AM, Ross Moore wrote:
> Thirdly:
>
> the \xybox does not allow control over *where*,
> inside the <object> that it builds,
> the reference point is to be located.
>
> Accordingly, I've just devised a variant that builds
> the same kind of compound <object>, but also sets
> its reference-point to be at the <coord> of the
> last <POS> within the box; i.e., the <coord> for
> the <object> that has been built is at the current
> <POS> when the Xy-pic parsing has been completed.
> The LRUD extents are the size of the complete box;
> i.e., *not* the extents of the final <POS>.
I've now managed to trace the reason that this (and
the previous efforts) didn't work with some of your
examples, but generated infinite looping.
Some control-sequence names associated with constructing
arrows/paths need to be re-initialised.
Appropriate coding is given below.
>
> Here is coding that should go in your document's
> preamble -- eventually it should be added to xy.tex
>
>
> --------- start of new Xy-pic definitions -------
>
> \makeatletter % adjust the \catcode of @
% this is a better definition for the new \xyobjbox
\xydef@\xyobjbox#1{\xy
\let \PATHafterPOS\PATHafterPOS at default
\let \arsavedPATHafterPOS@@\relax
\let\afterar@@\relax
\POS#1\endxyobj\Edge at c={\rectangleEdge}\computeLeftUpness@}
> \xydef@\endxyobj{\if\inxy@\else\xyerror@{Unexpected \string\endxy}{}\fi
> \relax
> \dimen@=\Y at max \advance\dimen at -\Y at min
> \ifdim\dimen@<\z@ \dimen@=\z@ \Y at min=\z@ \Y at max=\z@ \fi
> \dimen@=\X at max \advance\dimen at -\X at min
> \ifdim\dimen@<\z@ \dimen@=\z@ \X at min=\z@ \X at max=\z@ \fi
> \edef\tmp@{\egroup
> \setboxz at h{\kern-\the\X at min \boxz@}%
> \ht\z@=\the\Y at max \dp\z@=-\the\Y at min \wdz@=\the\dimen@
> \noexpand\maybeunraise@ \raise\dimen@\boxz@
> \noexpand\recoverXyStyle@ \egroup \noexpand\xy at end
> \U at c=\the\Y at max \advance\U at c-\the\Y at c
> \D at c=-\the\Y at min \advance\D at c\the\Y at c
> \L at c=-\the\X at min \advance\L at c\the\X at c
> \R at c=\the\X at max \advance\R at c-\the\X at c
> }\tmp@}
>
> \makeatother % revert \catcode of @
>
> --------- end of new Xy-pic definitions -------
>
>>
>> %%% This one gives an infinite loop
>> %% \xygraph{!Z{3cm}{3cm}
>> %% !S{11111111}23 (?:[r] !S{1}{222222}{3},
>> %% ?:[d] !S{1}{2}{333333})
>> %% }
This example now works as expected.
> Hmm.
> This is hard to trace.
> I'm still working on it.
>
>>
>> %%% This one also runs forever
>> %% \xygraph{!Z{3cm}{3cm}
>> %% !S{11111111}{2}{3}="start"
>> %% "start":[r] !S{1}{222222}{3}
>> %% "start":[d] !S{1}{2}{333333}
>> %% }
... and this one too.
Best regards,
Ross
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 +2 9850 8955
Sydney, Australia fax: +61 +2 9850 8114
------------------------------------------------------------------------
More information about the xy-pic
mailing list