| 1 |
# iftex |
| 2 |
|
| 3 |
## TeX Engine Detection |
| 4 |
|
| 5 |
This iftex package provides a suite of commands for detecting |
| 6 |
different TeX variants. |
| 7 |
|
| 8 |
For each supported engine, tests are provided of the form |
| 9 |
|
| 10 |
\ifpdftex which is true if PDFTeX is in use and \RequirePDFTeX |
| 11 |
which stops the run with an error message if PDFTeX is not being used. |
| 12 |
|
| 13 |
The package (which works with plain TeX as well as LaTeX) has tests |
| 14 |
for: |
| 15 |
|
| 16 |
eTeX, PDFTeX, XeTeX, LuaTeX, LuaHBTeX, pTeX, upTeX, pTeX-ng, VTeX, Aleph, |
| 17 |
TexpadTeX, HiTeX, LuaMetaTeX. |
| 18 |
|
| 19 |
|
| 20 |
In addition, an \iftutex test is true for XeTeX and LuaTeX, and |
| 21 |
an \ifpdf test is provided to test the PDF or DVI output mode. |
| 22 |
|
| 23 |
## Compatibility Packages |
| 24 |
|
| 25 |
In addition to the main iftex.sty package, small wrapper packages are |
| 26 |
provided |
| 27 |
|
| 28 |
ifetex.sty ifluatex.sty ifvtex.sty ifxetex.sty ifpdf.sty |
| 29 |
|
| 30 |
These include iftex and in some cases emulate some additional |
| 31 |
commands to allow these packages to replace the original packages in TeX |
| 32 |
distributions. It is recommended that new documents do not use these |
| 33 |
packages, but instead load iftex.sty directly. |
| 34 |
|
| 35 |
This package may be used on any format (it may be loaded into initex) |
| 36 |
it does not assume LaTeX. |
| 37 |
|
| 38 |
|
| 39 |
---- |
| 40 |
|
| 41 |
This is a merger and simplification of several packages |
| 42 |
Based on a suggestion of Norbert Preining |
| 43 |
|
| 44 |
https://github.com/bidi-tex/iftex/issues/1 |
| 45 |
|
| 46 |
|
| 47 |
* ifetex: Martin Scharrer |
| 48 |
* ifxetex: Will Robertson |
| 49 |
* iftex: Persian TeX Group / Vafa Khalighi |
| 50 |
* ifluatex, ifvtex: Heiko Oberdiek |
| 51 |
* ifptex: Takayuki Yato |
| 52 |
* ifpdf: Heiko Oberdiek and LaTeX3 Project |
| 53 |
|
| 54 |
|
| 55 |
The existing if(u)ptex packages do far more extensive testing to |
| 56 |
distinguish different variants which are not copied here. |
| 57 |
|
| 58 |
A document specifically for Japanese texts may need the finer grained |
| 59 |
tests of the ifptex package which has tests for particular versions |
| 60 |
of the pTeX (Japanese TeX) variant in use, and for the mode that is |
| 61 |
active. |
| 62 |
|
| 63 |
This generic package only has coarser tests for the tex variant in |
| 64 |
use, so is sufficient for example to distinguish upTeX from pTeX, and |
| 65 |
to distinguish both of those from LuaTeX. |
| 66 |
|