# [Xy-pic] Compilation error:

Ross Moore ross at ics.mq.edu.au
Thu Dec 13 04:24:54 CET 2007

Hello Lars,

On 12/12/2007, at 10:20 PM, Lars Peter Cleary wrote:

> Hi all
>
> I have some trouble compiling this bit of added code (without it it
> works):
>
> \xymatrix{
>  & & & & & & & {\circ} \ar@{-}[dl]_\frac{1}{2} \ar@{-}[dr]^\frac{1}{2}

You cannot set a complicated object, such as a fraction,
as a label in this way. It has to be:

\ar@{-}[dl]_{\frac{1}{2}}  \ar@{-}[dr]^{\frac{1}{2}}

using extra braces.
Otherwise the  \frac  will end up being used in a place
quite apart from its arguments, thus triggering the kind
of messages that you are seeing.

> & & & & & & & \\
>  & & & *+[F]\txt{L1} \ar@{-}[dl]_\frac{1}{2} \ar@{-}[dr]^\frac{1}{2} &
> & & & & & & & *+[F]\txt{L2} \ar@{-}[dl]_\frac{1}{4}
> \ar@{-}[dr]^\frac{3}{4} & & & \\
>  & & *+[o][F-]\txt{G} \ar@{-}[dl]_1 \ar@{-}[dr]^1 & & *+[o][F-]\txt{V}
> \ar@{-}[dl]_1 \ar@{-}[dr]^1 & & & & & &
>  *+[o][F-]\txt{G} \ar@{-}[dl]_1 \ar@{-}[dr]^1 & & *+[o][F-]\txt{V}
> \ar@{-}[dl]_1 \ar@{-}[dr]^1 & & \\ & *+[F]\txt{L1}
> \ar@{-}[dl]_\frac{1}{2} \ar@{-}[dr]^\frac{1}{2} & & & &
>  *+[F]\txt{L2} \ar@{-}[dl]_\frac{1}{4} \ar@{-}[dr]^\frac{3}{4} & & &
> *+[F]\txt{L2} \ar@{-}[dl]_\frac{1}{4}
>  \ar@{-}[dr]^\frac{3}{4} & & & & *+[F]\txt{L1} \ar@{-}[dl]_\frac{1}{2}
> \ar@{-}[dr]^\frac{1}{2} & \\
> *+[o][F-]\txt{G} & & *+[o][F-]\txt{V} & & *+[o][F-]\txt{G} &
> *+[o][F-]\txt{V} & & *+[o][F-]\txt{G} & & *+[o][F-]\txt{V}
> & & *+[o][F-]\txt{G} & & *+[o][F-]\txt{V}
> }

Put braces around all the  \frac  constructions, and it all
compiles just fine --- though the resulting tree diagram makes
no sense to me, presumably because it is incomplete at this stage.

Hope this helps,

Ross Moore

>
> The error messages I get from the console:
> Argument of \frac has an extra }. } (followed by: )
> Paragraph ended before \frac was complete. } (followed by: )
>
> The lines indicated are the ones of the last bracket closing
> '\xymatrix{}'.
>
>
>
> I tried omitting the fractions, then it compiles (some formatting
> corrections are needed though, I'll sort that later.).
>
>
>
> Does anybody see an obvious error in my code?
>
> Thanks and kind regards
> Lars
> _______________________________________________
> xy-pic mailing list
> http://tug.org/mailman/listinfo/xy-pic

------------------------------------------------------------------------
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