Dear Mr. Moore,<br>I thank you for the solution of bad use of \labelstyle.<br>Because I think that the \scriptstyle in the Xy-pic do rather not benefit for the linguistic syntactic trees, I did simply set it to be \hbox globally.
<br>As you suggested , the better way is to set it locally in \xytree and \yytree.<br>I&#39;ll do it soon in the xytree package.<br><br>For the problem of \frac, I think, it would be better to put the entire label in one group as a label, as Mr. Moore slightly hinted.
<br><br>Sincerely,<br><br>Koaunghi Un.<br><br><div><span class="gmail_quote">2007/12/14, Ross Moore &lt;<a href="mailto:ross@ics.mq.edu.au">ross@ics.mq.edu.au</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Lars,<br><br>On 14/12/2007, at 1:33 AM, Lars Peter Cleary wrote:<br><br>&gt; Dear Ross<br>&gt;<br>&gt; For my setup I also needed to add $ to indicate mathematical formulas.<br><br>Strange.<br>Xy-pic was designed to put labels directly into math-mode,
<br>so that there would be no need to insert the delimiters,<br>especially since most diagrams are done in math-displays anyway.<br><br><br>&gt;<br>&gt; Below the final code for the tree, it&#39;s a Markow-event-tree:<br>
&gt; \xymatrix{<br>&gt;&nbsp;&nbsp;&amp; &amp; &amp; &amp; {\circ} \ar@{-}[dll]_{$\frac{1}{2}$}<br><br><br>&gt; If the following is of any interest:<br>&gt; My setup is Windows XP, MikTex 2.7 (all packages) and GPL<br>&gt; ghostscript 
8.61.<br>&gt; My editor is Eclipse (<a href="http://3.3.1.1">3.3.1.1</a>) with the TeXlipse plugin (1.2.1).<br>&gt; This setup works very well, by the way.<br>&gt;<br>&gt; For the math I use following packages:<br>&gt; \usepackage{amsmath}
<br>&gt; \usepackage{amsthm}<br>&gt; \usepackage{amsfonts}<br>&gt; \usepackage[all]{xy}<br>&gt; \usepackage{xytree}<br><br>Ahah. Here&#39;s the culprit.<br><br>&nbsp;&nbsp;xytree.sty&nbsp;&nbsp;has a very unfriendly line of coding:<br><br>&nbsp;&nbsp; \def\labelstyle{\hbox}
<br><br>This globally overrides the Xy-pic default setting of:<br><br>&nbsp;&nbsp; \xylet@\labelstyle=\scriptstyle<br><br><br>It also has an effect on parsing, since \hbox requires<br>a parameter.<br>Note that this gives a good explanation of your original
<br>problem:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \ar@{-}[dll]_\frac{1}{2}<br><br>would result in trying to set the label using&nbsp;&nbsp;\hbox{\frac}<br>and the numbers&nbsp;&nbsp;{1}{2}&nbsp;&nbsp;would just become part of the<br>current cell&#39;s contents.<br><br><br>
The author of&nbsp;&nbsp;xytree.sty&nbsp;&nbsp; should have implemented a better way<br>to apply his desired change to&nbsp;&nbsp;\labelstyle&nbsp;&nbsp;by restricting it<br>to the commands, defined within his own package, such as<br>&nbsp;&nbsp;&nbsp;&nbsp;\xytree and \yytree .<br>
<br>Otherwise it affects usage within Xy-pic diagrams that have<br>no relation whatsoever to his tree-like layouts.<br>It means that such diagrams cannot be copied and reused<br>within documents that do not load his&nbsp;&nbsp;xytree&nbsp;&nbsp;package,
<br>without the risk of encountering problems, whose solution<br>is not documented anywhere (until now!).<br><br><br><br>BTW,&nbsp;&nbsp;xtree.sty&nbsp;&nbsp;also changes \objectstyle to&nbsp;&nbsp;\hbox ,<br>but this is limited to the argument of the \xytext&nbsp;&nbsp;command.
<br>I&#39;m very surprised that people haven&#39;t encountered problems<br>in examples using this.<br><br><br><br>&gt;<br>&gt; Thanks a lot for the pointer, Ross, that was very helpful!<br><br>Thank you for reporting it,<br>
and the subsequent incompatibility that your latest<br>message has revealed.<br><br><br>&gt;<br>&gt; Kind regards<br>&gt; Lars<br>&gt;<br>&gt; On 12/13/07, Ross Moore &lt;<a href="mailto:ross@ics.mq.edu.au">ross@ics.mq.edu.au
</a>&gt; wrote:<br>&gt;&gt; Hello Lars,<br>&gt;&gt;<br>&gt;&gt; On 12/12/2007, at 10:20 PM, Lars Peter Cleary wrote:<br>&gt;&gt;<br>&gt;&gt;&gt; Hi all<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; I have some trouble compiling this bit of added code (without it it
<br>&gt;&gt;&gt; works):<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; \xymatrix{<br>&gt;&gt;&gt;&nbsp;&nbsp;&amp; &amp; &amp; &amp; &amp; &amp; &amp; {\circ} \ar@{-}[dl]_\frac{1}{2} \ar@{-}[dr]^\frac<br>&gt;&gt;&gt; {1}{2}<br>&gt;&gt;<br>&gt;&gt; You cannot set a complicated object, such as a fraction,
<br>&gt;&gt; as a label in this way. It has to be:<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \ar@{-}[dl]_{\frac{1}{2}}&nbsp;&nbsp;\ar@{-}[dr]^{\frac{1}{2}}<br>&gt;&gt;<br>&gt;&gt; using extra braces.<br>&gt;&gt; Otherwise the&nbsp;&nbsp;\frac&nbsp;&nbsp;will end up being used in a place
<br>&gt;&gt; quite apart from its arguments, thus triggering the kind<br>&gt;&gt; of messages that you are seeing.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&gt; &amp; &amp; &amp; &amp; &amp; &amp; &amp; \\<br>&gt;&gt;&gt;&nbsp;&nbsp;&amp; &amp; &amp; *+[F]\txt{L1} \ar@{-}[dl]_\frac{1}{2} \ar@{-}[dr]^\frac{1}
<br>&gt;&gt;&gt; {2} &amp;<br>&gt;&gt;&gt; &amp; &amp; &amp; &amp; &amp; &amp; &amp; *+[F]\txt{L2} \ar@{-}[dl]_\frac{1}{4}<br>&gt;&gt;&gt; \ar@{-}[dr]^\frac{3}{4} &amp; &amp; &amp; \\<br>&gt;&gt;&gt;&nbsp;&nbsp;&amp; &amp; *+[o][F-]\txt{G} \ar@{-}[dl]_1 \ar@{-}[dr]^1 &amp; &amp; *+[o][F-]
<br>&gt;&gt;&gt; \txt{V}<br>&gt;&gt;&gt; \ar@{-}[dl]_1 \ar@{-}[dr]^1 &amp; &amp; &amp; &amp; &amp; &amp;<br>&gt;&gt;&gt;&nbsp;&nbsp;*+[o][F-]\txt{G} \ar@{-}[dl]_1 \ar@{-}[dr]^1 &amp; &amp; *+[o][F-]\txt{V}<br>&gt;&gt;&gt; \ar@{-}[dl]_1 \ar@{-}[dr]^1 &amp; &amp; \\ &amp; *+[F]\txt{L1}
<br>&gt;&gt;&gt; \ar@{-}[dl]_\frac{1}{2} \ar@{-}[dr]^\frac{1}{2} &amp; &amp; &amp; &amp;<br>&gt;&gt;&gt;&nbsp;&nbsp;*+[F]\txt{L2} \ar@{-}[dl]_\frac{1}{4} \ar@{-}[dr]^\frac{3}{4} &amp; &amp; &amp;<br>&gt;&gt;&gt; *+[F]\txt{L2} \ar@{-}[dl]_\frac{1}{4}
<br>&gt;&gt;&gt;&nbsp;&nbsp;\ar@{-}[dr]^\frac{3}{4} &amp; &amp; &amp; &amp; *+[F]\txt{L1} \ar@{-}[dl]_\frac<br>&gt;&gt;&gt; {1}{2}<br>&gt;&gt;&gt; \ar@{-}[dr]^\frac{1}{2} &amp; \\<br>&gt;&gt;&gt; *+[o][F-]\txt{G} &amp; &amp; *+[o][F-]\txt{V} &amp; &amp; *+[o][F-]\txt{G} &amp;
<br>&gt;&gt;&gt; *+[o][F-]\txt{V} &amp; &amp; *+[o][F-]\txt{G} &amp; &amp; *+[o][F-]\txt{V}<br>&gt;&gt;&gt; &amp; &amp; *+[o][F-]\txt{G} &amp; &amp; *+[o][F-]\txt{V}<br>&gt;&gt;&gt; }<br>&gt;&gt;<br>&gt;&gt; Put braces around all the&nbsp;&nbsp;\frac&nbsp;&nbsp;constructions, and it all
<br>&gt;&gt; compiles just fine --- though the resulting tree diagram makes<br>&gt;&gt; no sense to me, presumably because it is incomplete at this stage.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; Hope this helps,<br>&gt;&gt;<br>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ross Moore<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; The error messages I get from the console:<br>&gt;&gt;&gt; Argument of \frac has an extra }. } (followed by: )<br>&gt;&gt;&gt; Paragraph ended before \frac was complete. } (followed by: )
<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; The lines indicated are the ones of the last bracket closing<br>&gt;&gt;&gt; &#39;\xymatrix{}&#39;.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; I tried omitting the fractions, then it compiles (some formatting
<br>&gt;&gt;&gt; corrections are needed though, I&#39;ll sort that later.).<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Does anybody see an obvious error in my code?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Thanks and kind regards
<br>&gt;&gt;&gt; Lars<br>&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt; xy-pic mailing list<br>&gt;&gt;&gt; <a href="http://tug.org/mailman/listinfo/xy-pic">http://tug.org/mailman/listinfo/xy-pic
</a><br>&gt;&gt;<br>&gt;&gt; ---------------------------------------------------------------------<br>&gt;&gt; ---<br>&gt;&gt; Ross Moore<br>&gt;&gt; <a href="mailto:ross@maths.mq.edu.au">ross@maths.mq.edu.au</a><br>&gt;&gt; Mathematics Department&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; office: E7A-419
<br>&gt;&gt; Macquarie University&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tel: +61 +2<br>&gt;&gt; 9850 8955<br>&gt;&gt; Sydney, Australia&nbsp;&nbsp;2109&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fax: +61 +2<br>&gt;&gt; 9850 8114<br>&gt;&gt; ---------------------------------------------------------------------
<br>&gt;&gt; ---<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt; _______________________________________________<br>&gt; xy-pic mailing list<br>&gt; <a href="http://tug.org/mailman/listinfo/xy-pic">http://tug.org/mailman/listinfo/xy-pic
</a><br><br>------------------------------------------------------------------------<br>Ross Moore&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:ross@maths.mq.edu.au">ross@maths.mq.edu.au</a><br>Mathematics Department&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; office: E7A-419
<br>Macquarie University&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tel: +61 +2 9850 8955<br>Sydney, Australia&nbsp;&nbsp;2109&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fax: +61 +2 9850 8114<br>------------------------------------------------------------------------
<br><br><br><br><br><br></blockquote></div><br>