Changes

Jump to navigation Jump to search
No change in size ,  19:43, 25 August 2020
=== Generated commands and environments ===
In ConTeXt, some commands and environments are created by use of another command, typically by a command whose name starts with `\define...`. Users are free to define their own commands and environments that way, but some such are in fact predefined by ConTeXt itself. Examples are {{cmd|startchapter}}, which is defined using {{cmd|definesection|[chapter]}}, and {{cmd|startitemize}}, which is defined using {{cmd|defineitemgroup|[itemize]}}.
In the xml XML documentation generated commands like {{cmd|startchapter}} and {{cmd|startsubject}} are grouped together, because all commands generated by {{cmd|definesection}} have the exact same parameters and options.
To mimic this on the wiki, for generated commands there is a single page for the group. For such these group pages, the page name starts with an underscore. For the sectioning example, that is `/Command/_startsection`. There are also the pages `/Command/startchapter` ({{cmd|startchapter}}) and `/Command/startsubject` ({{cmd|startsubject}}), but these are intended to be just redirect pages to `/Command/_startsection` ({{cmd|_startsection}}).
As you can see above, Using the {{tl|cmd}} template for referring to the group pages looks a bit weird (`<nowiki>{{cmd|_startsection}}</nowiki>` was given) which is why there is a separate template for referring to those group pages: {{tl|gen}}. `<nowiki>{{gen|startsection}}</nowiki>` produces: {{gen|startsection}}.

Navigation menu