Node: S_format, Next: , Previous: Fwebmac params, Up: Fwebmac params



format.???

The format parameters are strings that specify the macro to be used to pretty-print various kinds of identifiers. These macro names are usually written automatically by FWEAVE, but they may also be used directly by the user in the TeX documentation. One can see their default values by typing ftangle -Zformat.. For example, the default value for format.typewriter is "\\.".

The macro names defined by the format fields are not defined in fwebmac.sty. They are dummy names, and can be changed to any other name not already in use without affecting the operation of FWEB. This ability is necessary because other packages might usurp macros like \. for their own purposes.

Thus, FWEAVE normally writes out the macro \. to typeset a string. Suppose, however, that some user package uses \. for something else. (One might realize this when LATEX crashes when it encounteres a \. that was written automatically by FWEAVE.) To fix this problem, put into fweb.sty the lines

     format_KEYWORD = "\\WTT"
     format_keyword = "\\WTT"
     format_typewriter = "\\WTT"
     

Here \WTT can be any name not already in use; you need not (and should not) give a definition for \WTT.

Macros like \. or \WTT are given their values during the execution of the \Wbegin macro that begins the output from FWEAVE. The style-file values are written as arguments to that macro, and essentially a command like \let\.\Wtypewriter is executed, where the internal macro \Wtypewriter is defined in fwebmac.sty. If you want to change the way FWEB typesets a particular kind of identifier, you must redefine the internal macro name, not the one used in the format parameters.

Here are the internal macros used by fwebmac.sty to typeset the various kinds of identifiers. The associated style-file parameters are shown in parentheses.


\Wid
ordinary identifiers (format.id)
\WID
completely upper-case ordinary identifiers (format.ID)
\Wshort
single-character ordinary identifiers (format.short_id)
\WidD
outer macros (format.outer_macro)
\WIDD
completely upper-case outer macros (format.outer_macro)
\WidM
FWEB macros (format.WEB_macro)
\WIDM
completely upper-case FWEB macros (format.WEB_macro)
\Wreserved
reserved words (format.reserved)
\WRESERVED
completely upper-case reserved words (format.RESERVED)
\Wintrinsic
library/intrinsic function names (format.intrinsic)
\Wkeyword
certain Fortran keywords (format.keyword)
\WKEYWORD
completely upper-case keywords (format.KEYWORD)
\Wtypewriter
character strings (format.typewriter)