Changes

Jump to navigation Jump to search
198 bytes added ,  11:13, 31 July 2006
m
small changes only
== Rudiments ==
 
=== The ConTeXt version ===
<code>\contextversion</code> contains the ConTeXt version string. If you need to make sure you are running under ConTeXt, check for this macro. It is not defined in [[source:syst-gen.tex| syst-gen.tex]] but in [[source:context.tex| context.tex]]. This is because [[source:syst-gen.tex| syst-gen.tex]] is sometimes loaded under Latex.
The expansion of the macro <context code="yes" text="is something like this:">\contextversion</context>
These macros === Conditional execution of engine-specific code ===  There are a few macrosthat delimit code that is executed conditionally. <code>\beginTEX</code> and <code>\beginETEX</code> are mutually exclusive, depending on whether or not the format file was compiled under an e-TeX-enabled executable. A typical way of setting up your code to use e-TeX where available is like this:
<texcode>
system (E-TEX) : [line 833] \ifcsname
</texcode>
 
=== Guard against double-loading of input files ===
Because modules can be used in various contexts, we want to be able to prevent macro files from being loaded more than once. This can be done using:
Actually you don't need this macro for modules, since <code>\usemodule</code> does it's own bookkeeping. It is intended for files that are loaded via the TeX primitive <code>\input</code>.
 
=== Protecting internal macros ===
We can shield macros from users by using some special characters in their names. Some characters that TeX normally does not consider to be letters (and therefore used) are: <code>@</code>, <code>!</code> and <code>?</code>. Before and after the definition of protected macros, we have to change the <''catcode''> of these characters. This is done by <code>\unprotect</code> and <code>\protect</code>, for instance:
These are constant counters, corresponding to <code>0</code>, <code>1</code> and <code>-1</code>.
{{note|Beware: if you want to have access to @ ! and ? in macronames, use
<texcode>
</texcode>
instead of manipulating the catcode of @ directly. Protection macros handle nested usage.}}
== Temporary variables ==

Navigation menu