Changes

Jump to navigation Jump to search
580 bytes added ,  06:34, 15 October 2010
added section about Lua access to modes (ML message by Hans)
are too esoteric to describe here. If you are interested, see the
modes manual mentioned earlier.
 
= Modes in LuaTeX =
 
(for module writers)
 
The beta as of 2010-01-14 gives access to modes at the Lua end:
 
<texcode>
\starttext
 
\enablemode[test]
\enablemode[xxxx]
 
\doifallmodes{test,xxx}{NO}
\doifallmodes{test,xxxx}{YES}
\doifmode{test}{YES}
\doifnotmode{xxx}{YES}
 
\startluacode
tex.sprint(tex.modes['x'] and "YES" or "NOP")
tex.sprint(tex.modes['xx'] and "YES" or "NOP")
tex.sprint(tex.modes['xxx'] and "YES" or "NOP")
tex.sprint(tex.modes['xxxx'] and "YES" or "NOP")
tex.sprint(tex.modes['test'] and "YES" or "NOP")
\stopluacode
 
\stoptext
</texcode>
= Specific Examples =

Navigation menu