In the actual version, groff provides only 8-bit characters for direct input and named entities for further glyphs. On ASCII platforms, input character codes in the range 0 to 127 (decimal) represent the usual 7-bit ASCII characters, while codes between 127 and 255 are interpreted as the corresponding characters in the latin1 (ISO-8859-1) code set by default. This mapping is contained in the file latin1.tmac and can be changed by loading a different input encoding. Note that some of the input characters are reserved by groff, either for internal use or for special input purposes. On EBCDIC platforms, only code page cp1047 is supported (which contains the same characters as latin1; the input encoding file is called cp1047.tmac). Again, some input characters are reserved for internal and special purposes.
All roff systems provide the concept of named glyphs. In traditional roff systems, only names of length 2 were used, while groff also provides support for longer names. It is strongly suggested that only named glyphs are used for all character representations outside of the printable 7-bit ASCII range.
Some of the predefined groff escape sequences (with names of length 1) also produce single glyphs; these exist for historical reasons or are printable versions of syntactical characters. They include `\\', `\'', `\`', `\-', `\.', and `\e'; see groff(7).
In groff, all of these different types of characters and glyphs can be tested positively with the `.if c' conditional.
Note that input characters in the range 0-31 and character 127 are not printable characters. Most of them are invalid input characters for groff anyway, and the valid ones have special meaning. For EBCDIC, the printable characters are in the range 66-255.
Most of the remaining characters not in the just described ranges print as themselves; the only exceptions are the following characters:
OutputInputInputPostScriptUnicodeNotes
namecodenamedecomposed
Input characters in range 128-159 (on non-EBCDIC hosts) are not printable characters.
The remaining ranges (161-172, 174-255) are printable characters that print as themselves. Although they can be specified directly with the keyboard on systems with a latin1 code page, it is better to use their glyph names; see next section.
OutputInputInputPostScriptUnicodeNotes
namecodenamedecomposed
In groff, each 8-bit input character can also referred to by the construct `\[charn]' where n is the decimal code of the character, a number between 0 and 255 without leading zeros (those entities are not glyph names). They are normally mapped onto glyphs using the .trin request. Another special convention is the handling of glyphs with names directly derived from a Unicode code point; this is discussed below. Moreover, new glyph names can be created by the .char request; see groff(7).
In the following, a plus sign in the `Notes' column indicates that this particular glyph name appears in the PS version of the original troff documentation, CSTR 54.
Entries marked with `***' denote glyphs for mathematical purposes (mainly used for DVI output). Normally, such glyphs have metrics which make them unusable in normal text.
OutputInputPostScriptUnicodeNotes
namenamedecomposed
Ligatures and Other Latin Glyphs
Accented Characters
Accents
The composite request is used to map most of the accents to non-spacing glyph names; the values given in parentheses are the original (spacing) ones.
OutputInputPostScriptUnicodeNotes
namenamedecomposed
Quotes
Punctuation
Brackets
The extensible bracket pieces are font-invariant glyphs. In classical troff only one glyph was available to vertically extend brackets, braces, and parentheses: `bv'. We map it rather arbitrarily to u23AA.
Note that not all devices contain extensible bracket pieces which can be piled up with `\b' due to the restrictions of the escape's piling algorithm. A general solution to build brackets out of pieces is the following macro:
Another complication is the fact that some glyphs which represent bracket pieces in original troff can be used for other mathematical symbols also, for example `lf' and `rf' which provide the `floor' operator. Other devices (most notably for DVI output) don't unify such glyphs. For this reason, the four glyphs `lf', `rf', `lc', and `rc' are not unified with similarly looking bracket pieces. In groff, only glyphs with long names are guaranteed to pile up correctly for all devices (provided those glyphs exist).
OutputInputPostScriptUnicodeNotes
namenamedecomposed
Arrows
Lines
The font-invariant glyphs `br', `ul', and `rn' form corners; they can be used to build boxes. Note that both the PostScript and the Unicode-derived names of these three glyphs are just rough approximations.
`rn' also serves in classical troff as the horizontal extension of the square root sign.
`ru' is a font-invariant glyph, namely a rule of length 0.5m.
OutputInputPostScriptUnicodeNotes
namenamedecomposed
Text markers
Legal Symbols
Currency symbols
Units
Logical Symbols
Mathematical Symbols
Greek glyphs
These glyphs are intended for technical use, not for real Greek; normally, the uppercase letters have upright shape, and the lowercase ones are slanted. There is a problem with the mapping of letter phi to Unicode. Prior to Unicode version 3.0, the difference between U+03C6, GREEK SMALL LETTER PHI, and U+03D5, GREEK PHI SYMBOL, was not clearly described; only the glyph shapes in the Unicode book could be used as a reference. Starting with Unicode 3.0, the reference glyphs have been exchanged and described verbally also: In mathematical context, U+03D5 is the stroked variant and U+03C6 the curly glyph. Unfortunately, most font vendors didn't update their fonts to this (incompatible) change in Unicode. At the time of this writing (January 2006), it is not clear yet whether the Adobe Glyph Names `phi' and `phi1' also change its meaning if used for mathematics, thus compatibility problems are likely to happen - being conservative, groff currently assumes that `phi' in a PostScript symbol font is the stroked version.
In groff, symbol `\[*f]' always denotes the stroked version of phi, and `\[+f]' the curly variant.
Card symbols
This document is distributed under the terms of the FDL (GNU Free Documentation License) version 1.3 or later. You should have received a copy of the FDL on your system, it is also available on-line at the GNU copyleft site
This document is part of groff, the GNU roff distribution. It was written by James Clark with additions by Werner Lemberg and Bernd Warken
An extension to the troff character set for Europe, E.G. Keizer, K.J. Simonsen, J. Akkerhuis; EUUG Newsletter, Volume 9, No. 2, Summer 1989
The Unicode Standard