[Xy-pic] A question about macro's in \xymatrix...

Ross Moore ross at ics.mq.edu.au
Tue Aug 19 18:45:06 CEST 2003



On Tue, 19 Aug 2003, Ben Whale wrote:

> Hi!
>
> I have these macro's
> \newcommand{\UP}{\ar@<0.5ex>}
> \newcommand{\DW}{\ar@<-0.5ex>}
> \newcommand{\IN}{@{>->}}
> \newcommand{\ON}{@{->>}}
>
> and I want to write things like
> \begin{displaymath}
>   \xymatrix{
>     a'\UP\IN[r]\DW\IN[r]& a\UP\ON[r]\DW\ON[r]&a''
>   }
> \end{displaymath}
> just to make life easier.  Now xy-pic doesn't mind \UP ,etc.. by them
> selves, but if used as above the \IN and \ON are out putted as if they

Yes; that is correct, and as it should be for the parsers to work in
a predictable way.

> were text I wanted displayed.  What can I do about this...

In your sequence  \UP\IN you need the \IN to be expanded *before*
the \UP is executed.
This can be achieved by:   \expandafter\UP\IN

Hope this helps,

	Ross Moore
>
>
> Ben
> _______________________________________________
> xy-pic mailing list
> http://tug.org/mailman/listinfo/xy-pic
>


More information about the xy-pic mailing list