10
votes
1answer
218 views

querying whether a font feature has been activated via a fontspec command

A LaTeX package I'm currently writing makes use of -- and definitely requires -- some of the power of LuaLaTeX. I would like to make my package's user interface -- in particular, the options that need ...
9
votes
2answers
241 views

\ifpdf returns true when using LuaLaTeX

The ifpdf package is supposed to detect if pdfTeX is running: This package looks for pdfTeX in pdf mode and implements and sets the switch \ifpdf. (from the ifpdf documentation) However, when I ...
17
votes
5answers
819 views

Combining \ifxetex and \ifluatex with the logical OR operation

I want to write in the preamble of a LaTeX document code that should be take into account by different compilers when the document is typeset. There are fragments that should be used: only by ...
0
votes
2answers
195 views

Conditional \endinput

I want to prevent processing rest part of a package in case if it is loaded not from lualatex. For some reason I cannot load ifluatex package, so I borrowed definition of \ifluatex from that package ...
8
votes
1answer
224 views

Testing for TeX boolean in Lua code

How can I test for a TeX boolean in Lua? This kind of code doesn't work: \newif\if@mypkg@someif \begin{luacode} -- some lua code \if@mypkg@someif -- some more lua code \else ...
14
votes
3answers
560 views

Check if LuaTeX is running

I want to check if my tex document is compiled with LuaTeX (or any other Lua TeX compiler). The simple approach from the TeXbook is to check the \directlua macro against \@empty, like ...