Previous: , Up: Customization   [Contents][Index]


12.3 The Style file

A style file (default name fweb.sty) may reside in the user’s current directory (or the directory specified by the environment variable FWEB_STYLE_DIR). The default name can be changed by the command-line option ‘-z’ (see -z).

The style file is processed after all command-line options have been processed, except that the command-line option ‘-p’ (see -p) gets special treatment. Note that that option buffers up style-file entries (i.e., one may use more than one ‘-p’ option). ‘-p’ options placed in .fweb are treated as residing in a temporary file that is read just before the local style file; thus, those behave as ‘global’ style-file entries that will be overridden by a matching entry in the local style file. ‘-p’ options on the command line will be processed after the local style file, thus override corresponding options in either .fweb or the local style file.

To summarize the previous discussion, the local style file is intended to contain settings that are common to a particular source file. Settings common to all source files can be put into .fweb by means of the ‘-p’ option. To override a setting for a single run, use a ‘-p’ option on the command line.

Style-file entries have the form

        keyword [=] value

The equals sign is always optional. The ‘value’ is usually a double-quoted string, but may sometimes be an integer or a single-quoted character. For example,

        LaTeX.class.options = "twoside"
        LaTeX.package "indentfirst,multicol"
        mark_defined.fcn_name 0
        line_char.N 'C'
        color.error = "red"
        Color.red = "\e[01;31m"

The syntax is completely free-form. Periods within keywords are precisely equivalent to underscores, but are useful heuristically for associating a structure-like hierarchy to some of the commands. Non-printable characters in strings can be specified as octal constants (e.g., ‘\033’), hexadecimal constants (e.g., ‘\x1B’), or one of the ANSI escape sequences ‘\a’, ‘\b’, ‘\f’, ‘\n’, ‘\r’, ‘\t’, and ‘\v’. The non-ANSI escape sequence ‘\e’ (escape) is also supported; that is particularly useful for color processing (see Color).

Various of the style-file parameters take a language subscript. Those are

C

C

Cpp

C++

N

FORTRAN-77

N90

FORTRAN-90

R

RATFOR-77

R90

RATFOR-90

V

Verbatim

X

TeX

Thus, line_char.N is the comment character for FTANGLE’s line commands (see line_char), for FORTRAN-77 code.

Unfortunately, the descriptions of the parameters aren’t all completed yet. To query the default values, say ‘ftangle -Z’ (see -Z_).


Previous: , Up: Customization   [Contents][Index]