Changes

Jump to navigation Jump to search
=== Conditional execution of engine-specific code ===
There are In [[source:syst-prm.tex| syst-prm.tex]], a few macrosthat macros are defined that can be used to delimit code that is executed conditionallyuses engine-specific features. <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. In the latest ConTeXt releases, this will always imply using the <code>\beginETEX</code> code, because e-TeX availability has recently become a requirement for ConTeXt. The macros will stay, however, because bits and pieces of ConTeXt are used in formats like [[LaTeX]] and [[mptopdf]], that are not necesarily e-TeX. A typical way of setting up your code to use e-TeX where available is like this:
<texcode>
</texcode>
Code delimited by <code>\beginOMEGA ... \endOMEGA</code> is only executed if ConTeXt runs under Omega, <code>\beginXETEX ... \endXETEX</code> only if [[XeTeX]] is used, ..., and ignored otherwise.
The Code delimited by <code>\beginOMEGA ... \endOMEGA</code> is only executed if ConTeXt runs under [[Aleph]].  Code within <code>\beginXETEX ... \endXETEX</code> is only run when [[XeTeX]] is used.  Experimental code for [[LuaTeX]] can be put between <code>\beginMETATEX ... \endMETATEX</code>.  An optional argument after the <code>\begin...</code> can be used to give some more information to the viewer: the example above will print the following string to the terminal:
<texcode>

Navigation menu