Create styles to apply a specific list of formatting attributes
to multiple elements within a template. For example, create a text
style to apply to all section headings or create a list style to apply
a certain numbering scheme to all lists in your document. Define the
values for these properties and others, such as text formatting, table
borders, image placements, and more.
About this task
Styles are applied in the following order:
- Template styles or stylesheets, 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
stylesheet. For example, the Title style already
exists. The Title style in the default stylesheet
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.
Procedure
- Create a style:
- In Document Studio, click .
- In the New Style wizard, click Next.
- Enter a name for the style and click Next.
- Select the property, or group of properties, and click
the Add icon
to add
the property to the style. Click Next.
- Expand the property names.
- Select a property name and enter a value for the selected
property in the Property Value column. Repeat
for each property name. Click Next.
- Review the summary and click Finish.
- Apply the style to an element:
- Add an element to the template.
- In the Outline view, expand Styles.
- Select a style and drag it into the element in the Template
Content editor. The style icon displays in the element
in the template.
- Repeat to add the style to other elements.
What to do next
To modify an existing style:
- In the Outline view, right-click a style.
- Select Edit Style.
- Complete the wizard. If you select the template element and modify
its properties in the Properties view, your changes are applied to
that element only and not to the style.