Using the LibreOffice Chapter Template
- 1 Template introduction [Heading 1]
- 2 Contents of this template
- 3 Page styles
- 4 Paragraph styles
- 5 Numbering (list) styles
- 6 Character styles
- 7 Frame styles
- 8 Lists
- 9 Figures
- 10 Footnotes
- 11 Tables
- 12 Cross-referencing
- 13 Inserting frames
- 14 Starting a new chapter from the template
- 15 Updating the table of contents
- 16 Using tips, notes, and cautions
- 17 AutoText
Template introduction [Heading 1]
Before writing anything...
- 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.
- Go to ▸ . 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.
- Put your name in the Contributors section on the Copyright page.
- 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.
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 (▸ , toggle Record off and ▸ , 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:
- Open the Styles and Formatting window (if it is not already open) by pressing F11.
- 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.
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 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.
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.
For additional formatting within a paragraph (for example, to emphasize text), use an appropriate character style. We have defined character styles for common situations.
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.
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.
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.
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.
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.
- Sample numbered list item (OOoNum 123 Start style)
- Another item in the numbered list (OOoNum 123 Cont.)
- Another item in the numbered list (OOoNum 123 Cont.)
- A second-level list item ((using alphabetic “numbers”) —use Demote icon and OOoNum abc Start to style.
- Another second-level list item (OOoNum abc Cont.).
- Now we have a third-level nested list. It uses lowercase roman numerals—use Demote icon and OOoNum iii Start to style.
- Another third-level list item
- A final second-level list item
- Final item in first level (OOoNum 1 End).
Simple lists are similar to bullet lists, but without the bullets. The list items use the OOoSimpleList style.
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
Another definition term
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.
- Open Styles and Formatting Window
- Apply Style
- Align Left
- Align Right
- Line Spacing: 1
- Line Spacing: 1.5
- Line Spacing: 2
- Numbering On/Off
- Bullets On/Off
- Decrease Indent
- Increase Indent
- 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:
- Place the cursor at the end of the paragraph that will be above the image. Press Enter once to create a blank paragraph.
- With the cursor in the blank paragraph, apply the OOoFigure style to the paragraph.
- With the cursor still in the blank paragraph, choose Insert > Picture > From File.
- Select the desired image.
- Click Open. The image is placed in the document.
- Right-click the image and choose Anchor > As Character.
- If the image needs a caption, right-click and choose Caption from the pop-up (context) menu.
- Choose Figure as the Category. Type the caption’s text. Click OK to save.
- Apply the OOoFigureCaption style to the caption.
- 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.
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 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.
|The introductory paragraph style is OOoTableText_listIntro.*
The first element of the bulleted list uses the OOoListTNC Start 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:
- Press Ctrl+F2 to open the Fields dialog box.
- Go to the Cross-References page and select:
- Headings from the Type list
- The heading called Cross Referencing in the Selection list
- Reference in the Insert Reference to list
- Click Insert.
- Type the text on page and then repeat steps 2 and 3, taking care to select Page in substep 2c.
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:
- Download the template from the English Content > Documentation > Resources space on the LibreOffice Alfresco site.
- Store this file anywhere you like on your computer.
- Import the template into “My Templates” using the Template Management window (reached through ▸ ▸ ).
- Start a new chapter from the template using ▸ ▸ .
- 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.
- Go to ▸ . On the Description page, change the title from the chapter template’s filename to the title—not the filename—of the chapter.
- 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.
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.
- Place the cursor in the table (the gray field under the Contents heading on the third page).
- Right-click and choose Update Index/Table from the pop-up menu.
Another way to update the ToC is to use the Tool menu (▸ ▸ ). 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.
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.
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.
- Any footnotes will appear at the bottom of the page. Notice the indenting of the second and subsequent lines of the footnote (OOoFootnote).