7
votes
2answers
678 views

How to check if a value is not equal using TeX conditionals?

I have a value defined in a macro, e.g.: \mymacro{apple} I need to check if a value does not equal a string, e.g.: IF #1 NOT EQUAL TO "apple" THEN PRINT "It is not a apple, it is #1." FI I ...
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 ...