[Xy-pic] Problem with centered xy-pic-diagram with underlined content

Arne Schröder arne.schroeder at gmail.com
Mon Nov 14 05:56:38 CET 2011


I now put a \relax before every instance of \underline and it works.

Thanks :-)

On Mon, Nov 14, 2011 at 12:34, Ross Moore <ross.moore at mq.edu.au> wrote:

>
> On 14/11/2011, at 12:15 PM, Arne Schröder wrote:
>
> > I made up a sample-file which fails with the error message "You can't
> use `spacefactor' in math mode \xy@{}{\leave@}", marking line 13:
> >
>
> Just put \relax immediately inside the cell where
> the problem occurs.
>
> > \documentclass{scrreprt}
> > \usepackage[matrix]{xy}
> >
> > \CompileMatrices
> >
> > \begin{document}
> >
> > \[
> > \begin{xy}
> > \xymatrix{
> \relax
> >   \underline{bla}
> > }
> > \end{xy}
> > \]
> >
> > \end{document}
> >
> > Do you know whether I have done something wrong?
>
> It is a known issue with \xymatrix  and some other kinds
> of alignment environments.
>
> TeX has to expand any macro that comes as the 1st thing
> in a cell, to see whether  \omit  appears.
> When it is a complicated non-robust macro, this can lead
> to an error in parsing.
>
> > Is there a known workaround?
>
> Just put \relax to inhibit further expansion.
>
> > Thanks in advance,
> >
> > Arne Schröder
>
>
> 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
> ------------------------------------------------------------------------
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xy-pic/attachments/20111114/bc49435b/attachment.html>


More information about the xy-pic mailing list