Using the LibreOffice Chapter Template

From The Document Foundation Wiki
Jump to: navigation, search
This page contains changes which are not marked for translation.

File:Graphics2.pngContributors’ Guide

Chapter 5 Using the LibreOffice Chapter Template

Template introduction [Heading 1]


The first instance of many (but not all) paragraph styles referred to in this guide is followed by the name of that style, contained within brackets, as in [TableText] here or [Heading 1] below. [TableText]

Before writing anything...

  1. Check to see if the necessary typefaces (sets of fonts) are properly installed for your operating system. The Liberation Sans and Liberation Mono fonts are used in this template. If any font for the Liberation typeface is absent, your operating system might alter the formatting by substituting another font for Liberation Sans. Conducting a routine web search will locate several sources from which to download free fonts for this typeface. Be sure to first reboot your computer after installing any fonts before proceeding further in writing, reviewing, or editing anything.
  2. Go to File ▸ Properties. On the Description page, put the title of the chapter (or document) in the Title field. This title appears in the footers on those pages of the document that have their footers enabled through their page styles. All the custom page styles employed in this template except FirstPage have their footers enabled. Click OK to save.

You should take the time to know specifically how the document formats its footers by referring to the appropriate topics in the Help (press the F1 key) and study in detail how to format pages, especially Text Documents > Special Text Elements > Inserting a Chapter Name and Number in a Header or a Footer. Chapter 4 of the Writer Guide has similar information.

  1. Put your name in the Contributors section on the Copyright page.
  2. You may wish to delete all the text and graphics from the beginning of the Note preceding the heading “Template introduction” above to the end of the file, or you may prefer to retain temporarily some or all of it (such as the Tip, Note, Caution and data table samples) in order to copy-and-paste them into-your work-in-process and delete them later, before the chapter is completely finished. Your choice—just don’t forget to delete all the template instructions at some point.

The best way to delete the text in this guide is to (1) place the cursor just before the Note on this page, (2) use the vertical scrollbar to reach the very end of the file, (3) press and hold the Shift key and place the cursor after the last item (in order to select all the material between the two cursor placements) and (4) then press the Backspace key to delete the selected contents (there are also other means than using the Backspace key). Save the file (Ctrl+S), and then you will have a clean template copy.

After writing or revising a chapter, be sure to update the contents list (ToC, table of contents). To do this, place the cursor anywhere in the ToC, right-click, and choose Update Index/Table. Be sure to turn off displaying the edit tracking while updating the ToC (Edit ▸ Changes, toggle Record off and Edit ▸ Changes, toggle Show off). [TextBody]

Contents of this template

This template contains all the formatting styles needed for writing the LibreOffice user guides. Below are descriptions of the various styles, arranged in their categories (page, paragraph, character, frame, and list).

In addition to styles, this template includes samples for tips, notes, cautions, and tables of data. You can copy and paste them for reuse, or save as AutoText. These and other samples are also included in a *.bau file that you can install on your own computer. Directions for installing that file are included in the AutoTextsection.

To view only LibreOffice custom styles in the Styles and Formatting window, after first opening any document created with the template:

  1. Open the Styles and Formatting window (if it is not already open) by pressing F11.
  2. Choose Custom Styles from the category drop-down menu at the bottom of the Styles and Formatting window.

Applying these styles strictly and consistently greatly helps for editing documents, exporting them as HTML or MediaWiki format, or merging them together into larger works. Please do not manually “override” the styles by applying stylistic features, like clicking the bold icon instead of highlighting the text to be bolded and then double-clicking the OOoStrongEmphasis character style.

Page styles

No header on any page. Number all pages from the title or first page, even those pages (Title, Copyright, and First) that do not have visible page numbers. Do not restart numbering at the first chapter as is often done in printed books.

OOoTitlePage [Definition term]
Use only for the cover (title page) of a full book. For standalone chapters, use OOoFirstPage. One column, no footer, graphics. Next style: OOoCopyright.
Use only for the copyright page, either in the full book or individual chapters. One column, footer (different from footer in rest of book), left page only. Next style: OOoFrontMatter.
Used now only for the Contents page, but could include a Preface (Foreword) or other pages. One column, footer, mirrored pages. Next style: OOoPageStyle. In a full book, change the style of the next page to OOoFirstPage.
Use for the first (title) page of each chapter or appendix. One column, footer, right page only. Next style: OOoPageStyle.
Use for all other pages in a chapter. One column, footer, mirrored pages. Next style: OOoPageStyle. Continues until manually changed to OOoFirstPage or OOoOneColumn.

Paragraph styles

Paragraph styles are used for headings, ordinary text, and text in lists, footers, tables, captions for figures and tables, and footnotes.

Headings [OOoHeading 2]

OOoHeading 0—use for the title (name) of a chapter.

OOoHeading 1—use for first-level headings (headings are often called subheads in the publishing world).

OOoHeading 2—use for second-level headings.

OOoHeading 3—use for third-level headings.

OOoHeading 4—use for fourth-level headings. These headings do not usually appear in the table of contents. Topics at this level can often be presented as definition lists instead.

Real run-in subheads are not available with LibreOffice. A run-in subhead typically consists of a heading, followed by the text body of a paragraph that starts on the same line as the subhead.

Third-level heading example [OOoHeading 3]

The heading above is there as an example.

Fourth-level heading example [OOoHeading 4]

Fourth-level headings (OOoHeading 4) do not usually appear in the table of contents, but you may enable them in a chapter’s TOC if needed.

Text (including footers)

OOoTextBody—used for most paragraphs of text other than headings, table text, and lists.

OOoComputerCode—used when an entire paragraph is computer code, a command line, or a similar scenario. This paragraph style employs a monospace typeface—Liberation Mono. You could employ the OOoComputerCode character style if only part of a paragraph should be in Liberation Mono.

OOoFooter—used for page footers.

OOoGuideName—used for the name of the guide on the first page of a standalone chapter. Its next style is OOoHeading 0.

OOoNewChapter—used only for the first (almost invisible) paragraph on the first page of each chapter.

OOoPageBreak—used for the last paragraph on the title page of a chapter. When the chapter is a subdocument in a master document, this paragraph creates a page break between the title page and the first page of the chapter.

OOoSubtitle—used for a chapter’s (optional) subtitle.

OOoTextBodyIndent—used for indented text. It is identical to OOoTextBody, except for a greater indentation. This style is useful for typing paragraphs in a bulleted list.

OOoTextBody_ListIntro—used for a paragraph that leads into a numbered or bullet list. Same as OOoTextBody but includes a “keep with next paragraph” parameter. It also has less space after the paragraph (before the first list item).

OOoTip/Note/Caution—used for the words “Tip”, “Note”, and “Caution” in those items. The text of the tip, note, or caution itself is in the OOoTableText style.

OOoTitle—used only for the title of a full book.

OOoToCHead—used for the word “Contents” on the Table of Contents page, to prevent this heading from appearing in the table of contents.

OOoCopyrightPage—used for the headings on the Copyright page, to prevent them from appearing in the table of contents.

OOoCoverNotice—used for the boxed paragraph on the title page of a chapter. In the book template, this style hides the paragraph.

Numbering (list) styles

Lists use paragraph styles that have been defined to include a numbering (or list—bulleted usually, but other symbols could be used instead) style. The list styles are:

OOoBullets 1—used in paragraph styles for first-level bullet lists (•).

OOoBullets 2—used in paragraph styles for second-level bullet lists (–).

OOoNum 123—used in paragraph styles for firstlevel numbered lists (Arabic numbers).

OOoNum abc—used in paragraph styles for second-level numbered lists (small case letters).

OOoNum iii—used in paragraph styles for third-level numbered lists (Roman numerals).

See “Lists” on page 7for a discussion of the relationship between paragraph styles and list styles.

Character styles

For additional formatting within a paragraph (for example, to emphasize text), use an appropriate character style. We have defined character styles for common situations.


Do not use any manual formatting, such as bold or italic or monospace font; use the relevant character style instead.

OOoChapterNumber—used only for the chapter number on the first page of each chapter.

OOoComputerCode—used within a paragraph that is otherwise in standard font. For example, use this character style for computer folder path or file names in your text, such as C:\Program Files\LibreOffice\. Another example: To start writer, on the command line type: soffice -writer. For an entire line (paragraph) of code, use the OOoComputerCode paragraph style instead. Monospace font.

OOoDefault—defined as a reference character style. Use to change the base font typeface or size for all text styles other than headings. Can be used after applying a special character style to return to the normal OOo text style.

OOoEmphasis—used for style, field and tab names, titles of books (Writer Guide), and general emphasis, as in “do not do this” or important words introduced for the first time.

OOoKeystroke—used for keys the user presses on the keyboard (Enter, Shift+Tab, or Control+S).

OOoKeyboardInput—used for examples of things the user should enter (type) into a field.

OOoMenuPath—used for menu paths including context menus (from a right-click) (File > Save) and for buttons (Open, OK), icon names (Cut, Undo) and other items that users click on with the mouse.

OOoStrongEmphasis—used for general uses of bold character formatting.

Frame styles

OOoFrame is used for default frames, but it is rarely needed because no special formatting is applied. It is there in case we change our frame style later.

OOoScenario is used for story-like scenarios. A scenario is meant to illustrate, in story form, how a particular feature might be useful. Here is an example.

Sample Scenario

The time is 9:50 A.M., and Jane is finishing the 30-page paper for school that is due at 10:00 A.M. She suddenly realizes that:

  • The headings must be dark blue and indented.
  • Even-numbered pages must have a wider right margin, and odd- numbered pages must have a wider left margin.

Thankfully, Jane used LibreOffice and styles. She makes all the changes in two minutes and hands in the paper on time.


Do not use the toolbar icons to apply numbering or bullets because you get different results than if you use the paragraph styles for lists.

Lists use paragraph styles that have been defined to include a numbering (list) style.

Four principal categories of lists are used in our books. Use the type that best suits the purpose:

  • Procedures or instructions where steps should be done in a specific order should use numbered lists with Arabic numbers.
  • For items set out in a list for easy reference, but where the sequence is not important (as in this list), use a bullet list.
  • Simple lists are similar to bullet lists, but without the bullets. Use simple lists only when all of the list items are no longer than one line.
  • Definition lists are used mainly for short explanations of fields or options on dialogs. They are in two parts: the “definition term” and the “definition” itself.

Examples and descriptions of each type of list follow.

Bullet lists

The template makes available two types of paragraph style families for bullet lists:

OOoList1 using circular bullet symbols (Unicode U+2022)

OOoList2 using dash bullet symbols (U+2013)

The OOoList2 paragraph styles should only be used for second-level bullet lists where the first level is also a bullet list. To reach the second level, click the Demote icon on the Bullets and Numbering toolbar.

This paragraph is in OOoTextBody_ListIntro style. Same as OOoTextBody but includes a “keep with next paragraph” parameter. It also has less space before the first entry in a list.

  • Sample bullet list (OOoList 1 Start style)
  • Another item in the bullet list (OOoList 1 Cont.)

And a continuation item (no bullet character), using OOoList_TextBody_L1

  • Another item in the bullet list (OOoList 1 Cont.)
    • A sublist item (use OOoList 2 Start, then the Demote icon to style this as level 2)
    • Another sublist item
  • Final item in main list (OOoList 1 End). Use this style for the very last “paragraph” entry in a first-level list so it can later be redefined (if we wish) to provide more vertical space preceding the following paragraph.

If you need to add a paragraph within the list and you want the indentation to be aligned with that of the list element, you need to use OOoList_TextBody_L1 (for first-level list items) or OOoList_TextBody_L2 for second-level list items.

Numbered lists

This template includes three Numbered paragraph style families that you can use to create simple or nested lists. Normally we should not nest procedural lists beyond three levels, and only use the third levels when really necessary.

The three numbering styles are defined as follows:

  • OOoNum 123: Arabic number followed by )
  • OOoNum abc: small case letter followed by )
  • OOoNum iii: Roman numeral followed by .

In general numbered lists should use Arabic numbers for the first level, small case letters for the second and Roman numerals for the third level.

Sample paragraph in OOoTextBody_ListIntro style introducing a numbered list.

  1. Sample numbered list item (OOoNum 123 Start style)
  2. Another item in the numbered list (OOoNum 123 Cont.)
And a continuation item (no number), using OOoList_TextBody_L1
  1. Another item in the numbered list (OOoNum 123 Cont.)
    1. A second-level list item ((using alphabetic “numbers”) —use Demote icon and OOoNum abc Start to style.
    2. Another second-level list item (OOoNum abc Cont.).
      1. Now we have a third-level nested list. It uses lowercase roman numerals—use Demote icon and OOoNum iii Start to style.
      2. Another third-level list item
    3. A final second-level list item
  2. Final item in first level (OOoNum 1 End).

Simple lists

Simple lists are similar to bullet lists, but without the bullets. The list items use the OOoSimpleList style.





Definition lists

Definition lists are typically used for describing options on a dialog box. This list type can be used instead of third-level or fourth-level subheads, especially if you do not want any such subheads to appear in an automatically generated ToC.

Example of definition term

Example of a definition. All lines are indented from the left.

Another definition term

Here is the definition of this term: xxxxxxxxx xxxxxxxxx xxxxxxxx xxxxxxxxxx

Specific uses of lists

The following list is an example that uses hierarchical items in a list definition. Note that the separator (see highlights) uses an en-dash with a normal space on either side.

Import – Ignore font settings

Select this option to have LibreOffice ignore all font settings when importing. The fonts that were defined in the HTML Page Style will be used.


To optimize the HTML export, select a browser or HTML standard from the Export box. If LibreOffice Writer is selected, specific LibreOffice Writer instructions are exported.

Export – LibreOffice Basic

Enable this option to include LibreOffice Basic macros (scripts) when exporting to HTML format. You must activate this option before you create the LibreOffice Basic blah blah blah

These template instructions show many lists with run-in-line terms. For example:

OOoTextBody used for most paragraphs of text other than headings and lists.

Note that this is a normal paragraph, in whatever paragraph style is proper in that location (for example, it may be within a larger list). The term is separated from the text using an em-dash with no spaces on either side. Use OOoEmphasis for the term.


Illustrations (called Figures) and their caption use these styles:

OOoFigure—used for paragraphs containing figures. This type of paragraph does not contain any text, only the graphic. Its next style is OOoTextBody.

OOoFigureCaption—used for the captions to figures.

In case the illustration contains several elements you want to highlight (for example, descriptions of the icons on a toolbar such as that of 1), you should insert a borderless table for the legend. Style with OOoTableText(Caption) for the description and OOoTableText(CaptionNumber) for the sequential number.

In this template the font size of these two styles is fixed to 10pt, therefore it is recommended to use a 0.75cm column width for the numbers column while the description columns should have roughly the same width.

Figure 1: Formatting toolbar icons description in tabular format
  1. Open Styles and Formatting Window
  2. Apply Style
  3. Align Left
  4. Centered
  5. Align Right
  6. Justified
  7. Line Spacing: 1
  8. Line Spacing: 1.5
  9. Line Spacing: 2
  10. Numbering On/Off
  11. Bullets On/Off
  12. Decrease Indent
  13. Increase Indent
  14. Paragraph format dialog

Inserting figures (images)

We use two types of illustrations (called Figures) in our books: with captions or without captions. Usually, only small, closely cropped illustrations (and pictures of icons or other controls) have no caption.

Most images should go in a separate paragraph containing no text. Small images are often best placed in a table beside the text. Icon images can either go in a table next to text, or be anchored as a character within the text. Avoid inserting “floating” images, as these often become displaced from their intended location.

To insert an image, such as a screen capture, in its own paragraph:

  1. Place the cursor at the end of the paragraph that will be above the image. Press Enter once to create a blank paragraph.
  2. With the cursor in the blank paragraph, apply the OOoFigure style to the paragraph.
  3. With the cursor still in the blank paragraph, choose Insert > Picture > From File.
  4. Select the desired image.
  5. Click Open. The image is placed in the document.
  6. Right-click the image and choose Anchor > As Character.
  7. If the image needs a caption, right-click and choose Caption from the pop-up (context) menu.
  8. Choose Figure as the Category. Type the caption’s text. Click OK to save.
  9. Apply the OOoFigureCaption style to the caption.
  10. Select the image (not the frame around the image+caption), right-click and choose Anchor → As Character. (When you created the caption, the anchor in step 6 became the anchor for the frame around the image+caption.)

Figure 2 shows an example of a figure with a caption.

Figure 2: This is a figure caption.

Do not anchor graphics To Page. This works fine in standalone chapters, but when the chapter becomes part of a master document (for example, when compiling a full book), anything anchored To Page disappears.

If you do use a floating image, go to the Type page of the Picture dialog box and make sure that the Follow text flow option is not selected in the Position section; this provides better compatibility with MS Word.


Here[1] is an example of a footnote, whose text is displayed at the bottom of the page where the footnote was inserted. The numbering restarts at 1 for each chapter. Its paragraph style is OOoFootnote.


OOoTableCaption—used for captions to tables.

OOoTableHeader—used for table headers.

OOoTableText—used for table text.

Lists in tables

As the font size of the OOoTableText paragraph style is smaller than the OOoTextBody style, in order to create a list in a table you need to use one of the following two families of paragraph styles: for bullet list use OOoListTNC, while for numbered lists use OOoNumberedTNC.

As for lists in the main text body, the paragraph introducing the lists has to be formatted with the special paragraph style which in this case is OOoTableText_listIntro.

Use the above styles whenever you enter a list in a table, such as in a tip, note or caution.

Note that, given the numbered lists in a table can only use Arabic numbers and bullet lists only the round symbol.

Table 1: Example of numbered and bullet lists in a table

Example of list styles usage in a table
Numbered list Bullet list
The introductory paragraph style is OOoTableText_listIntro.#
The first element of the list uses the OOoNumberedTNC Start style.
  1. The second and subsequent elements of the numbered list use the OOoNumberedTNC Cont style.
  2. The last element of the numbered list uses the OOoNumberedTNC End style.
The introductory paragraph style is OOoTableText_listIntro.*
The first element of the bulleted list uses the OOoListTNC Start style.
  • The second and subsequent elements of the Bulleted list use the OOoNumberedTNC Cont style.
  • The last element of the Bulleted list uses the OOoListTNC End style.

A sample table

Below is an example table, with all the spacing set to our standard. You can copy and paste it into your documents, or copy it into an AutoText, or create a Table AutoFormat. Change the width of the columns as needed.

Table 2: This is a table caption.

Column 1 Column 2


It is possible to insert a cross-reference (also known as an xref or x-ref) to a heading, a figure, a table, a bookmark, a footnote, or a numbered item in a list.

For example, to insert a cross reference to the name and page of this section proceed as follows:

  1. Press Ctrl+F2 to open the Fields dialog box.
  2. Go to the Cross-References page and select:
    1. Headings from the Type list
    2. The heading called Cross Referencing in the Selection list
    3. Reference in the Insert Reference to list
  3. Click Insert.
  4. Type the text on page and then repeat steps 2 and 3, taking care to select Page in substep 2c.

Inserting frames

For floating frames, make sure that the Follow text flow option is not selected in the Position section of the Type page of the Frame dialog box; this provides better compatibility with MS Word.

On the Wrap page of the Frame dialog box, use a vertical spacing of 9, 18, or 36 points, depending upon what follows the frame. This spacing is set in the Bottom field in the Spacing subsection. Usually, let the vertical spacing of the preceding paragraph style determine the Top vertical spacing (use the 0pt default). Select the None option in the Settings subsection for typical situations.

Starting a new chapter from the template

The LibreOffice User Guide chapter template is a template file (*.ott). To use it:

  1. Download the template from the English Content > Documentation > Resources space on the LibreOffice Alfresco site.
  2. Store this file anywhere you like on your computer.
  3. Import the template into “My Templates” using the Template Management window (reached through File ▸ Templates ▸ Organize).
  4. Start a new chapter from the template using File ▸ New ▸ Templates and Documents.
  5. On the title page:
    • Replace the n after the word Chapter with the chapter number. Be sure to keep the two blank spaces following the n; these are required for correct spacing of the chapter number and title when the chapter becomes part of a book.
    • Replace the words Type Chapter Name Here with the name of the chapter. Use headline-style capitalization.
    • Replace the words Type optional subtitle here with the subtitle of the chapter, or delete this line if the chapter has no subtitle. Use sentence-style capitalization for the subtitle.
    • Be sure to keep the blank paragraph below the subtitle. This paragraph has a style of OOoPageBreak and is required for correct pagination when the chapter becomes part of a book.
  6. Go to File ▸ Properties. On the Description page, change the title from the chapter template’s filename to the title—not the filename—of the chapter.
  7. On the first page of text, be sure that the first heading is the first paragraph on the page, as in this template. The style of the first heading paragraph in this template has been modified to have a page-break-before attribute (on the Text Flow tab of the Paragraph dialog) that changes the page style from OOoFrontMatter to OOoPageStyle. To ensure that this attribute is retained, it’s best to replace only the words “Template introduction [OOoHeading 1]” and not delete the paragraph marker.

See the document titled Producing LibreOffice User Guides for instructions on updating the chapter template from the website, and updating a chapter from a changed template.

Updating the table of contents

The table of contents is already formatted and generated.

Do not forget to update the existing table of contents when your document is complete.

  1. Place the cursor in the table (the gray field under the Contents heading on the third page).
  2. Right-click and choose Update Index/Table from the pop-up menu.

Another way to update the ToC is to use the Tool menu (Tools ▸ Update ▸ Update All). This method also updates all indexes, tables, and fields. When updating the ToC, it is advisable to turn off edit-change tracking because if any heading entries in the ToC were edited, the edit-tracking could be displayed in the ToC for some edited entries. If that occurs, just turn off the display of edit-change tracking and update again.

Using tips, notes, and cautions

Below are samples of the tips, notes, and cautions for the guides. You can copy and paste these or use the AutoText feature to have LibreOffice remember them for you. These are 1-row, 2-column tables that do not break across pages. Both columns are preset to vertically center their contents.


A tip describes practical but nonessential information that does not fit into the text flow.


A note contains information related to the text. It might be an explanation, a comment, or a statement meant to catch attention.


Use cautions for operations that could result in data loss.


Predefined samples of tables and figures

Samples of the Tip, Note, and Caution tables in the previous section can be easily inserted into a document by employing AutoText. After they are inserted, you can replace their content with your own contents. To set this up, first install the dedicated *.bau AutoText category file onto your computer. For a US English setup for Windows, the default folder path for a BAU file is:C:\Program Files\LibreOffice 3\Basis\share\autotext\en-US. You can change this path for other folder locations, if you so choose. See the AutoText instructions in the online LibreOffice Help (F1) for advanced AutoText topics, or you can conduct a web search for discovering other fine points.

AutoText entries for a figure (along with its caption) and for other tables (with captions) are also included in the BAU file for this template: LO_3_4_chapter_template.bau.


The .bau file is not yet available in the LibreOffice documentation resources.

Using AutoText

As mentioned above, AutoText can be employed by authors or editors to insert preformatted sample tables and figures into a document as a timesaving tool—as placeholders to replace with your own content.

Be sure to select your desired AutoText entries from the appropriate category in the AutoText dialog box: Edit > AutoText (Ctrl+F3). Select the category—LO_3_4_chapter_template, in this case—and then select the desired AutoText entry and press the Insert button. Check the Show preview check box in order to see a very rough display of the AutoText entries. Afterward, you will substitute your own text or graphics, replacing the contents of the preformatted placeholders.


Creating an AutoText entry of a graphic for the *.bau category file by the template designer requires that the picture or anchored frame be anchored as a character, and it must be followed by one or more text characters before being selected as an AutoText entry. For the sample Figure in this template guide, a blank space character was used for the text following the sample graphic. So, after inserting an AutoText figure into your document, you can simply delete that extra space, if you choose. You can also change the anchoring for an AutoText-imported figure afterward to something other than As character, in case you desire a different anchoring system.

  1. Any footnotes will appear at the bottom of the page. Notice the indenting of the second and subsequent lines of the footnote (OOoFootnote).