[OS X TeX] Test whether an option has loaded
Chris Goedde
cgg.lists at gmail.com
Thu Mar 1 22:50:14 EST 2012
Oh, one other thing.
On Mar 1, 2012, at 8:48 PM, David Craig wrote:
> \usepackage{xstring}
> \makeatletter%
> \newcommand{\pp}{%
> \IfSubStr{@classoptionslist}{preprint}{1}{0}%
> }%
> \makeatother%
>
> but that gives an error ("Use of \x at footnote doesn't match its definition") when it gets to \pp in the body of ifthenelse. Not sure what's happening there. If I zap the ifthenelse in the body and just have TeX print "\pp" it seems IfSubStr is always evaluating to false regardless of whether preprint is in the options list. (Which doesn't explain the "\x at footnote" error, anyway. Maybe that has to do with a conflict with revtex internals.)
You're missing a backslash (should be \@classoptionslist), which is why the existence of preprint in the options list doesn't matter.
Chris
More information about the MacOSX-TeX
mailing list