Changes

Jump to navigation Jump to search
66 bytes added ,  11:31, 2 September 2004
m
added texcode markup
== Using variables ==
<texcode>\setvariables[namespace][key=value] \getvariable{namespace}{key}</texcode>
== Defining new commands ==
letters: <tt>@</tt>, <tt>!</tt> and <tt>?</tt>.
Before and after the use or definition of such protected commands in your input files, the catcode of these
characters has to be changed. This is done by <ttcmd>\unprotect</ttcmd> and <ttcmd>\protect</ttcmd>:
<texcode>\unprotect \def\!test{alfa} \protect </texcode>
The newly defined command <tt>\!test</tt> can of course only be called upon when we are in the \<cmd>unprotect </cmd>ed state, otherwise TEX TeX reads the command <tt>\!</tt>, followed by the word <tt>test</tt> (and probably complains loudly about not being in math mode). These protection/unprotection commands can be nested. When the nesting becomes deeper than one level, the system reports the current protection level. It is a good habit to always start your macro files with <ttcmd>\unprotect</ttcmd> and end them with <ttcmd>\protect</ttcmd>.
'''See also''':[[Commands with KeyVal arguments|Commands with Key=Value arguments]]., [[Commands with optional arguments]].>

Navigation menu