[Xy-pic] macros
Daniel Müllner
nospamplease at stanford.edu
Thu Feb 24 20:19:48 CET 2011
Hi Alex, (and hi Ross, since I know you are reading this list),
yes, you can. Here is the trick: Use \scantokens{\POS{...}}
\newcommand{\XyCover}[2]{\scantokens{\POS
#1*{};#2*{}**{};
?<*[@_][o]=<0.0pc>{\bullet};
?>*[@_][o]=<0.8pc>{\bigcup} **[|(2)]\dir{-};
}}
\[
\xy
\XyCover{(-10,0)}{(0,10)}
\XyCover{(0,10)}{(10,0)}
\XyCover{(10,0)}{(0,-10)}
\XyCover{(0,-10)}{(-10,0)}
\endxy
\]
Has this trick ever been mentioned in the Xy-pic mailing list? Ross, you
might want to describe the \scantokens trick somewhere in the Xy-pic
documentation. It can be a real lifesaver in every TeXnical situation
where the catcodes have non-default values!
Best,
Daniel
More information about the xy-pic
mailing list