The Definition Command Language
Up: Customizing the Output Format
Next: Examples of Command Definition
Previous: Commands
The command language for the definitions is very simple. Each line
has the form
command-name replacement-text
The command-name is any of the names in
SectionCommands
.
Comment lines may be included anywhere and start with #.
The replacement-text is almost literal text, except for
% escapes. These escapes are almost all single letters; for
example, %n and %1. The complete list of escapes
is
-
%
-
Output the % character
-
1
-
Insert the first string argument
-
2
-
Insert the second string argument
-
3
-
Insert the third string argument
-
4
-
Insert the fourth string argument
-
i
-
Insert the first integer argument
-
n
-
Insert a newline only if not at an newline
-
u1
-
Insert the first string argument, but in uppercase.
Similarly for u2 through u4.
-
p
-
Insert end-of-paragraph string only if not at an
end-of-paragraph.
-
f
-
Insert the end of font string. This string is defined by the
%e= command.
-
N="..."
-
Replace newlines with the string given in quotes. The
string can be 32 characters or less.
-
e="..."
-
Define the end of font string. The string can be 32
characters or less.
-
m="..."
-
Define the output mode. This is a string that is
understood by the particular output format. For example, the LaTeX
output routines understand the mode verbatim and use that to
change how characters are output.
-
a0="..."
-
Define the value of string register zero. The string may be up
to 63 characters long. There are 10 registers, commands a1 through
a9 access the other nine. The value of a0 is set to the name
of the function or macro by doctext, and normally should not be
changed.
-
r1
-
Insert the value of string register zero. Similarly for r1
through r9.
To continue replacement-text to another line, end the line with
the \ character. A single space at the end of a line may be
represented with \<blank>.
Sometimes you will not want to replace a command; instead, you will
want to insert your replacement text either before or after the
standard text. You can do this by placing a + either before or
after the command-name. An example of this is in
SectionAlternate Formatting for HTML
.
Up: Customizing the Output Format
Next: Examples of Command Definition
Previous: Commands