Previous: Macros, Up: Embedded Commands [Contents][Index]
Escapes may occur anywhere in the input to gtroff
. They usually
begin with a backslash and are followed by a single character, which
indicates the function to be performed. The escape character can be
changed; see Character Translations.
Escape sequences that require an identifier as a parameter accept three possible syntax forms.
Examples:
\fB \n(XX \*[TeX]
Other escapes may require several arguments and/or some special format. In such cases the argument is traditionally enclosed in single quotes (and quotes are always used in this manual for the definitions of escape sequences). The enclosed text is then processed according to what that escape expects. Example:
\l'1.5i\(bu'
Note that the quote character can be replaced with any other character
that does not occur in the argument (even a newline or a space
character) in the following escapes: \o
, \b
, and
\X
. This makes e.g.
A caf \o e\' in Paris ⇒ A café in Paris
possible, but it is better not to use this feature to avoid confusion.
The following escapes sequences (which are handled similarly to
characters since they don’t take a parameter) are also allowed as
delimiters: \%
, ‘\ ’, \|
, \^
, \{
,
\}
, \'
, \`
, \-
, \_
, \!
,
\?
, \)
, \/
, \,
, \&
, \:
,
\~
, \0
, \a
, \c
, \d
, \e
,
\E
, \p
, \r
, \t
, and \u
. Again, don’t
use these if possible.
No newline characters as delimiters are allowed in the following
escapes: \A
, \B
, \Z
, \C
, and \w
.
Finally, the escapes \D
, \h
, \H
, \l
,
\L
, \N
, \R
, \s
, \S
, \v
, and
\x
can’t use the following characters as delimiters:
0
-9
.
\%
, \:
, \{
,
\}
, \'
, \`
, \-
, \_
, \!
,
\/
, \c
, \e
, and \p
.
To have a backslash (actually, the current escape character) appear in
the output several escapes are defined: \\
, \e
or
\E
. These are very similar, and only differ with respect to
being used in macros or diversions. See Character Translations, for
an exact description of those escapes.
See Implementation Differences, Copy-in Mode, and Diversions, Identifiers, for more information.
• Comments: |
Previous: Macros, Up: Embedded Commands [Contents][Index]