Jump to content

Inheritance in paragraph styles in Writer

From The Document Foundation Wiki
This page contains changes which are not marked for translation.

Foreword

The video shows how to set up "Inheritance in Paragraph styles in Writer". The video links to this page here, which provides further information and details. This description is based on the "Toolbars" (Standard) user interface. The standard user interface "Toolbars" with Menu bar, toolbars and a collapsed sidebar is made for users who are familiar with the classic interface.

Link to the Video

Link to the Video (in German [DE]): Vererbung in Absatzvorlagen in Writer

Inheritance in paragraph styles

Where can I find the paragraph styles?

Paragraph styles belong to the family of styles. All styles in Writer can be accessed from the sidebar ( F11 ). At the top of the sidebar, just after the heading, you will find the icons for the styles. The left icon is for the paragraph styles .

Sidebar Paragraph Styles

What does heredity mean

In a style, many properties for text formatting can be defined, here are the individual tabs of the "Paragraph Styles" dialog:
| General | Font | Font Effects | Text Flow | Alignment | Indents & Spacing | Position | Drop Caps | Highlighting | Area | Transparency | Border | Tabs | Outline & List | Condition | Asian Typography | Asian Layout |
In the "General" tab, for example, the name of the style is set. The mother of all existing Paragraph styles is the "Default Paragraph Style" Paragraph style. If you want to create a new Paragraph style, for example, right-click on "Default Paragraph Style" in the sidebar and select New. A "Paragraph Style Untitled n" dialog opens in which you can assign a name for the new paragraph style. If you now save the new paragraph style with OK, you will initially have a style in which all text formatting properties are identical to those in the "Default" paragraph style. This is the inheritance.

"Paragraph Style" Dialog - give a name

Modify new Paragraph style

However, this is not the purpose of a new paragraph style, but to change one or more properties. Since the new paragraph style is now in the sidebar, right-click on the name and choose Edit Style. In our example, modify the font and size to.

  • Font: Liberation Mono
  • Font size: 14 pt

Leave all other properties untouched.

Note:
Once one or more properties have been changed in a child paragraph style (i.e., our new paragraph style), any changes you make to a parent style (e.g., "Default"), regarding those properties, will no longer affect that child paragraph style and its derived children.

Example Inheritance chain severed

State at delivery of LibreOffice

Since all paragraph styles are ultimately derived from the "Standard" style, and modified in certain properties, these modified properties can no longer be inherited by the substyles when changes are made to the "Standard" style. This is caused by the manual entry of properties in the sub-templates and interrupts the inheritance chain.

Special Case of Paragraph style "Heading"

The "Heading" Paragraph style is a child of the "Default Paragraph Style", in which property changes were already made when it was delivered. Overall, the "Heading" Paragraph style still derives from the "Default Paragraph Style". However, a change, for example, to the font in the "Default Paragraph Style", no longer automatically results in inheritance by the "Heading" sub-style.

"Heading" Paragraph style

However, the update can be applied manually within the "Heading" Paragraph style. To do this, select Edit Style for the "Heading" Paragraph style. In the "Font" tab, click the Reset to Parent button. This applies the font settings from the "Default Paragraph Style". Click OK.

Basic Fonts

The text was taken from: Online-Help (latest EN)
Legt die Einstellungen für die Grundschriftarten in Ihren Dokumenten fest. Sets the settings for the basic fonts in your documents. You can also change the basic fonts for Western, Asian, and Complex Text Layout languages. Select from the menuTools ▸ Options ▸ LibreOffice Writer ▸ ...

  • Basic Fonts (Western)
  • Basic Fonts (Asian)
  • Basic Fonts (CTL)
Selecting Basic Fonts – Example (Western)

These settings specify the Basic Fonts for the predefined Document templates. You can also change or customize the Default text document templates. This is how you access these commands:

Basic Fonts (...)

Open a text document, choose Tools ▸ Options ▸ LibreOffice Writer ▸ Basic Fonts (...).

Default

Sets the font for the "Default" Paragraph style. Since almost all of the supplied Paragraph styles are based on the "Default" Paragraph style, you also use this to set the font for almost any Paragraph style if no font has been defined in the Paragraph style.

Size

Here, you set respectively the font size.

Heading

Here you specify the font used for headings.

List

Specifies the font and font size for the List paragraph format, which is inherited by all derived paragraph formats. When you choose Format - Outline & List to format a paragraph with numbers or bullets in a text document, the program automatically assigns these paragraph formats.

Caption

Here you specify the font that will be used for the captions of images, tables etc.

Index

Sets the base font for custom indexes, indexes, tables of contents, and any paragraph styles derived from them.

Button "Default"

Resets the values displayed in the dialog to the default values set up during installation.

Warning:
There is no security prompt before restoring the default values.

Further Informations

Related topics

Professional text composition with Writer
Styles in Writer
Character Styles in Writer
Document templates Letter template in Writer

Documentation / Manuals

Here you will find the Documentation / Manuals: Documentation / Manuals

Any questions?

For questions on this topic go to: Ask.LibreOffice

Get Involved

Join us today and help us to make it even better! : Get Involved

LibreOffice is Free Software and is made available free of charge. Your donation, which is purely optional, supports our worldwide community. If you like the software, please consider a Donation.