Changes

Jump to navigation Jump to search
2,681 bytes added ,  13:13, 6 September 2020
Created page with "Documentation for \startenvironment ... \stopenvironment"
<cd:commandgroup name="environment" type="environment" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->
The environment <tt>\startenvironment ... \stopenvironment</tt> is used for ...
</cd:shortdesc>
<cd:variants>
<cd:command category="structure" file="file-job.mkvi" interfacedate="2020-06-19T13:41" interfacefile="i-document.xml" level="document" name="environment" type="environment" variantnumber="1">
<cd:arguments>
<cd:keywords ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:file"></cd:constant>
<cd:constant type="*"></cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
<cd:command category="structure" file="file-job.mkvi" interfacedate="2020-06-19T13:41" interfacefile="i-document.xml" level="document" name="environment" type="environment" variant="string" variantnumber="2">
<cd:arguments>
<cd:keywords delimiters="none" ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:file"></cd:constant>
<cd:constant type="*"></cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>A {{cmd|startenvironment}} block contains setups that should be loaded when the file is invoked with {{cmd|environment}}. The first argument (given without square brackets!) is the name, and can be anything as long as it's not empty (the filename is a common choice). This name is used by ConTeXt internally when keeping track of how often the environment has been loaded, and it is used when printing output to stderr/the log file, as follows:
<pre>
used structure > text: mytexfile
used structure > environment: myenvironment
</pre>

Within a {{cmd|startenvironment}} block, the commands {{cmd|project}}, {{cmd|product}}, and {{cmd|component}} are ignored; other environments can be loaded using {{cmd|environment}}.
</cd:description>
<cd:examples><cd:example title="">The environment file:
<texcode>
% env_packed_items.tex
\startenvironment some_label
\setupitemize[packed]
\stopenvironment
</texcode>

A file that uses that environment:
<texcode>
% myfile.tex
\environment env_packed_items

\starttext
bla bla
\startitemize
\item
\stopitemize
\stoptext
</texcode>
</cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:source file="file-job.mkvi" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Structure"></cd:wikipage>
<cd:wikipage page="Project stucture"></cd:wikipage>
<cd:commandref name="environment"></cd:commandref>
<cd:commandref name="startproduct"></cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu