Frequently asked questions - Writer
How to adapt the presentation of the text depending on the outline?
You want the text to shift automatically following the outline level. Example of the expected output:
It is possible to have this effect automatically using Conditional Styles. This functionality allows a single style to take on the attributes of other styles depending on the context.
For example, used in the header of a page, the Text Body style could take the attributes of the Header Style. We don’t recommend such “extreme” usage, because it can cause confusion. However, the feature is quite suitable for the automatic indentation we would like to use here.
In this example, the text will use only one conditional style (the titles use Heading 1, Heading 2, and Heading 3 respectively). The text style applied is automatically adapted to the context: when the text is in “level 2,” a predefined layout in another style is applied. The same applies for level 3, etc.
This is very handy, because you don’t have to bother with the layout when entering text. You choose the “conditional” style and, when you apply the titles (i.e. the Headings), the layout adapts by itself. We can achieve this in three steps.
Step one: create two ordinary, indented paragraph styles
To follow the above example, you need to create two styles which are “ordinary,” paragraph styles with only an indent defined before the text:
- create two new ordinary, body text styles and call them Text Level 2 and Text Level 3 (chose any names that you like);
- when you are creating Text Level 2, set its Before text Indent under Indents & Spacing tab to 0.5"; and
- when you are creating Text Level 3, set its Before text indentation to 1.0".
These two styles are not directly applied in the document.
Step two: create two conditional paragraph styles
Now we create the conditional paragraph styles (e.g. After Heading 2 and After Heading 3) following these steps:
- in the Styles & Formatting panel ( ▸ ▸ or press F11), right-click on the Text Body paragraph-style, then chose New;
- under the Organizer tab, give a name to the style (e.g. After Heading 2);
- under the Condition tab, check Conditional Style;
- in the Context list, select 2nd Outline Level, in the Paragraph Styles chose Text Level 2;
- click on Apply and then OK; and
- repeat the previous step for the third level with the style Text Level 3.
Step three: modify the heading styles
Now that you have two conditional paragraph styles ready, you have to modify the Heading 2 and Heading 3 of the heading styles as follows:
- in the list of the applied styles in Styles and Formatting sidebar, right-click on Heading 2;
- click on the Organizer tab;
- under the Style section, click on the Next style dropdown menu and choose After Heading 2;
- click OK; and
- repeat it for the Heading 3 style (but choose After Heading 3 this time).