Copyright (C) 2000-2012 |
GNU Info (groff)Implementation DifferencesImplementation Differences ========================== GNU `troff' has a number of features which cause incompatibilities with documents written with old versions of `troff'. Long names cause some incompatibilities. UNIX `troff' interprets .dsabcd as defining a string `ab' with contents `cd'. Normally, GNU `troff' interprets this as a call of a macro named `dsabcd'. Also UNIX `troff' interprets `\*[' or `\n[' as references to a string or number register called `['. In GNU `troff', however, this is normally interpreted as the start of a long name. In compatibility mode GNU `troff' interprets long names in the traditional way (which means that they are not recognized as names). Compatibility mode can be turned on with the `-C' command line option, and turned on or off with the `cp' request. The number register `.C' is 1 if compatibility mode is on, 0 otherwise. GNU `troff' does not allow the use of the escape sequences `\|', `\^', `\&', `\{', `\}', `\<SP>', `\'', `\`', `\-', `\_', `\!', `\%', and `\c' in names of strings, macros, diversions, number registers, fonts or environments; UNIX `troff' does. The `\A' escape sequence (Note: Identifiers) may be helpful in avoiding use of these escape sequences in names. Fractional point sizes cause one noteworthy incompatibility. In UNIX `troff' the `ps' request ignores scale indicators and thus .ps 10u sets the point size to 10 points, whereas in GNU `troff' it sets the point size to 10 scaled points. Note: Fractional Type Sizes, for more information. In GNU `troff' there is a fundamental difference between unformatted, input characters, and formatted, output characters. Everything that affects how an output character is output is stored with the character; once an output character has been constructed it is unaffected by any subsequent requests that are executed, including `bd', `cs', `tkf', `tr', or `fp' requests. Normally output characters are constructed from input characters at the moment immediately before the character is added to the current output line. Macros, diversions and strings are all, in fact, the same type of object; they contain lists of input characters and output characters in any combination. An output character does not behave like an input character for the purposes of macro processing; it does not inherit any of the special properties that the input character from which it was constructed might have had. For example, .di x \\\\ .br .di .x prints `\\' in GNU `troff'; each pair of input backslashes is turned into one output backslash and the resulting output backslashes are not interpreted as escape characters when they are reread. UNIX `troff' would interpret them as escape characters when they were reread and would end up printing one `\'. The correct way to obtain a printable backslash is to use the `\e' escape sequence: This always prints a single instance of the current escape character, regardless of whether or not it is used in a diversion; it also works in both GNU `troff' and UNIX `troff'. To store, for some reason, an escape sequence in a diversion that will be interpreted when the diversion is reread, either use the traditional `\!' transparent output facility, or, if this is unsuitable, the new `\?' escape sequence. Note: Diversions, for more information. automatically generated by info2www version 1.2.2.9 |