Changes

Jump to navigation Jump to search
776 bytes added ,  14:44, 22 July 2014
Details about definemode
context --mode=screen,solution ...
== Pre-defining modes ==
Normally, the overhead for testing modes is negligible, but it can add up if modes are tested multiple times in a document (for example, as part of a macro). In such cases, it is useful to _define_ a mode before using them, using:
 
<texcode>
\definemode[...][...]
</texcode>
 
The first argument is a list of modes; the second argument may be `yes`, `no`, or `keep`. For example,
 
* <code>\definemode[screen][yes]</code> defines a mode and enables it;
* <code>\definemode[screen][no]</code> defines a mode and disables it;
* <code>\definemode[screen][keep]</code> defines a mode and keeps its previous status.
 
Typically, it is better to use <code>\definemode[...][keep]</code> so that the modes may be enabled or disabled from command line as well.
= Conditional processing based on modes =

Navigation menu