| TOC | Index |
One of the most powerful facilities offered by the help writers is their capabilities to format the contents generated by the compiler. This task is accomplished through the use of defined styles.
Styles come in two versions: (1) the legacy styles, and; (2) the CSS or cascading stylesheets styles. Except for the winhelp writer which can only use the legacy version, other help writers may use either one or both.
Style objects may use either one, preferring CSS when available. Only at the scope of the style object, both versions may not be used at the same time by the compiler. With every style object, the compiler checks first for the presence of at least one CSS module. If positive, the compiler treats the style object as a CSS version. Otherwise, it treats it as a legacy version. Different style objects in the stylesheet may be of mixed version.
The legacy version has the following requirements following the RTF specifications:
For each style object, either one or both of the paragraph object for paragraph formatting, and the character object for character formatting need be present.
The CSS version follows the CSS Spec 2.1 formulated by the World Wide Web Consortia. It has the following requirements:
For each style object, one or more CSS module objects, and one or more types of pseudostyle objects.
For each pseudostyle object, one or more CSS module objects
Style objects may be nested with another style object. There is no limit to the number or depth of nesting. Styles then form a heirarchical order.
There are two reasons for nesting styles: (1) inheritance, and; (2) attribute option.
Nested styles inherit the properties or attributes of their ascendants. This is different in concept from the inherited value given to a style attribute. The latter is applicable to actual use of styles in documents. For example one paragraph has its color given the value of inherited. What this means is that such paragraph shall use the color it inherits from its container.
When style objects inherit the properties of their ascendant style objects, they do so only when their own property or attribute has not been defined or is empty. If such attribute is given the value of inherited, it is already defined.
If an attribute is empty, the compiler searches for a value ascendrally. The first value it encounters is the one it uses for the attribute of the current object.
With inheritance, themes are easy to develop.
Please note, however, that there are different rules for style and pseudostyle objects.
Inheritance applies even for missing CSS modules. The facility is in fact geared toward this purpose. CSS modules of style objects need not be created if the values have already been defined by the CSS modules of ascendant style objects. Only those CSS modules where attributes are needed to override existing values may be created. This saves resources and time.
Pseudostyle object of a particular type can only inherit attributes of CSS modules actually created under it. Also it searches only from the pseudostyles of the same type belonging to the ascendant style objects.
The difference is made because pseudostyles are already overrides to their associated parent style objects.
Menus and table of contents are some features offered to enhance the functionality of the help documentation. These are by their nature multilevel. While formatting multilevel structures may be allowed to vary from one level to the next, they are still better off developed under a certain recognizable theme. To achieve these requirements, the stylelevel is utilized.
A stylelevel is a line of styles. Starting from a nominated style object being assigned to the first level, the first child object is assigned for the second level. Then the first child style object of the latter is given to the third level, and so on, and so forth.
The name of the attribute indicates whether a style or stylelevel is expected. The name includes precisely, either style or stylelevel.
Styles are either applied to the contents through a palette or directly through an attribute, or as an override of the palette value, also through an attribute.
A style attribute that serves as an override of a palette style is indicated appropriately by the word override in the attribute name. These kind of attributes are aplenty in the objects found in the topic block.
Any nugget that must be highlighted, emphasized or given a different treatment may use the style override to the achieve the effect sought.
While it is a preferred approach to use the style palettes, formatting may be done also using only overrides.
The CSSColorBackground or the CSSContentAutoNumberList module may allow for a background image. To be able to properly encode it to the stylesheet, please follow the guide regarding its path.
As a much better alternative, create an Image object. Then place in the path attribute of the CSS module the stable id of the created image object.
Make sure that for files found in the local hard drives, or otherwise redirected to the output destination, the path indicated in the background-image attribute is the output destination. The path must also be fully qualified.
For example, f:\outputdest\image.gif
Make sure that the path indicated in the background-image attribute is the final web destination or URL.
For example, http://www.finalsite.com/images/image.gif
In case it is only for the local computer, the completely qualified path of the destination of the file will suffice.
For example, f:\outputdest\image.gif
Auxillary buttons are not functional yet.
4/13/2006, 1:19:05 PM
| TOC | Index |