[texhax] FW: Re: Automated package option choice possible?

Uwe Lueck uwe.lueck at web.de
Mon Sep 13 23:02:34 CEST 2010

.... and indeed there is Vafa Khaligi's `iftex'. Vafa, you should include ifvtex and a command \texengine expanding to `pdf' `ifpdf' etc. -- Cheers, Uwe.

-----Ursprüngliche Nachricht-----
Von: Uwe Lueck <uwe.lueck at web.de>
Gesendet: 13.09.2010 22:40:32
An: texhax at tug.org,"Beuthe, Thomas" <beuthet at aecl.ca>
Betreff: Re: [texhax] Automated package option choice possible?

"Beuthe, Thomas" , 13.09.2010 22:13:49:
> There are at least two packages that require option choices 
> that depend on what program you are using to compile your LaTeX files:
> color and hyperref.
> Compile in pdflatex?  You need to use the pdftex option.
> Using xelatex? You need to use xetex option, and so on.
> Are there other packages that have similar requirements? (I'm curious)
> My main question: Is there any way of automating the choice of options?
> i.e.
> if(packagebeingusedtorun=xelatex) then
>   \usepackage[xetex]{color}
>or something like that?

Yes, it is, for a number of engines. The ones I know are `ifluatex', `ifpdf', `ifvtex', and `ifxetex': 

    http://ctan.org/pkg/ifluatex (etc.)



> I know I could always centralize the choice to a single variable that gets set once,
> but is there a way of getting away from setting this choice manually?
> I'm guessing there is not since the packages themselves would have probably
> done this already if it was possible, but I just wanted to throw this question out there...

More information about the texhax mailing list