CTAN has a new package: iftex
This very simple package, for both Plain TeX and LaTeX, defines the \ifPDFTeX, \ifXeTeX, and \ifLuaTeX boolean for testing whether PDFTeX, or XeTeX, or LuaTeX is being used for typesetting. Also provides the \RequirePDFTeX, \RequireXeTeX, and \RequireLuaTeX command which throws an error if PDFTeX, XeTeX and LuaTeX (respectively) is not the engine in use.
This package is located at http://tug.ctan.org/tex-archive/macros/latex/contrib/iftex . More information is at http://tug.ctan.org/pkg/iftex (if the package is new it may take a day for that information to appear). We are supported by the TeX Users Group http://www.tug.org . Please join a users group; see http://www.tug.org/usergroups.html .
iftex – Am I running under pdfTeX, XeTeX or LuaTeX?
The package, which works both for Plain TeX and for LaTeX, defines the \ifPDFTeX, \ifXeTeX, and \ifLuaTeX conditionals for testing which engine is being used for typesetting.
The package also provides the \RequirePDFTeX, \RequireXeTeX, and \RequireLuaTeX commands which throw an error if pdfTeX, XeTeX or LuaTeX (respectively) is not the engine in use.
|Copyright||2010 Persian TeX Group|
|Maintainer||bidi-tex GitHub Organisation|
Vafa Khalighi (inactive)