[XeTeX] ifxetex package
wspr81 at gmail.com
Mon Jun 19 04:06:27 CEST 2006
I think we've started off on the wrong foot.
Here's the package in its entirety:
[2006/06/12 v0.1 Provides ifxetex condition]
(Your comments about \ifdefined are addressed below.)
On 19/06/2006, at 10:54 , Ross Moore wrote:
>> LaTeX itself ensures than a package is only loaded once, and for
>> Plain I've only added enough smarts that you at least shouldn't get
>> error messages.
> Yes, but that assumes the user tried to load using XeLaTeX .
> Would this not also be useful for XeTeX (without LaTeX) ?
> In particular, it'd be desirable to have it working properly
> \input miniltx.tex
> \input ifxetex.sty
Yes, as you can see it is written with this purpose in mind.
> Be careful here.
> \ifdefined is *not* a LaTeX command, nor a TeX one.
No, it's an eTeX command :)
I've bitten the bullet to state that anyone using this package will
be using an eTeX-based "TeX" -- because all distributions are now
shipping with pdfeTeX configured for everything, I feel this a
Anyway, pg 13 of etex-man (`texdoc etex`) has some nice goodies along
"For ε-TEX there are these additional conditionals:
• \ifdefined<token> (test if token is defined)
True if <token> is defined; creates no new hash table entry.
• \ifcsname...\endcsname (test if control sequence is defined)
True if the control sequence \csname...\endcsname would be defined;
no new hash table entry.
These are ε-TEX’s additional expandable commands:
The next (unexpanded) token must be a boolean conditional (i.e., not
\ifcase); the truth value of that conditional is reversed."
I don't know if there's much point using
but I don't mind the syntax so I've tried it out.
There's more in eTeX that I don't fully understand (e.g., when
\unexpanded would be useful) but its extras are well worth
> Even better still (why ?) is:
> \expandafter\ifx\csname XeTeXversion\endcsname\relax
Erm, something about not retaining the \XeTeXversion macro that's
equivalent to \relax? Hang on...\endinput?
Anyway, the requirement for such convoluted stuff was the reason
\ifdefined was created, as I understand it.
So anyway, given how easy it is to write \ifdefined\XeTeXversion, I'm
not sure there's much point in having an ifxetex package.
All the best,
More information about the XeTeX