Changes

Jump to navigation Jump to search
229 bytes added ,  11:30, 16 November 2021
Add hint about \directsetup, fix typos
In ConTEXtConTeXt, setups are a rather common variant on macros. Setups have two useful properties:
* Spaces inside setups are ignored. This means that you can format the setup's contents with spaces and linebreaks for maximum readability, instead of having to write a dense macro or, worse, a long in-place definition. You can explicitly request spaces with {{cmd|space}}, {{cmd|crlf}}, {{cmd|par}}, etc.
* {{cmd|startsetups| mysetup}} begins a setup definition (with optional brackets around <tt>mysetup</tt>)
* {{cmd|setup|[mysetup]}} or {{cmd|setups|[mysetup]}} invokes a setupor even several as a list.* There’s also {{cmd|directsetup|{mysetup}}} and {{cmd|fastsetup|{mysetup}}}, these were faster in MkIV but make no sense any more in LMTX. Both take just one setup name and do less error checking.
== Examples ==
== Using setups for namespaces ==
 
Using <tt>\setups</tt> for a variable namespace allows an easier control over the
containing variables.
\startsetups namespace:reset
% Print message to log and document
\writestatus{VARIABLES}{namespace:set reset is being called..}%
\space{\red[namespace:reset]}

Navigation menu