[OS X TeX] preamble vs. macro (problem with xy and ps4pdf)
Roger Hart
rhart at mail.utexas.edu
Thu Apr 7 06:58:41 CEST 2005
I need to standardize the preambles to numerous files I'm working on,
so it seemed to make sense to me to put all of my packages,
environments, and commands in a single file and use that as a package,
mypackages.sty. This works with the exception of a command using both
ps4pdf and xy. Basically, to simplify a bit to get at the problem, what
I want to do is to put the following command in my file of commands and
packages,
\def\mydiagram#1{\PSforPDF{\xymatrix@!=0mm at R-=10mm at C-=6mm@*[c]{#1}}}
The problem seems to be with the xymatrix options. That is,
\def\mydiagram#1{\PSforPDF{\xymatrix{#1}}}
works just fine in mypackages.sty, but if I try to add the xymatrix
options,
@!=0mm at R-=10mm at C-=6mm@*[c]
which is the whole reason I'm defining \mydiagram, then I get an
"unknown control sequence" error.
I've spent a few hours, I'm embarrassed to admit, reading and rereading
my LaTeX and TeX books, and trying quite blindly various combinations
of \expand this, \noexpand that, expandafter the other, etc., with a
\edef here, and a \gdef there, but with no success. I've also looked at
the xymatrix documentation, but could not find a better way to set the
options. Any suggestions?
Thanks very much,
Roger
********************************
Roger Hart
Assistant Professor, Departments of History and Asian Studies
University of Texas at Austin
office: Room 405, Garrison Hall
office phone: 512-475-7258
department fax: 512-475-7222
email: rhart at mail.utexas.edu
http://uts.cc.utexas.edu/~rhart
*********************************
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the macostex-archives
mailing list