[Xy-pic] XyPic User Defined Macros

Ohad Kammar kammar at actcom.co.il
Mon Mar 5 21:49:26 CET 2007


Hello everyone, I'm new here. I have some trouble with the XyPic LaTeX
package, and I was referred here from comp.text.tex. Here is my question:

Should there be a problem with defining my own macros for use in the xy
environment?

I'm trying the following code:
\newcommand\drawaxis{
     (-25, 0) ; (25, 0) <mailto:**@{-}*\dir{>}*+!L{x>**@{-}*\dir{>}*+!L{x}
   }

   \[\begin{xy}
     \drawaxis
   \end{xy}\]

But instead of getting a horizontal arrow with an x at the end, I'm getting:
(-25, 0) ; (25, 0) <mailto:**@{-}*\dir{>}*+!L{x>**@{-}*\dir{>}*+!L{x}
(as though my macro was typset in text mode or something like that).

(Running the code:
\[\begin{xy}
      (-25, 0) ; (25, 0) <mailto:**@{-}*\dir{>}*+!L{x>**@{-}*\dir{>}*+!L{x}
   \end{xy}\]
however, get the desired effect)

It seems to me that you should be able to define your own xy-macros, so
anyone has any idea what I'm doing wrong?

Thanks in advance,
Ohad.  




More information about the xy-pic mailing list