Changes

Jump to navigation Jump to search
578 bytes removed ,  01:09, 16 October 2010
→‎Modes in LuaTeX: Moving and rewriting
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