Changes

Jump to navigation Jump to search
=== The ConTeXt version ===
<code>\contextversion</code> contains the Even though ConTeXt version string. If you need to make sure you does not have a rigid versioning interface, there 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 Latexa few macros that deal with versions.
<code>\contextversion</code> contains the ConTeXt version string. If you need to make sure you are running under ConTeXt, check for this macro. This macro is not defined in [[source:syst-gen.tex| syst-gen.tex]], but in [[source:context.tex| context.tex]], because [[source:syst-gen.tex| syst-gen.tex]] is sometimes loaded under LaTeX, and it would be bad to define <code>\contextversion</code> in that case. The expansion of the macro <context code="yes" text="is something like this:">\contextversion</context>  <code>\fmtname</code> is defined at the same time, and it always expands to <context code="yes" text="this:">\fmtname</context>  <code>\contextformat</code> is also defined at the same time, and it contains the name of the current format. The expansion of the macro <context code="yes" text="is something like this:">\contextformat</context>  <code>\contextmark</code> is also defined in [[source:context.tex| context.tex]], and it contains the ConTeXt major release marker. You can read more on this internal versioning marker in [[manual:mk.pdf| ConTeXt, mkii & mkiv]]. The expansion of the macro <context code="yes" text="is something like this:">\contextmark</context>  <code>\contextversionnumber</code> is defined in [[source:mult-ini.tex| mult-ini.tex]], by interpreting <code>\contextversion</code> and attaching the <code>\contextmark</code>. The expansion of the macro <contextcode="yes" text="is something like this:">\contextversionnumber</context>  <code>\newcontextversion</code> is the last macro in this section. It is set in [[source:cont-new.tex| cont-new.tex]], the file that is read in at runtime. This macro is a security measure: its content is compared with the value of <code>\contextversion</code> that was stored in the format file, and if the two do not match up, the job is aborted.
=== Conditional execution of engine-specific code ===

Navigation menu