Changes

Jump to navigation Jump to search
614 bytes added ,  01:16, 16 October 2010
→‎Aceesing Modes in Lua: Rewritten section
\doifnotallmodeselse{modes} {content} {alt}
</texcode>
 
= Accessing Modes in Lua =
 
In MkIV, the state of any mode is accessible at the Lua end as <code>tex.modes</code> table. Specifically,
 
<texcode>
tex.modes["screen"]
</texcode>
 
returns <code>true</code> if mode <code>screen</code> is enabled and <code>false</code> otherwise. Thus, specific combinations of modes can be checked using boolean expressions. For example
<texcode>
if (tex.modes["mode1"] and tex.modes["mode2"]) then
...
end
</texcode>
checks if both <code>mode1</code> and <code>mode2</code> are enabled.
 
'''Note''': This table was added in 2010.10.14 beta and is not available in earlier releases.
= System modes =
are too esoteric to describe here. If you are interested, see the
modes manual mentioned earlier.
 
 
= Specific Examples =

Navigation menu