Difference between revisions of "Command/startenvironment"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \startenvironment ... \stopenvironment")
 
Line 25: Line 25:
 
<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:
 
<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>
 
<pre>
used structure  > text: mytexfile
+
used structure  &gt; text: mytexfile
used structure  >   environment: myenvironment
+
used structure  &gt;   environment: myenvironment
 
</pre>
 
</pre>
  
Line 58: Line 58:
 
<cd:wikipage page="Project stucture"></cd:wikipage>
 
<cd:wikipage page="Project stucture"></cd:wikipage>
 
<cd:commandref name="environment"></cd:commandref>
 
<cd:commandref name="environment"></cd:commandref>
<cd:commandref name="startproduct"></cd:commandref></cd:seealso>
+
<cd:commandref name="startproduct"></cd:commandref>
 +
<cd:commandref name="startcomponent"></cd:commandref>
 +
<cd:commandref name="startproject"></cd:commandref></cd:seealso>
 
</cd:commandgroup>
 
</cd:commandgroup>

Revision as of 13:13, 6 September 2020


\startenvironment ... \stopenvironment

Summary

The environment \startenvironment ... \stopenvironment is used for ...

Settings

\startenvironment[...] ... \stopenvironment
[...]file *

Settings string

\startenvironment ... ... \stopenvironment
... file *

Description

A \startenvironment block contains setups that should be loaded when the file is invoked with \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:
used structure  > text: mytexfile
used structure  >   environment: myenvironment

Within a \startenvironment block, the commands \project, \product, and \component are ignored; other environments can be loaded using \environment.

Examples

Example 1

The environment file:

% env_packed_items.tex
\startenvironment some_label
    \setupitemize[packed]
\stopenvironment

A file that uses that environment:

% myfile.tex
\environment env_packed_items

\starttext
    bla bla
    \startitemize
        \item
    \stopitemize
\stoptext

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: