|
LaTeX environmentsLast revision August 3, 2004
Various parameters control how the output text will be formatted, for example, whether you are creating normal paragraphs or indented lists or tables, what the margin widths are, what font to use, etc. Collectively, a set of these parameters is referred to as an environment. In LaTeX, you can define multiple sets of environments, each of which affects a different part of the text. You start with an initial environment for the document as a whole. You can then start a new environment for a sub-set of the document; the old environment table is stored off to the side and a new one set up, consisting of the old values plus any modifications you make by commands within this sub-set of the document. Local environments can be nested to a large number of levels. When an inner environment ends, the table for the enclosing environment is restored. The advantage of this is that you can temporarily change a parameter, such as a margin setting, and not have to explicitly change it back yourself. LaTeX will automatically restore the old value when the current environment ends. The "scope" of an environment refers to the portion of the document that is included in that environment. There are two ways to specify the scope of a local environment:
|