Next: , Previous: , Up: Escapes   [Contents][Index]


3.2.2 General Structure of the Escapes

All format directives can also be given in format

escape width directive

where

escape

In general

%

escapes are related to general information (e.g., the current date, the user’s name etc.),

#

escapes are related to the output (e.g., the output file name) or to the options you gave (e.g., the number of virtual pages etc.), or to special constructions (e.g., enumerations of the files, or tests etc.),

$

escapes are related to the current input file (e.g., its name, its current page number etc.),

\

introduces classical escaping, or quoting, sequences (e.g., ‘\n’, ‘\f’ etc.).

width

Specifies the width of the column to which the escape is printed. There are three forms for width

+paddinginteger

the result of the expansion is prefixed by the character padding so that the whole result is as long as integer. For instance ‘$+.10n’ with a file name ‘$n’=foo.c gives ‘.....foo.c’.

If no padding is given, ‘ ’ (white space) is used.

-paddinginteger

Idem as above, except that completion is done on the left: ‘$+.10n’ gives ‘foo.c.....’.

integer

which is a short cut for ‘+integer’. For example, escape ‘$5P’ will expand to something like ‘   12’.

directive

See Available Escapes.