[Xy-pic] Conflict between xymatrix and 12pt ?
Ross Moore
ross.moore at mq.edu.au
Mon Nov 1 00:48:39 CET 2010
Hi Robert, and any others interested in this problem,
On 01/11/2010, at 6:52 AM, Ross Moore wrote:
> Hi Robert,
>
> On 01/11/2010, at 6:34 AM, Robert Seely wrote:
>
>> It seems there may be a conflict between xymatrix and 12pt style, as
>> indicated by the following sample file:
>>
>> %%%%%%%%%%%%%%%%%%
>>
>> \documentclass[12pt]{article}
>>
>> \input xy
>> \xyoption{all}
>>
>> \begin{document}
>>
>> \[
>> \xymatrix at R=10pt at C=5pt{ x_1 & & x_2 \\
>> & *-[o]{\bullet} \ar@{-}[ul] \ar@{-}[ur] \\
>> }
>> \]
>>
>> \end{document}
>>
>> %%%%%%%%%%%%%%%%%%%%
>>
>> This terminates with an error message:
>>
>> Xy-pic Warning: division overflow [testac:13].
>>
>> ! Arithmetic overflow.
>> <recently read> \quotPTK@
>>
>> HOWEVER: this doesn't appear to be a problem with xypic in general,
>> since if one uses Michael Barr's diagxy "front-end" to xypic, all is
>> fine. Eg, the following file TeXs just fine.
>
> The problem is caused by your use of:
>
>> *-[o]{\bullet}
>
>
> presumably to reduce the size of the <object> with
> the bullet. Change this to: *=0[o]{\bullet}
> and the problem goes away.
I've traced it further.
You can also solve the problem by removing the '[o]'.
For an object that is so small, after having reduced its size
using the '-', there is no point setting its shape to be circular.
In fact, since the \bullet character is not entirely symmetrical,
Xy-pic uses the \ellipseEdge@ method, rather than the simpler
\circleEdge@ one.
This is a more complicated calculation, and since we need to
determine the distance to the margin at the particular angle,
and that margin is very small (almost zero) anyway, there is
a division required, where the division is by a very small number.
Xy-pic realises that the denominator is too small to be divided by,
and get a sensible answer, so throws up the error message.
I'm trying to determine if the smallness of the margin could
have been detected earlier in the coding, to avoid going down
this path. The idea would be to force the \Edge@ for the objevct
to be \zeroEdge rather than \circleEdge . Then there'll be no
need to worry about the margin at all.
Another solution would be to use Xy-pic's filled circled: *@{*}
as the node object.
There is a slight problem in that within an \xymatrix
the code: &*@{*} seems to fail.
It can be fixed by using: &\relax\POS *@{*} .
(This works by halting TeX's look-ahead when encountering
a cell in an \halign or \ialign alignment.)
Friendlier would be to define a macro:
\def\gnode{\relax\POS *@{*}}
and use
&\gnode
for matrix cells containing only such a node.
>
> I'm guessing that *- subtracts too much (or too little),
> leaving a negative width or height, or some tiny size
> for the margin when you might as well have none at all.
Hope this helps,
Ross
------------------------------------------------------------------------
Ross Moore ross.moore at mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 (0)2 9850 8955
Sydney, Australia 2109 fax: +61 (0)2 9850 8114
------------------------------------------------------------------------
More information about the xy-pic
mailing list