Using Symbols
-------------
A "glyph" is a graphical representation of a "character". While a
character is an abstract entity containing semantic information, a
glyph is something which can be actually seen on screen or paper. It
is possible that a character has multiple glyph representation forms
(for example, the character `A' can be either written in a roman or an
italic font, yielding two different glyphs); sometimes more than one
character maps to a single glyph (this is a "ligature" - the most
common is `fi').
Please note that currently the distinction between glyphs and
characters in this reference is not clearly carried out. This will be
improved eventually in the next revision.
A "symbol" is simply a named glyph. Within `gtroff', all glyph
names of a particular font are defined in its font file. If the user
requests a glyph not available in this font, `gtroff' looks up an
ordered list of "special fonts". By default, the POSTSCRIPT output
device supports the two special fonts `SS' (slanted symbols) and `S'
(symbols) (the former is looked up before the latter). Other output
devices use different names for special fonts. Fonts mounted with the
`fonts' keyword in the `DESC' file are globally available. To install
additional special fonts locally (i.e. for a particular font), use the
`fspecial' request.
Note:Font Files, and Note:Special Fonts, for more details.
- Escape: \(NM
- Escape: \[NAME]
Insert a symbol NAME (two-character name NM). There is no special
syntax for one-character names - the natural form `\N' would
collide with escapes.
If NAME is undefined, a warning of type `char' is generated, and
the escape is ignored. Note:Debugging, for information about
warnings.
The list of available symbols is device dependent; see Note:Glyph
Name Index for some of them discussed in this reference.
- Escape: \C'XXX'
Typeset the character named XXX. Normally it is more convenient
to use `\[XXX]', but `\C' has the advantage that it is compatible
with newer versions of `ditroff' and is available in compatibility
mode.
- Escape: \N'N'
Typeset the character with code N in the current font (this is
*not* the input character code). N can be any integer. Most
devices only have characters with codes between 0 and 255; the
Unicode output device uses codes in the range 0-65535. If the
current font does not contain a character with that code, special
fonts are _not_ searched. The `\N' escape sequence can be
conveniently used in conjunction with the `char' request:
.char \[phone] \f[ZD]\N'37'
The code of each character is given in the fourth column in the
font description file after the `charset' command. It is possible
to include unnamed characters in the font description file by
using a name of `---'; the `\N' escape sequence is the only way to
use these.
- Request: .cflags n c1 c2 ...
Each character has certain properties associated with it. These
properties can be modified with the `cflags' request. The first
argument is the the sum of the desired flags and the remaining
arguments are the characters to have those properties. It is
possible to omit the spaces between the characters.
`1'
the character ends sentences (initially characters `.?!' have
this property)
`2'
lines can be broken before the character (initially no
characters have this property)
`4'
lines can be broken after the character (initially the
characters `-\(hy\(em' have this property)
`8'
the character overlaps horizontally (initially the characters
`\(ul\(rn\(ru' have this property)
`16'
the character overlaps vertically (initially character `\(br'
has this property)
`32'
an end of sentence character followed by any number of
characters with this property is treated as the end of a
sentence if followed by a newline or two spaces; in other
words the character is "transparent" for the purposes of end
of sentence recognition - this is the same as having a zero
space factor in TeX (initially characters `"')]*\(dg\(rq'
have this property).
- Request: .char c [string]
Define a new character C to be STRING (which can be empty). Every
time character C needs to be printed, STRING is processed in a
temporary environment and the result is wrapped up into a single
object. Compatibility mode is turned off and the escape character
is set to `\' while STRING is being processed. Any emboldening,
constant spacing or track kerning is applied to this object rather
than to individual characters in STRING. A character defined by
this request can be used just like a normal character provided by
the output device. In particular, other characters can be
translated to it with the `tr' request; it can be made the leader
character by the `lc' request; repeated patterns can be drawn with
the character using the `\l' and `\L' escape sequences; words
containing the character can be hyphenated correctly, if the
`hcode' request is used to give the character a hyphenation code.
There is a special anti-recursion feature: Use of character within
the character's definition is handled like normal characters not
defined with `char'.
- Request: .rchar c1 c2 ...
Remove the definitions of characters C1, C2, .... This undoes the
effect of a `char' request.
It is possible to omit the whitespace between arguments.
Note:Special Characters.