You can add styling, which is a collection of formatting
attributes, to the template elements to format your output documents.
Style options
- Create styles in an external style sheet
You can use styles
that are not defined in the document template if they are provided
in the stylesheet. You must type the name of the style in the Properties
view for the element. When the output is generated, the style you
defined is used. If a style with that name is not found, no style
is applied to that element. See Style sheets.
- Create styles in Rational® Publishing Engine
Create
general styling for element types, such as headings or lists. Apply
the name of the style to all elements of that type in the Properties
view. If you need to change the formatting, you can change it one
time for that style and all elements that use that style are updated.
See Creating and applying a style.
- Apply specific formatting properties to individual elements
Select
an element in the template content editor and enter properties for
just that element in the Properties view. See Formatting individual template elements.
Style precedence
Styles
are applied in the following order:- Template style sheets, if any
- Template styles, if any
- The formatting properties you define for the template elements,
if any
If you find that a style is
not being applied as expected, it might be for one of the following
reasons:- The styles set in the formatting properties might be causing the
styles that are applied earlier to be reset.
- The name of the style might already exist in the Rational Publishing Engine default
style sheet. For example, the Title style already
exists. The Title style in the default style sheet
overrides a style you create and name Title.
Tip: Avoid
using more than one of the three methods for applying styles in a
template. You might get mixed results in the output and have difficulty
troubleshooting. When you must apply additional styling to an element
that uses a particular style, apply the customization to a child element. For example, you might want to change
the color of a single paragraph that uses a style. Apply the style
to the paragraph element and change the color property for the text
element that the paragraph contains.