How can I detect inside a TeX file which engine (pdftex/xetex/luatex) is used to compile the file? Is there a LaTeX package that provides this functionality?
Tell me more
×
TeX - LaTeX Stack Exchange is a question and answer site for
users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
|
|
|
Yes, there is — Internally these packages rely on checking if engine-specific primitives exist, such as |
||||
|
|
|
Packages ifxetex, ifluatex, ifpdf. You can also look e.g. in hyperref to check how it detect which driver it should use. |
|||||
|
|
I am using the following code:
LuaLaTeX can run both in DVI and PDF modes. |
|||
|
|