Copyright (C) 2000-2012 |
GNU Info (groff)EnvironmentsEnvironments ============ It happens frequently that some text should be printed in a certain format regardless of what may be in effect at the time, for example, in a trap invoked macro to print headers and footers. To solve this `gtroff' processes text in "environments". An environment contains most of the parameters that control text processing. It is possible to switch amongst these environments; by default `gtroff' processes text in environment 0. The following is the information kept in an environment. * font parameters (size, family, style, character height and slant, space and sentence space size) * page parameters (line length, title length, vertical spacing, line spacing, indentation, line numbering, hyphenation data) * fill and adjust mode * tab stops, tab and leader characters, escape character, no-break and hyphen indicators, margin character data * partially collected lines These environments may be given arbitrary names (see Note: Identifiers, for more info). Old versions of `troff' only had environments named `0', `1' and `2'. - Request: .ev env - Register: \n[.ev] Switches to another environment. The argument ENV is the name of the environment to switch to. With no argument, `gtroff' switches back to the previous environment. There is no limit on the number of named environments; they are created the first time that they are referenced. The `.ev' read-only register contains the name or number of the current environment. This is a string-valued register. Note that a call to `ev' (with argument) pushes the previously active environment onto a stack. If, say, environments `foo', `bar', and `zap' are called (in that order), the first `ev' request without parameter switches back to environment `bar' (which is popped off the stack), and a second call switches back to environment `foo'. Here is an example: .ev footnote-env .fam N .ps 6 .vs 8 .ll -.5i .ev ... .ev footnote-env \(dg Note the large, friendly letters. .ev - Request: .evc env Copies the environment ENV into the current environment. automatically generated by info2www version 1.2.2.9 |