Open main menu

Changes

44 bytes added ,  09:07, 8 April 2020
no edit summary
\startmodeset
[mode1, mode2, ...] {Processed if either mode is enabled}
% NOTE: Empty lines are not allowed here!
[mode3, mode4, ...] {Processed if either mode is enabled}
[default] {Processed if none of the above modes match}
</texcode>
The same mode can be referenced multiple times, and '''all''' matching brances branches are executed.
The {{cmd|startmodeset}} ... {{cmd|stopmodeset}} environments can be nested. So, you can use
Sometimes you want a macro to behave differently if it is part of a section head, a section number, a list, a marking, or a register. For section heads, you can check for modes <code>*chapter</code>, <code>*section</code>, <code>*subsection</code>, etc. Similarly, <code>*list</code> is enabled inside a list, <code>*marking</code> is enabled inside a marking, and <code>*register</code> is enabled inside a register.
105

edits