Reference Developer Tutorial 1 Introduction 2 Macros 3 Typesetting 4 Example 5 Hints 6 Examples 7 Webmaking SEARCH

5.6 Changing the Strength of Headings

FunnelWeb provides five heading levels: `@A`, `@B`, `@C`, `@D`, and `@E` to which it binds five different typographical strengths. These bindings are static; a level `@A` heading will always be typeset in a particular font size regardless of the size of the document. The font sizes have been preset to be "reasonable" for a range of document sizes, but may be inappropriate for very small or large documents.

FunnelWeb does not currently provide an "official" way (e.g. a pragma) to change the typesetting strength of headings. This feature might be added in later versions. Meanwhile, a hack is available that will do the job, providing that you do not mind the hack being TeX-specific and probably FunnelWeb-version specific.

Inside the set of TeX macro definitions that FunnelWeb writes at the top of every documentation file are five "library" definitions `fwliba`...`fwlibe` which provide five different typesetting strengths for headings. Near the end of the set of definitions, FunnelWeb binds these macros to five other macros `fwseca`...`fwsece` which are invoked directly in the generated TeX code to typeset the headings.

    \def\fwseca#1#2{\fwliba{#1@,#2}}
    \def\fwsecb#1#2{\fwlibb{#1@,#2}}
    \def\fwsecc#1#2{\fwlibc{#1@,#2}}
    \def\fwsecd#1#2{\fwlibd{#1@,#2}}
    \def\fwsece#1#2{\fwlibe{#1@,#2}}

This means that the typesetting strength of the headings in a FunnelWeb document can be changed by redefining these macros at the top of a FunnelWeb document. For example:

    @p typesetter = tex
    \def\fwseca#1#2{\fwlibc{#1@,#2}}

would set `@A` headings at the same strength as the default strength of `@C` headings. The `typesetter` directive is necessary to ensure that the TeX control sequences get through to the documentation file unfiltered.

The following will tone down all headings by two levels (with the `@D` and `@E` levels being allocated the default `@E` typesetting strength because there is nothing weaker).

    @p typesetter = tex
    \def\fwseca#1#2{\fwlibc{#1@,#2}}
    \def\fwsecb#1#2{\fwlibd{#1@,#2}}
    \def\fwsecc#1#2{\fwlibe{#1@,#2}}
    \def\fwsecd#1#2{\fwlibe{#1@,#2}}
    \def\fwsece#1#2{\fwlibe{#1@,#2}}

These definitions affect only the headings that follow them, and so they should be placed at the top of the FunnelWeb input file.

To change the style of headings in HTML output, just modify the style settings near the top of the HTML file.

Webmaster Copyright © Ross N. Williams 1992,1999. All rights reserved.