LibreOffice GS76 GettingStarted
LibreOffice GS76 GettingStarted
LibreOffice GS76 GettingStarted
This document is Copyright © 2024 by the LibreOffice Documentation Team. Contributors are
listed below. You may distribute it and/or modify it under the terms of either the GNU General
Public License (https://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative
Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), version 4.0 or later.
All trademarks within this guide belong to their legitimate owners.
Book 1
Contributors
To this edition
Rob Thornton Vlada Slavitskaya Peter Schofield
Jean Hollis Weber B. Antonio Fernández Olivier Hallot
To previous editions
Skip Masonsmith flywire Nay Catina Dia-Schneebeli
Mitchell Camfield Rafael Lima Felipe Viggiano
Rafael Lima Steve Fanning Jean Hollis Weber
Andrew Jensen Amanda Labby Cathy Crumbley
Dan Lewis Dave Barton Pulkit Krishna
Jorge Rodriguez Olivier Hallot Paul Figueiredo
Peter Schofield Kees Kriek Martin Saffron
Steve Schwettman Dave Barton Hazel Russman
Ron Faile Jr. Kevin O’Brien Magnus Adielsson
Iain Roberts JiHui Choi Regina Henschel
Laurent Balland-Poirier Christian Kühl Florian Reisinger
Gisbert Friege (Dmaths) Jochen Schiffers Frédéric Parrenin
Bernard Siaud Miklos Vajna Valerii Goncharuk
Andrew Pitonyak Claire Wood John A Smith
Roman Kuznetsov Vasudev Narayanan
Feedback
Please direct any comments or suggestions about this document to the Documentation Team’s
forum at https://community.documentfoundation.org/c/documentation/loguides/ (registration is
required) or send an email to: loguides@community.documentfoundation.org.
Note
Everything you send to a mailing list or forum, including your email address and
any other personal information that is written in the message, is publicly archived
and cannot be deleted.
Preface
Who is this user guide for?
Anyone who wants to quickly acquire knowledge on LibreOffice and is new to office software, or
may be familiar with another office suite, will find this Getting Started Guide very useful.
LibreOffice is an open-source office productivity software suite containing capabilities for word
processing, spreadsheets, presentations, graphics, databases, and formula editing.
What is LibreOffice?
LibreOffice is a freely available, fully-featured, open source office productivity suite that is
compatible with other major office suites and is available on a variety of platforms. The native file
format used is Open Document Format (ODF). However, LibreOffice can also open and save
documents in many other formats, including those used by several versions of Microsoft Office.
For more information, see Appendix B, Open Source, Open Standards, OpenDocument.
Calc (spreadsheet)
Calc has all of the advanced analysis, charting, and decision making features expected from a
high-end spreadsheet. It includes over 500 functions for financial, statistical, and mathematical
operations, among others. The Scenario Manager provides “what if” analysis. Calc generates 2D
and 3D charts, which can be integrated into other LibreOffice documents. Also, Microsoft Excel
workbooks can be opened and worked on, then saved in Excel format. Calc can also export
spreadsheets in several formats, including, for example, Comma Separated Value (CSV), Adobe
PDF and HTML formats.
Impress (presentations)
Impress provides all the common multimedia presentation tools, such as special effects,
animation, and drawing tools. It is integrated with the advanced graphics capabilities of
LibreOffice Draw and Math modules. Slideshows can be further enhanced using Fontwork
special effects text, as well as sound and video clips. Impress can open, edit, and save Microsoft
PowerPoint presentations and save presentations in numerous graphics formats.
10 | Preface
Draw (vector graphics)
Draw is a vector drawing tool that can produce everything from simple diagrams, flowcharts, or
3D artwork. Its Smart Connectors feature allows definition connection points. Draw creates
drawings for use in any of the LibreOffice modules, and clip art can be created and added to the
Gallery. Draw can import graphics from many common formats and save them in many formats,
including PNG, GIF, JPEG, BMP, TIFF, SVG, HTML and PDF.
Base (database)
Base provides tools for day-to-day database work within a simple interface. Base can create and
edit forms, reports, queries, tables, views, and relations, so that managing a relational database
is much the same as in other popular database applications. Base provides many new features,
such as the ability to analyze and edit relationships from a diagram view. Base incorporates two
relational database engines, HSQLDB and Firebird. It can also use PostgreSQL, dBASE,
Microsoft Access, MySQL, Oracle, or any ODBC compliant or JDBC compliant database. Base
also provides support for a subset of ANSI-92 SQL.
Advantages of LibreOffice
The following explains some of the advantages of LibreOffice has over other office suites:
No licensing fees
LibreOffice is free for anyone to use and distribute at no cost. Many features that are
available as extra cost add-ins in other office suites (like PDF export) are free with
LibreOffice. There are no hidden charges now or in the future.
Open source
Distribute, copy, and modify the software as required, in accordance with the LibreOffice
Open Source licenses.
Cross-platform
LibreOffice runs on several hardware architectures and under multiple operating systems,
such as Microsoft Windows, macOS, and Linux.
Extensive language support
The LibreOffice user interface, including spelling, hyphenation, and thesaurus
dictionaries, is available in over 100 languages and dialects. LibreOffice also provides
support for both Complex Text Layout (CTL) and Right to Left (RTL) layout languages
(such as Urdu, Hebrew, and Arabic).
Consistent user interface
All the modules have a similar “look and feel”, making them easy to use and master.
Integration
The individual modules of LibreOffice are well integrated with the other LibreOffice
modules.
All modules share a common spelling checker and other tools, which are used
consistently across the suite. For example, the drawing tools available in Writer are also
found in Calc with similar, but enhanced versions in Impress and Draw.
Advantages of LibreOffice | 11
There is no need to know which application was used to create a particular file. For
example, open a Draw file from Writer and this will open Draw automatically.
Granularity
Usually, if you change an option, it affects all modules. However, LibreOffice options can
be set at a module level or even at document level.
File compatibility
In addition to its native Open Document Formats, LibreOffice includes support for opening
and saving files in many common formats including Microsoft Office, HTML, XML,
WordPerfect, Lotus 1-2-3, and PDF. See Appendix B for a list.
No vendor lock-in
LibreOffice uses OpenDocument, an XML (eXtensible Markup Language) file format
developed as an industry standard by OASIS (Organization for the Advancement of
Structured Information Standards). These files can easily be unzipped and read by any
text editor, and their framework is open and published.
All LO users have a voice
Enhancements, software fixes, and release dates are community-driven. Join the
community and affect the course of LibreOffice.
Read more about LibreOffice and The Document Foundation on their websites at
https://www.libreoffice.org/ and https://www.documentfoundation.org/.
Java software
Some LibreOffice features (wizards and the HSQLDB database engine) require that the Java
Runtime Environment (JRE) or, for macOS, the Java Development Kit (JDK) is installed on a
computer. If Java is not going to be used, nearly all of the LibreOffice features can still be used.
Java is available at no cost. More information and download links to the appropriate edition for
your operating system can be found at: https://java.com/en/download/manual.jsp.
For macOS, the Oracle Java Development Kit (JDK) has to be installed, not just the Java
Runtime Environment (JRE). Download links can be found at:
https://www.oracle.com/java/technologies/downloads/.
If LibreOffice features that require Java are to be used, it is important that the correct 32-bit or
64-bit edition matches the installed version of LibreOffice. See the Advanced Options in Chapter
12, Configuring LibreOffice.
12 | Preface
How to get LibreOffice
Versions of LibreOffice for Windows, Linux, and macOS are freely available and can be
downloaded from https://www.libreoffice.org/download. Linux users will also find LibreOffice
included free in many of the latest distributions.
Linux, Vanilla, and other versions may differ in a few features from the descriptions in this user
guide. Also, LibreOffice is included in many of the latest Linux distributions, for example Ubuntu.
Portable and other versions of LibreOffice are listed on the download page. LibreOffice is also
available in the Microsoft Store and Apple Mac App Store at a low and attractive price. The profits
from the sale of LibreOffice are invested to support the development of the LibreOffice project.
Installing LibreOffice
Information on installing LibreOffice on the various supported operating systems can be found at
this web page: https://www.libreoffice.org/get-help/install-howto/. When LibreOffice is acquired
through official app stores, follow the installation instructions provided by the store.
Tip
Some settings are intended for power users and programmers. If it is difficult to
understand what an option does, LibreOffice recommends leaving the option on
its default setting unless instructions in this user guide recommend changing the
setting.
Extensions
Functionality can be added to LibreOffice with extensions. Several extensions are installed with
the program and other extensions from the official extensions repository,
https://extensions.libreoffice.org/ or from other sources. See Chapter 13, Customizing
LibreOffice, for more information on installing extensions.
Help system
LibreOffice comes with an extensive Help system and this can be used as the first line of support.
Windows and Linux users can choose to download and install the offline Help for use when not
connected to the Internet. Offline Help is installed with the MacOS version of LibreOffice.
To display the LibreOffice Help, press F1 or go to Help > LibreOffice Help on the Menu bar. If
the offline help is not installed on a computer, but connected to the Internet, a dialog opens giving
the option to Read Help Online. Select this option and the default web browser opens at the
LibreOffice online help pages in the LibreOffice website.
14 | Preface
About LibreOffice
Opens a dialog and displays information about the version of LibreOffice and the
operating system being used. This information is often requested if the community is
asked for help or assistance with the software (on macOS, this option is found under
LibreOffice on the Menu bar).
16 | Preface
Figure 2: Options LibreOffice View dialog
Icons
The LibreOffice community has created icons for several icon sets, including Breeze, Colibre,
Elementary, and Sifr. Each user can select a preferred set of fonts to use. The icons used to
illustrate some of the many tools available in LibreOffice may differ from the ones used in this
guide. The icons in this user guide have been taken from a LibreOffice installation that has been
set to display the Colibre set of icons.
Change the icon set used in a LibreOffice installation as follows:
1) On Linux and Windows operating systems, go to Tools > Options > LibreOffice > View
on the Menu bar to open the dialog for view options.
2) On a Mac operating system, go to LibreOffice > Preferences > LibreOffice > View on
the Menu bar to open the dialog for view options.
3) In Icon Style, select a font from the options available in the drop-down list as shown in
Figure 2.
4) In Icon Size, select the required size from the drop-down lists for Toolbar, Notebookbar
and Sidebar, as shown in Figure 2.
5) Click OK to save the settings and close the dialog.
Notes
Some Linux operating systems, for example Ubuntu, include LibreOffice as part of
the installation and may not include the required icon set. This icon set can be
downloaded from the software repository for the Linux operating system being
used.
Some of the previously included icon sets are now available only as extensions;
see https://extensions.libreoffice.org/?Tags%5B%5D=49 or search for specific
ones. For example, the People Gallery is available from
https://extensions.libreoffice.org/en/extensions/show/people-gallery
18 | Preface
Figure 3: Dialog showing an example of common controls
Note
If the LibreOffice features that require Java are to be used, it is important that the
correct 32-bit or 64-bit edition matches the installed version of LibreOffice. If Java
is not to be used, nearly all of the LibreOffice features can still be used.
20 | Preface
• Track changes for tables.
• Page number wizard in Insert menu for easy one-step insertion of the page number in the
header/footer.
• Support for drawing styles for shapes and comments in Calc spreadsheets.
• Sorting by color is now possible in spreadsheet's AutoFilter.
• Spreadsheet's Import Text dialog (as CSV file or as Unformatted Text) have a new option
to not detect number in scientific notation. This option is only available if "Detect special
numbers" is off.
• Import and export of theme definition for OOXML format
• Added support for multicolor gradients
• Documents in the Start Center can now be pinned to show them at the beginning of the
recently opened document list
Chapter 1,
LibreOffice Basics
Installation and starting LibreOffice
Installation
When LibreOffice is installed, the process is different depending on your operating system. Refer
to the manufacturer’s information if necessary. After LibreOffice is installed, it will add the
following items to your computer depending on the operating system:
• Windows — A desktop icon is created during the installation of LibreOffice.
• Linux — Entries for LibreOffice and each of the LibreOffice modules appear in
Applications. Desktop icons can be created for LibreOffice and each of its modules.
Refer to the operating system help or user guide for more information on how to create a
desktop icon.
• macOS — An entry for LibreOffice is added to Applications. A desktop icon can be
created for LibreOffice. Refer to the operating system help or user guide for more
information on how to create a desktop icon.
Starting
New users should start with the LibreOffice Start Center, which will allow you to select individual
modules of LibreOffice or any previously opened files. The Center can be accessed by clicking
on LibreOffice in your Applications folder or clicking on the desktop icon (Figure 4). If you wish, a
LibreOffice module can be opened in the Center using one of the following methods:
• Clicking on the name of a LibreOffice module.
TIP
To pin a document in the Start Center so it can be always visible, hover the
corresponding document and click on the pin icon in the top left corner. The
selected document will then be shown in a separate line at the beginning of the
list, along with other pinned documents.
Note
A LibreOffice module will become active if you double-click the filename of an
ODF document in a folder, or file browser. The document opens in the appropriate
LibreOffice module. For more information on opening files, see “Opening existing
documents” on page 37.
Closing LibreOffice
There are multiple methods for closing LibreOffice:
macOS
• Go to LibreOffice > Quit LibreOffice on the Menu bar.
• Use the keyboard shortcut ⌘+Q
Note
If any documents have not been saved since the last change, a warning message
is displayed. Select whether to save or discard the changes.
Note
By default, LibreOffice commands are grouped in the Standard Toolbar user
interface. Other user interface variants are available.. Go to View > User
Interface on the Menu bar to change the user interface. For more information,
see Chapter 13, Customizing LibreOffice.
Title bar
The Title bar is located at the top of the LibreOffice window and it shows the file name of the
current document. When a document is created the document name will be Untitled X, where X
is a number. New documents are numbered in the order in which they are created.
Menu bar
The Menu bar is located below the Standard toolbar in Windows and Linux operating systems
and at the top of the desktop in macOS. When selecting one of the menus in the Menu bar, a
specific submenu will appear. They feature commands that can do one of these commands:
• Directly cause an action, for example File > Close or Save.
• Open a dialog. Any command that opens a dialog has three dots following that command,
for example: the command Edit > Find and Replace… on the Menu bar will open a
dialog.
• Open another submenu. Any command that opens yet another submenu has a right-
pointing chevron ˃ that follows the command’s name. Moving the mouse’s arrow over
one of these commands opens another submenu that contains additional commands, for
example View > Rulers > Rulers, or Vertical Rulers.
• Contains keyboard shortcuts for some commands.
For example, the default Menu bar for LibreOffice Writer contains these menu items:
File
Lists commands that apply to the entire document, for example Open, Save, and Print.
Edit
Has commands for editing a document, including Undo, Find and Replace, Cut, Copy,
Paste, and Track Changes.
View
Lists commands that control how a document is displayed, such as User Interface,
Toolbars, Text Boundaries, Rulers, and Zoom.
Insert
Has commands that insert elements into a document, for example Image, Comment,
Header and Footer, and Table of Contents and Index.
Format
Lists commands that are used to format a document’s layout.
Styles
Has commands that handle type styles. It includes commands that apply common styles
and manage styles as well as commands for editing, loading, and creating styles.
Toolbars
LibreOffice’s toolbars can be in one of two states: docked and floating. A docked toolbar is
attached to the document’s main window, while floating toolbars are independent of the main
window and can be moved anywhere on your screen.
In the default LibreOffice installation, the Standard toolbar is docked at the top of the window
across all of the LibreOffice modules and the second toolbar is in a docked to the top of the
window. The second toolbar changes depending on which LibreOffice module is open. For
example, if Writer or Calc are opened, the second docked toolbar is the Formatting toolbar.
Usually, the module’s second toolbar is context-sensitive and usually its set of tools change
depending on which object is selected. So when a graphic object is selected in Writer, the
Drawing Object Properties toolbar, which provides tools for formatting graphics, replaces the
Formatting toolbar. When you deselect the graphic object, the Drawing Object Properties toolbar
closes and the Formatting toolbar reopens.
Note
When it is necessary to reduce the number of toolbars displayed and provide
more space for a document, the user interface can be changed to a single-toolbar
as an alternative to the default double-toolbar user interface.
This single-toolbar user interface contains the most-used commands. To activate
a single toolbar user interface, go to View > User Interface and select Single
Toolbar from the Select Your Preferred User Interface dialog. For more
information, see Chapter 13, Customizing LibreOffice.
Note
The View menu does not include floating toolbars that were created from tool
palettes, but they are displayed in the LibreOffice window.
Note
If the toolbar handle is not visible, the tool palette, or toolbar, is locked into its
docked position and has to be unlocked. See “Locking and unlocking toolbars”
below for more information.
Note
When you are moving a toolbar into a docked location, LibreOffice will indicate
that the toolbar is in a docked position when you see a hashed border around the
toolbar. Once the hashed border appears, release the toolbar and the toolbar is
docked.
Customizing toolbars
To customize a toolbar, you can add tools listed in Visible Buttons, or add new tools to a toolbar.
Also, you can access the customization options for a toolbar by right-clicking in an empty space
on a docked toolbar or clicking on the downward triangle ▼ on the title bar of a floating toolbar to
open a context menu:
• To open the Customize dialog an add more tools to the toolbar, select Customize
Toolbar. If you need more information on customization, see Chapter 13, Customizing
LibreOffice.
• To dock the selected floating toolbar in its default position, select Dock Toolbar. The
toolbar can be moved to a different docked position.
Context menus
Context menus, which provide quick access to many menu functions, can be opened by right-
clicking on a paragraph, graphic, or other object. When a context menu is opened, the available
functions or options depend on the object that has been selected. A context menu is the easiest
way to use a function or option, especially if its location in the menus or toolbars is not known.
Context menus can also display applicable keyboard shortcuts if one has been created, or tool
icons if available. To use these options, go to Tools > Options > LibreOffice > View (macOS
LibreOffice > Preferences LibreOffice > View) and select the options available in Visibility.
Status bar
The Status bar is located at the bottom of the workspace. It provides information about the
document and also include convenient ways to change some features quickly. It is similar in
Writer, Calc, Impress, and Draw, but each LibreOffice module includes some module-specific
items. To hide the Status bar, go to View on the Menu bar and deselect Status Bar.
The Impress Status bar is shown in Figure 7 and it has the following components:
Slide number
The slide number currently displayed in the Impress Workspace and the total number of
slides in the presentation.
Information area
Changes depending on the object selected on the current Impress slide. Examples shown
in Table 3.
Table 3: Examples of information
Example selection Examples of information shown
Text area Text Edit: Paragraph x, Row y, Column z
Charts, spreadsheets Embedded object (OLE) “ObjectName” selected
Sidebar
By default, the Sidebar is on the right side of a LibreOffice module’s Workspace. An example of
the Writer Sidebar is shown in Figure 8. Go to View > Sidebar on the Menu bar to display or hide
the Sidebar.
The Sidebar contains several decks and each deck contains tools and options for formatting a
document. The number and type of decks used in the Sidebar depend on the type of document
and the current LibreOffice module. Decks are organized into panels and an icon bar on the right
side of the Sidebar allows switching between the different decks.
Notes
Note that the previous names or locations of files that have been renamed or
relocated may still be in the Start Center, and clicking on those types of filenames
will generate an error. To remove the file from the Start Center, hover the cursor
over the thumbnail until an X appears in the upper right corner, and then click on
the X.
When you are selecting a LibreOffice file from the Start Center, Open dialog, or
file browser you can limit the files seen by file type. For example, you select Text
Documents as the file type, only documents that Writer can open are displayed.
If you need to work with files on remote servers, see Chapter 10, Working with
File Formats, Security, and Exporting.
Also, LibreOffice can open files compatible with the Open Document Format
(ODF), which includes many formats from Microsoft. For example, LO can open
MS Word files (*.doc or *.docx) in Writer, MS Excel files (*.xls or *.xlsx) can be
opened in Calc; MS PowerPoint files (*.ppt or *.pptx) can be opened in Impress,
and so on. See Chapter 10, Working with File Formats, Security and Exporting for
more information about working with different file types.
Saving documents
LibreOffice documents can be saved with one of the following methods:
• Save — can save all changes made, keeping the current filename and location of the file.
– Go to File > Save on the Menu bar.
– Use the keyboard shortcut Ctrl+S (macOS ⌘+S).
– Click on Save on the Standard toolbar.
• Save As — can create a new document, change the filename or file format, or save the
file in a different location on a computer system.
– Go to File > Save As on the Menu bar.
– Use the keyboard shortcut Ctrl+Shift+S (macOS ⌘+Shift+S).
– Click on the downward triangle ▼ next to Save on the Standard toolbar and select
Save As from the context menu.
• Save a Copy — can save a copy of the current document, for example, in a different
location on the computer system. The current document remains open for more editing.
– Go to File > Save a Copy on the Menu bar.
– Click on the downward triangle ▼ next to Save on the Standard toolbar and select
Save a Copy from the context menu.
• Save All — can save all the files that are open in LibreOffice. Go to File > Save All on
the Menu bar. This option is only available when more than one LibreOffice document is
open.
Redoing
After changes have been undone, changes can be redone using one of the following methods:
• Use the keyboard shortcut Ctrl+Y (macOS ⌘+Y).
• Click on Redo in the Standard toolbar.
• Go to Edit > Redo on the Menu bar.
• Click the small triangle ▼ to the right of Redo on the Standard toolbar to open a list of
undo commands that can be redone. LibreOffice can select multiple consecutive undo
commands and redo them at the same time.
Reloading documents
If you reload a document in LibreOffice, all the changes made in an editing session after the last
save are discarded. To reload a document, go to File > Reload on the Menu bar.
Note
If you reload a document, a confirmation dialog will open and warn the user that
reloading will discards the last unsaved changes.
Closing documents
Close a LibreOffice document with one of the following methods:
• Go to File > Close on the Menu bar.
• In Windows or Linux — click on the X at the right end of the Menu bar.
• In macOS — click on the red button at the left end of the title bar.
If the document to be closed is the only document that is open, the following happens:
• In Windows or Linux — the document closes and the LibreOffice Start Center opens.
• In macOS — the document closes and the Menu bar remains at the top of the screen.
Printing
Default printer
Here are examples of how to setup a default printer on a computer in LibreOffice. The method
will vary depending on the computer and its operating system.
Notes
When printing, the name of the default printer installed on a computer appears in
the Print tool name, Print Directly tool name, Print dialog, and Printer Settings
dialog.
For more information about printing the different types of documents that
LibreOffice can create, see the user guides for each LibreOffice module.
Printing options are not available when viewing a LibreOffice Base table or query.
Windows
1) Open Settings, then go to Devices > Printers & scanners.
2) Select a printer from the displayed list.
3) Select Manage > Set as default and then close Settings.
Linux
1) Open Settings, then go to Printers.
2) Select a printer from the displayed list.
3) Click on the settings icon on the right of the printer name.
4) Select Use Printer by Default from the drop-down list and close Settings.
macOS
1) Open System Settings, then open Printers & Scanners.
2) In Default printer select the printer to use as default printer from the drop-down list, then
close Settings.
Quick printing
LibreOffice can do “quick printing,” which prints an entire open document is printed using the
computer’s default printer. To quick print, click on Print Directly on the Standard toolbar.
If Print Directly is not visible on the Standard toolbar, it can be installed as follows:
1) Right-click in a blank area on the Standard toolbar to open a context menu.
Printer setup
LibreOffice’s Printer Setup dialog has the following options:
Printer
Lists information that applies to the selected printer. If the list is empty, install a default
printer for the computer. Refer to the printer and computer user guides for more
information on connecting printers.
Name
Lists the installed printers on the computer. To change the default printer, select a printer
name from the drop-down list.
Status
Describes the current status of the selected printer.
Type
Displays the type of printer that is selected.
Location
Displays the computer connection for the selected printer.
Comments
Displays additional information for the printer.
Properties
Changes the printer settings of the computer operating system for the current document.
Make sure that the layout orientation (Landscape or Portrait) matches the page format set
in Format > Page on the Menu bar.
Options
Opens the Printer Options dialog box allowing the global printer options set in Tools >
Options > LibreOffice Writer or LibreOffice Calc > Print (macOS LibreOffice >
Preferences > LibreOffice Writer or LibreOffice Calc > Print) to be overridden when
printing the current document.
Note
Options in the Printer Settings dialog is only available in LibreOffice Writer and
Calc.
Printing | 39
Figure 13: Example of a Printer Setup dialog
Printing | 41
Note
Reducing the amount of data sent by LibreOffice to the printer increases the print
speed because the print files are smaller. This makes it easier for printers with a
smaller memory when printing large files. However, reducing print data can result
in slightly lower print quality.
Reduce transparency
If selected, transparent objects are printed like normal, non-transparent objects,
depending on your selection in the following two option buttons.
Automatically
Specifies that the transparency is only printed if the transparent area covers less than a
quarter of the entire page.
No transparency
When selected, a transparency does not print.
Note
Transparencies cannot be sent directly to a printer. Transparencies must be
visible to be calculated by LibreOffice as bitmaps and sent to the printer.
Depending on bitmap size and the print resolution, a large amount of data may be
generated.
Warnings
Defines which warnings appear before printing begins.
Paper size
Select this option if a certain paper size is required for printing the current document. If
the paper size used in the document is not provided by the current printer, an error
message opens.
Paper orientation
Select this option if a certain paper orientation is required for printing the current
document. If the format used by the current document is not available from the printer,
an error message opens.
Transparency
Select this option if a warning is required if transparent objects are contained in the
document. When printing a document with transparencies, a dialogue box opens to
enable selection if the transparency is to be printed.
Reduce gradient
If selected, gradients are printed with reduced quality.
Gradient stripes
Specifies the maximum number of gradient stripes for printing.
Intermediate color
Specifies that gradients are only printed in a single intermediate color.
Controlling printing
For more control over printing, open the Print dialog with one of the following methods:
• Go to File > Print on the Menu bar.
• Use the keyboard shortcut Ctrl+P (macOS ⌘+P).
• Click on Print on the Standard toolbar.
Printing | 43
More > Order
Select from Create separate print jobs for collated output (only available when more
than one copy is being printed) or Print in reverse order.
Figure 16: Impress Print dialog — Impress General page — Windows or Linux
Page Layout
Paper size
Select the paper size to use from the drop-down list.
Orientation
Select from the drop-down list Automatic, Portrait, or Landscape.
More > Pages per sheet
Select from the drop-down list how many pages are printed on one sheet of paper.
More > Order
Select from the drop-down list the printing order of multiple pages on one sheet of
paper.
More > Draw a border around each page
When multiple slides are printed on one sheet of paper, a border is drawn around each
slide.
More > Brochure
Prints the document so the pages can be folded into a brochure or booklet.
Printing | 45
Figure 17: Print dialog — Impress General page — macOS
Paper Handling
Collate sheets
Allows selected multiple printed copies to be collated into separate documents.
Sheets to Print
Select which slides in the document to print from the drop-down list: (All pages; Odd
only; Even only).
Sheet Order
Selects the page printing order from the drop-down list: Automatic; Normal; Reverse.
Scale to fit paper size
Adjusts the printed slide to fit the paper size.
Destination Paper Size
Only available if Scale to fit paper size has been selected. Selects a paper size from
the options available in the included drop-down list.
Scale down only
Select this option to reduce slide size to fit the paper. Only available if the paper size is
smaller than the slide size.
Watermark
Provides options to print watermark text on the slides, for example Confidential if the
presentation is of a sensitive nature.
Printer info
Shows the details of the selected printer.
Brochure printing
In Writer, Impress, and Draw, documents can be printed in the correct order to form a booklet or
brochure. Below are some examples. Actual brochure printing procedure depends on the
computer operating system and type of printer being used. You may need to experiment to find
the correct method for brochure printing.
Printing | 47
Double sided or duplex printing
Printing a brochure with a printer that is capable of double sided, or duplex printing, makes the
task of creating brochures simpler.
1) Open the Print dialog using one of the following methods:
– Go to File > Print on the Menu bar.
– Use the keyboard shortcut Ctrl+P (macOS ⌘+P).
– Click on Print on the Standard toolbar.
2) Click on General to open the page for general print options and, if necessary, select a
printer from the Printer drop-down list of printers available.
3) Click on Properties to open the printer properties dialog for the printer being used and
check the printer is set to the same page orientation (as specified for the page setup for
the slides). Page orientation is especially important for brochures.
4) Click OK to close the properties dialog and return to the Print dialog.
5) In Range and Copies, select All Slides. A minimum of four slides is required to create a
brochure.
6) In Range and Copies, select Print on both sides (duplex long edge) or Print on both
sides (duplex short edge) option. Normally, long edge binding is used for portrait printing
and short edge binding is used for landscape printing.
7) In Range and Copies, select the Number of copies required to match the required
number of brochures.
8) In Range and Copies, select the Collate option. This option is only active when printing
multiple copies of the same document.
9) In Layout, select Brochure.
10) Click OK to close to the Print dialog and print the required number of pages for the
brochures.
11) If necessary, bind the brochures to match either long edge or short edge binding.
Print previewing
A document can be previewed before it is printed in the Writer and Calc modules. Print
previewing is useful, especially when printing a document double-sided making sure there are no
errors before the document is printed. Print previewing is opened as follows:
1) Open Print Preview using one of the following methods. The Print Preview toolbar
(Figure 18) opens and the Formatting toolbar closes:
– Go to File > Print Preview on the Menu bar.
– Click on Toggle Print Preview on the Standard toolbar.
– Use the keyboard shortcut Ctrl+Shift+O (macOS ⌘+Shift+O).
2) Select the required preview from Single Page Preview, Two Pages Preview, Book
Preview, or Multiple Pages Preview.
Note
When a document is in Print Preview mode, the document cannot be edited. If
necessary, click on Book view in the Status Bar to display the document in book
format. The document can be edited when using Book view on the Status bar.
Click on Single page view to return the document to normal view.
Note
It is recommended to use Safe Mode options from the top down (Figure 19)
because the options get more extreme from the top down.
Note
If problems are not solved using Safe Mode, selecting Advanced provides
instructions on receiving further aid.
Advanced can allow you to create a zip file of a corrupted user profile, and this
file can be uploaded to the bug tracking system for further investigation by the
LibreOffice developers. Remember that an uploaded user profile may also contain
sensitive information such as installed extensions, personal dictionaries, and
user-specific settings.
Chapter 2,
Getting Started with Writer
Word processing with LibreOffice
What is Writer?
Writer is the word processor component of LibreOffice. In addition to the usual features of a word
processor (spelling check, thesaurus, hyphenation, autocorrect, find and replace, automatic
generation of tables of contents and indexes, mail merge, and others), Writer provides these
important features, which are covered in detail in the Writer Guide:
• Templates and styles (see Chapter 4)
• Page layout methods, including styles, frames, columns, and tables
• Automated tables of contents and indexes
• Embedding or linking of images, equations, spreadsheets, and other objects
• Built-in drawing tools
• Master documents, to group a collection of documents into a single document
• Change tracking during revisions
• Lists
• Tables of data
• Database integration, including a bibliography database
• Mail merge
• Export to PDF and EPUB (see Chapter 10)
• Document digital signatures
• Form design and filling
• And many more
Status bar
The Writer Status bar provides information about the document and convenient ways to change
some document features quickly.
Caution
Changing the page style here may affect the styles of subsequent pages,
depending on how the page styles are set up. See the Writer Guide for details.
Text language
Shows the language and localization at the cursor position, or for the selected text, that is
used for checking spelling, grammar, hyphenation, and the thesaurus.
Click to open a menu where you can choose another language or localization for the
selected text or for the paragraph where the cursor is located. You can also choose None
(Do not check spelling) to exclude the text from a spelling check or choose More to
open the Character dialog. Any directly formatted language settings can be reset to the
default language from this menu.
Insert mode
Click to change to Overwrite mode; click again to return to Insert mode. In Insert mode,
any text after the cursor position moves forward to make room for the text you type; in
Overwrite mode, text after the cursor position is replaced by the text you type. This
feature is disabled when in Record Changes mode.
Selection mode
Click to cycle between the selection modes; right-click to select the required mode from a
context menu. The icon does not change, but when you hover the mouse pointer over this
field, a tooltip indicates which mode is active.
Mode Effect
Standard selection Click in the text where you want to position the cursor and
drag to where you want the selection to end. Any previous
selection is deselected.
Extending selection (F8) Clicking in the text extends or crops the current selection.
Adding selection (Shift+F8) A new, separate selection is added to an existing selection.
The result is a multiple selection.
Block selection A block of text can be selected.
(Alt+Shift+F8)
On Windows systems, you can hold down the Alt key while dragging to select a block of
text. You do not need to enter the block selection mode.
Digital signature
If the document has been digitally signed, an icon is displayed here; otherwise, it is blank.
To sign the document, or to view the certificate, click the area or icon. See Chapter 10,
Working with File Formats, Security, and Exporting, for more information.
Sidebar
The Sidebar is normally open by default on the right side of the Writer window. If necessary,
select View > Sidebar on the Menu bar, or press Ctrl+F5, to display it. An example is shown in
Chapter 1, LibreOffice Basics.
The Writer Sidebar contains seven decks by default: Properties, Styles, Gallery, Navigator, Page,
Style Inspector, Manage Changes, and Accessibility Check. Each deck has a corresponding icon
on the Tab bar on the right of the Sidebar, allowing you to switch between them. The decks are
described below.
Each deck consists of a title bar and one or more content panels. Some panels contain a small
More Options button, which opens a dialog to give greater choice of editing controls. When the
dialog is open, the document is locked for other editing.
Properties deck: Contains tools for direct formatting of content.
When text is selected, these panels appear:
– Style: Apply a paragraph style at the cursor position. Create or update a style.
– Character: Modify text by the font type, size, color, weight, style, and spacing.
– Paragraph: Modify the paragraph by alignment, lists or bullets, background color,
indent, and spacing.
Caution
Changing the options on the Page deck modifies the page style in use, affecting
not only the current page but all pages in the document using the same page
style.
Tip
Whenever it is possible to choose the document file format, you should choose to
work with the default ODF format. This reduces the likelihood of errors and
compatibility issues.
Tip
To have Writer save documents by default in a Microsoft Word file format, go to
Tools > Options > Load/Save > General. In the section named Default File
Format and ODF Settings, under Document type, select Text document, then
under Always save as, select your preferred file format.
Note
More information about different file formats can be found in Chapter 10, Working
with File Formats, Security and Exporting
Figure 26: Selecting items that are not next to each other
For more information about keyboard selection of text, see the topic “Navigating and selecting
with the keyboard” in LibreOffice Help (F1).
Pasting text
When you paste text, the result depends on the source of the text and how you paste it. If you
click on the Paste button on the Standard toolbar or use Ctrl+V, any formatting the text has
(such as bold or italics) is retained. Text pasted from websites and other sources may also be
placed into frames or tables. If you do not like the results, click the Undo button or press
Ctrl+Z.
To make the pasted text inherit the paragraph style at the insertion point, do any of the following:
• Choose Edit > Paste Special.
• Click the arrow on the Paste button on the Standard toolbar.
• Double-click the Paste button without releasing the left mouse button.
• Press Ctrl+Shift+V.
Then select Paste Unformatted Text or Unformatted text in the resulting menu. Unformatted
text can also be pasted directly by pressing Ctrl+Alt+Shift+V on the keyboard.
Caution
Use Replace All with caution; otherwise, you may end up with mistakes that you
won’t be able to undo later if you save and close the file. (Ctrl+Z works only
before the file is saved.) A mistake with Replace All might require a manual,
word-by-word, search to fix.
Tip
Regular expressions offer powerful ways to search and replace text. For example,
they can find all instances where any number is followed by specific letters.
However, they can be challenging to understand. Refer to the Help files for
guidance.
For more information on using Find and Replace, see the Writer Guide.
Tip
Different fonts have their own distinct special characters. If you do not find a
particular special character, try changing the Font selection.
Checking grammar
If any grammar errors are detected, they are shown underlined by a wavy blue line. Right-click on
this line to open a context menu.
The first entry in the context menu describes the suspected broken grammatical rule.
Using AutoCorrect
Writer’s AutoCorrect function has a long list of common misspellings and typing errors, which it
corrects automatically. It also includes codes for inserting special characters, emoji, and other
symbols.
AutoCorrect is turned on by default. You may wish to disable some of its features, modify others,
or turn it off completely. To turn AutoCorrect off, uncheck Tools > AutoCorrect > While Typing.
You can add your own corrections or special characters or change those supplied with
LibreOffice. Choose Tools > AutoCorrect > AutoCorrect Options to open the AutoCorrect
dialog. On the Replace tab, you can define which strings of text are corrected and how. In most
cases, the defaults are fine.
To stop Writer replacing a specific spelling, go to the Replace tab, highlight the word pair, and
click Delete. To add a new spelling to the list, type it into the Replace and With boxes on the
Replace tab, and click New.
See the different tabs of the dialog for the other options available to fine-tune AutoCorrect.
Note
Automatic word completion only occurs after you type a word for the second time
in a document.
Using AutoText
Use AutoText to store text, tables, fields, and other items for reuse and assign them to a key
combination for easy retrieval. For example, rather than typing “Senior Management” every time
you use that phrase, you can set up an AutoText entry to insert those words when you type “sm”
and press F3.
To store some text as AutoText:
1) Type the text into your document, then select the text.
2) Choose Tools > AutoText on the Menu bar (or press Ctrl+F3).
3) In the AutoText dialog (Figure 36), type a name for the AutoText in the Name box. Writer
will suggest a one-letter shortcut, which you can change.
4) Choose the category for the AutoText entry, for example My AutoText.
5) Click the AutoText button at the bottom of the dialog and select in the menu either New,
to have the AutoText retain specific formatting, no matter where it is inserted, or New (text
only), to have the AutoText take on the existing formatting around the insertion point.
6) Click Close to return to your document.
To insert AutoText, type the shortcut and press F3.
AutoText is especially powerful when assigned to fields. See the Writer Guide for more
information.
Formatting text
You can format text in two ways. See the Writer Guide for details.
Direct (or Manual) formatting
Applies formatting directly to specific paragraphs, characters, pages, frames, lists, or
tables. For example, you can select a word, then click on a button on the Formatting
toolbar to format the text as bold or italics.
Formatting text | 69
Styles
Bundles formatting options. For example, a paragraph style defines numerous settings for
options such as font type and size, whether paragraphs should be indented, the space
between lines, how paragraphs should be aligned on the page, and many others.
Note
When clearing direct formatting, the text formatting will return to the applied
paragraph and character style and not the default paragraph style or default
character style (unless these styles are actually applied to the text).
Note
Just as direct paragraph formatting overrides the current paragraph style,
applying direct character formatting to characters overrides the current character
style formatting.
Formatting tables
Tables in a Writer document share the same sets of formatting elements as spreadsheets in
LibreOffice Calc. You can format tables manually or using table styles. Writer has predefined
table styles and you can also define your own using the AutoFormat Styles dialog.
Formatting text | 71
To apply a table style, click in the table to be formatted and double-click on a style listed in the
Table Styles tab of the Sidebar’s Styles deck. Alternatively, click in the table to be formatted,
choose Table > AutoFormat Styles on the Menu bar and select a style from the dialog that
opens. For more information, refer to the Writer Guide.
Autoformatting
You can set Writer to format or correct parts of a document automatically as you type, according
to the choices made on the Options and Localized Options tabs of the AutoCorrect dialog (Tools
> AutoCorrect > AutoCorrect Options).
Autoformatting on the Options tab includes URL recognition, bulleted and numbered lists,
capitalizing the first letter of every sentence, and correcting two initial capitals on words.
A bulleted (unordered) list is created when you type a hyphen (-), star (*), or plus sign (+),
followed by a space or tab at the beginning of a paragraph. A numbered (ordered) list is created
when you type a number followed by a period (.), followed by a space or tab at the beginning of a
paragraph.
The Localized Options tab controls the formatting of quotation marks and apostrophes (which
look like a closing single quote). Most fonts include curly quotation marks (also known as “smart
quotes”), but for some purposes (such as marking minutes and seconds of latitude and longitude)
you may wish to format them as straight quotes.
Straight quotes Smart quotes
'' "" ‘’ “”
Tip
If you notice unexpected formatting changes occurring in your document, this is
the first place to look for the cause. In most cases Edit > Undo (Ctrl+Z) fixes
the issue.
Note
List styles are not meant to be used on their own. Rather, they are designed to be
attached to paragraph styles.
Formatting text | 73
Tip
Bullets and numbering applied in these ways cannot be removed with Format >
Clear Direct Formatting on the Menu bar, or with the Clear Direct Formatting
icon on the Formatting toolbar, or by using Ctrl+M. Rather, they are turned off or
removed from selected text by toggling the relevant buttons on the Formatting
toolbar, or on the Sidebar’s Properties deck.
Tip
If numbering or bullets are being applied automatically in a way that you do not
want, you can disable them by going to Tools > AutoCorrect > AutoCorrect
Options and deselecting Bulleted and Numbered List on the Options tab.
The Toggle Unordered List and Toggle Ordered List buttons on the Sidebar’s Properties deck
can also be used to create nested lists. Click the down arrow next to the relevant button, then
click More Bullets/Numbering to access the Bullets and Numbering dialog. However, the
Sidebar does not include tools for promoting and demoting items in the list, as found on the
Bullets and Numbering toolbar.
Tip
Using tabs to space out material on a page is not recommended. Depending on
what you are trying to accomplish, a table or frame might be a better choice.
Caution
Any changes to the default tab setting will affect the existing default tab stops in
any document you open afterward, as well as tab stops you insert after making
the change.
To set the spacing of default tab stop intervals, go to Tools > Options > LibreOffice Writer >
General.
Hyphenating words
You can hyphenate words at the end of a line in two ways: let Writer do it automatically (using
styles and its hyphenation dictionaries), or insert soft hyphens manually where needed. Or, you
can choose to not hyphenate at all.
Note
Turning on hyphenation for the Default Paragraph Style affects all other
paragraph styles that are based on Default Paragraph Style. You can individually
change other styles so that hyphenation is not active; for example, you might not
want headings to be hyphenated.
Formatting text | 75
Any styles not based on Default Paragraph Style are not affected. See Chapter 4,
Working with Styles, Templates, and Hyperlinks, for more about styles based on
styles other than Default Paragraph Style.
Note
Hyphenation options set in Writing Aids are effective only if hyphenation is turned
on through paragraph styles.
Manual hyphenation
Manually hyphenate words when you want only a specific word hyphenated at the end of a line.
Do not use a normal hyphen, which will remain visible even if the word is no longer at the end of
a line when you add or delete text, or change margins or font size. Instead, use a soft hyphen,
which is visible only when required.
To insert a soft hyphen inside a word, click where you want the hyphen to appear (when needed)
and press Ctrl+hyphen or use Insert > Formatting Mark > Insert soft Hyphen. When the
word is at the end of the line it will be hyphenated at this position, even if automatic hyphenation
for this paragraph is switched off.
Tip
Page layout is usually easier if you show text, object, table, and section
boundaries in Tools > Options > LibreOffice > Application Colors, and
paragraph ends, tabs, breaks, and other items in Tools > Options > LibreOffice
Writer > Formatting Aids.
Formatting pages | 77
Figure 44: Header menu
Numbering pages
Displaying the page number
To display page numbers automatically:
1) Insert a header or footer as described in “Creating headers and footers” on page 86.
2) Place the cursor in the header or footer where you want the page number to appear and
choose Insert > Page Number.
3) Change the alignment of the number if you wish (left, right, or center).
Note
The Page Count field inserts the total number of pages in the document, as
shown on the Statistics tab of the document’s Properties dialog (File >
Properties). If you restart page numbering anywhere in the document, then the
total page count may not be what you want. See the Writer Guide for more
information.
Tip
This is also useful for numbering the first page of a document with a page number
greater than 1.
Formatting pages | 79
Line numbering
Line numbers in the margin are often used in legal documents, poetry, and lists of programming
code. Writer can insert line numbers in an entire document or for selected paragraphs. Line
numbers are included when you print the document.
You can choose how many lines are numbered (for example, every line or every tenth line), the
numbering type, and whether numbers restart on each page.
To add line numbers to a document, choose Tools > Line Numbering and select the Show
numbering option in the top left corner of the Line Numbering dialog. Then select any options
you want and click OK.
You can also create a paragraph style that includes line numbering, and apply it to the
paragraphs that you want to add line numbers to. For example, to number the lines of example
code in a document, you will probably want to use a font or indentation that is different from
normal text.
Caution
When you change the margins, the page style is also changed and the changed
margins apply to all pages using that style.
Caution
The two small gray triangles on the ruler are used for indenting paragraphs. The
double-headed arrows shown in Figure 46 are mouse pointers shown in the
correct position for moving the margin markers. Because the triangles and arrows
are often in the same place, when changing page margins you need to be careful
to move the arrows, not the gray triangles.
Note
The margin selections on the Sidebar change all four margins to be the same. If
you require different margins, you need to use the Page Style dialog.
Note
The watermark will automatically become part of the page style where it is
inserted and all other pages of the same style will have the watermark. Pages
with different or no watermarks need different Page Styles for those pages.
Formatting pages | 81
Figure 47: The Watermark dialog
Formatting comments
At the bottom of the comment, Writer automatically adds the author’s name and a time stamp
indicating when the comment was created. If more than one person edits the document, each
author is automatically allocated a different background color. Figure 48 shows an example of
text with comments from two different authors.
Printing comments
When a document contains comments, the print dialog has an option for comments to be printed
next to the text in the right margin, as they appear on the screen. In that case, the text on each
page is scaled down to make space for the comments. The Print dialog also has options for
placing comments at the end of the page or at the end of the document, or for printing only the
comments.
Tip
The language used at the location of the cursor is shown in the Status bar, next to
the page style in use.
Caution
Be careful when changing a language in character or paragraph styles, as this will
change the language for all characters or paragraphs using that style. It may be
useful to include the language in the name of the style.
Languages set with direct formatting will override languages set using styles.
Note
Although these methods are a type of direct formatting, they cannot be cleared by
using Format > Clear Direct Formatting on the Menu bar, clicking the Clear
Direct Formatting icon on the Formatting toolbar, selecting Clear Direct
Formatting in the context menu, or using Ctrl+M.
Note
Not all changes are recorded. For example, changing a tab stop from align left to
align right, and changes in formulas (equations) or linked graphics are not
recorded.
Caution
A document with track changes activated but with the changes not shown carries
an invisible history of document editing that the current user may not be aware of.
Contents deleted or modified can be recovered. While this is a feature, it is also a
potential privacy risk.
Using fields
Fields are extremely useful features of Writer. You can use them for data that changes (such as
the current date or the total number of pages) and for inserting document properties such as
name, author, and date of last update. Fields are the basis of cross-referencing (see below);
automatic numbering of figures, tables, headings, and other elements; and a wide range of other
functions. See the Writer Guide for details.
Using hyperlinks
See Chapter 4, Working with Styles, Templates, and Hyperlinks, for details on creating hyperlinks
within a document and to other documents and websites.
Using bookmarks
You can use bookmarks to rapidly navigate or link to specific locations in a document. They are
listed in the Navigator and can be accessed directly from there with a single mouse click. You can
cross-reference to bookmarks and create hyperlinks to bookmarks, as described above.
To create a bookmark:
1) Select the text you want to bookmark. Click Insert > Bookmark.
2) On the Insert Bookmark dialog, the larger box lists any previously defined bookmarks.
Type a name for this new bookmark in the top box, and then click Insert.
Bookmarks have been enhanced in LibreOffice 7.5. In previous versions, bookmarks could be
used only for location references. Now they also can be used for text references.
Chapter 3,
Getting Started with Calc
Using spreadsheets in LibreOffice
What is Calc?
Calc is the spreadsheet component of LibreOffice. You can enter data (usually numerical) in a
spreadsheet and then manipulate this data to discover results.
Other features provided by Calc include:
• Functions, which can be used to create formulas to perform complex calculations on
data.
• Database functions, to arrange, store, and filter data.
• Dynamic charts, including a wide range of 2D and 3D charts.
• Macros, for recording and executing repetitive tasks; scripting languages supported
include LibreOffice Basic, Python, BeanShell, and JavaScript.
• Ability to open, edit, and save Microsoft Excel spreadsheets.
• Import and export of spreadsheets in multiple formats, including HTML, CSV (without or
with formulas), dBase, PDF, and PostScript.
• Collaborate with others seamlessly by sharing the spreadsheet.
Formula syntax
By default, LibreOffice Calc uses its own formula syntax, referred to as Calc A1, rather than the
Excel A1 syntax used by Microsoft Excel. LibreOffice will translate seamlessly between the two.
However, if you are familiar with Excel you may wish to change the default syntax by going to
Tools > Options > LibreOffice Calc > Formula and choosing Excel A1 or Excel R1C1 in the
Formula syntax drop-down menu.
For more information on formula syntax, see Chapter 8, Using Formulas and Functions, in the
Calc Guide.
Macros
Microsoft Office uses Visual Basic for Applications (VBA) code, and LibreOffice uses Basic code
based on the LibreOffice API. Although the programming languages are the same, the objects
and methods are different and therefore not entirely compatible.
LibreOffice can run some Excel Visual Basic scripts if you enable this feature at Tools > Options
> Load/Save > VBA Properties.
If you want to use macros written in Microsoft Excel using the VBA macro code in LibreOffice,
you must first edit the code in the LibreOffice Basic IDE editor.
For more information, refer to Chapter 13, Calc Macros, in the Calc Guide.
Title bar
The Title bar, located at the top, shows the name of the current spreadsheet. When a
spreadsheet is newly created from a template or a blank document, its name is Untitled X, where
X is a number. When you save a spreadsheet for the first time, you are prompted to enter a name
of your choice.
Menu bar
Under the Title bar is the Menu bar. When you select one of the menu items, a sub-menu drops
down to show commands. You can also customize the Menu bar; see Chapter 13, Customizing
LibreOffice, for more information.
Toolbars
In a default LibreOffice installation, the top toolbar under the Menu bar is called the Standard
toolbar. It is consistent across all LibreOffice applications. The position and use of it and other
toolbars are described in Chapter 1, LibreOffice Basics.
Formula bar
The Formula Bar (Figure 51) is located at the top of the sheet in the Calc workspace. It is
permanently docked in this position and cannot be used as a floating toolbar. However, it can be
hidden or made visible by selecting or deselecting View > Formula Bar on the Menu bar.
Note
In a spreadsheet, the term “function” covers much more than just mathematical
functions. See Chapter 8, Using Formulas and Functions, in the Calc Guide for
more information.
Status bar
The Calc Status bar (Figures 53 and 54) provides information about the spreadsheet as well as
quick and convenient ways to change some of its features. Most of the fields are similar to those
in other components of LibreOffice. See Chapter 1, LibreOffice Basics, for more information.
Sidebar
The Calc Sidebar (View > Sidebar or Ctrl+F5) is located on the right side of the window. It is
similar to the Sidebar in Writer (shown in Chapter 1 and Chapter 2 of this book) and consists of
five decks: Properties, Styles, Gallery, Navigator, and Functions. Each deck has a
corresponding icon on the Tab panel to the right of the sidebar, allowing you to switch between
them. The decks are described below.
Properties
This deck includes five content panels. These panels, with the exception of the Style
panel, have a More Options button that opens a dialog with additional options. These
dialogs lock the document for editing until they are closed.
Style: Access to the available cell styles, update cell styles, and new cell styles.
Character: Controls for formatting the text, such as font family, size, and color. Some
controls, such as superscript, become active only when the text cursor is active in the
Input line of the Formula bar or the cell.
Number Format: Quickly change the format of numbers including decimals, currency,
dates, percentage, or numeric text; and leading zeroes.
Alignment: Controls to align the text in various ways, including horizontal and vertical
alignment, wrapping, indenting, merging, text orientation, and vertical stacking.
Cell Appearance: Controls to set the appearance of cells, including cell background
color, cell border formats including line color and style, and grid lines.
Styles, Gallery, Navigator
These decks are similar to those in Writer. Their use is described in the Calc Guide.
Functions
This deck contains a list of functions organized by category. It is a simpler version of the
Function Wizard, which is opened by selecting Insert > Function on the Menu bar,
pressing the Function Wizard icon on the Formula Bar, or by pressing Ctrl+F2.
Spreadsheet layout
Individual cells
The main section of the workspace in Calc displays the cells in the form of a grid. Each cell is
formed by the intersection of one column and one row in the spreadsheet.
Sheet tabs
Each Calc spreadsheet can contain multiple sheets, which are displayed as tabs at the bottom of
each spreadsheet window. Each new spreadsheet is created with one sheet named Sheet1.
When you create additional sheets, the active sheet is indicated with a white tab (default Calc
setup). You can also select multiple sheets by holding down the Ctrl key while clicking on the
sheet tabs.
To change the default name for a sheet (Sheet1, Sheet2, and so on), right-click on a sheet tab
and select Rename Sheet in the context menu, or double-click on the sheet tab, to open the
Rename Sheet dialog where you can type a new name for the sheet.
To change the color of a sheet tab, right-click on the tab and select Tab Color in the context
menu to open the Tab Color dialog. Select a color and click OK. To add new colors to this color
palette, see Chapter 13, Customizing LibreOffice.
Note
Most CSV files come from database tables, queries, or reports for further
calculations and charting.
Caution
Know how your CSV file is formatted before you open it in Calc. Not knowing how
the CSV is structured is a source for errors and miscalculations.
Saving spreadsheets
For information on how to save files manually or automatically, see Chapter 1, LibreOffice Basics.
Calc can save spreadsheets in a range of formats and also export spreadsheets to PDF, HTML,
XHTML file formats and JPEG and PNG images formats; see Chapter 7, Printing, Exporting, E-
mailing, and Signing, in the Calc Guide for more information.
Note
Once you have saved a spreadsheet in another format, all changes you make to
the spreadsheet will be in that format. For example, if you want to go back to
working with a *.ods version, you must save the file as a *.ods file.
Tip
To have Calc save spreadsheets by default in a file format other than .ods, go to
Tools > Options > Load/Save > General. In the Default File Format and ODF
Settings area, select Spreadsheet in Document type, then in Always save as,
select your preferred file format.
Saving spreadsheets | 99
Exporting values and formulas as a CSV file
Calc can export raw data and calculated data into a CSV file. Figure 59 contains an example of
data for export, and Figure 60 shows the resulting CSV file.
The steps to export are:
1) Click the sheet to be written as a CSV file.
2) Choose Tools > Options > LibreOffice Calc > View on the Menu bar.
3) Under Display, mark the Formulas check box. Click OK.
4) Choose File > Save as.
5) On the Save as dialog, select Text CSV in the File type field.
6) Enter a filename and click Save.
7) From the Export of text files dialog that appears, select the character set and the field and
text delimiters for the data to be exported, and confirm with OK.
Cell navigation
When a cell is selected or in focus, the cell borders are emphasized. When a group of cells is
selected, the cell area is colored. The colors depends on the operating system being used and
how you have set up LibreOffice.
Mouse: Place the mouse pointer over the cell and click the left mouse button.
Cell reference: Delete the existing cell reference in the Name Box on the Formula Bar
(Figure 51 on page 109). Type the new cell reference and press Enter. Cell references
are case-insensitive.
Navigator: Press F5 to open the Navigator (Figure 63) or click the Navigator button on
the Sidebar. Type the cell reference into the Column and Row fields, or use the adjacent
increment / decrement buttons, and press Enter.
Enter key: Moves the cell focus down in a column to the next row. Shift+Enter moves
the focus up in a column to the previous row. You can change the action of the Enter
key; see “Customizing the Enter key” on page 119.
Tab key: Moves the cell focus right in a row to the next column. Shift+Tab moves the
focus to the left in a row to the previous column.
Arrow keys: Use these keys to move the cell focus in the direction of the arrow pressed.
Home, End, Page Up, and Page Down keys perform the following actions:
– Home moves the cell focus to the start of a row.
– End moves the cell focus to the last cell on the right in the row in the right-most
column that contains data.
– Page Down moves the cell focus down one complete screen display.
– Page Up moves the cell focus up one complete screen display.
Sheet navigation
Each sheet in a spreadsheet is independent of the other sheets, though references can create
links between one sheet to another. To navigate between sheets in a spreadsheet:
Navigator – double-click on any of the listed sheets to select the sheet.
Keyboard – Ctrl+Page Down moves one sheet to the right and Ctrl+Page Up moves
one sheet to the left.
Mouse – click on a sheet tab at the bottom of the spreadsheet to select that sheet.
If your spreadsheet contains multiple sheets, then some of the sheet tabs may be hidden. If this
is the case:
• Using the four buttons to the left of the sheet tabs can move the tabs into view (Figure
64).
• Right-clicking on any of the arrows, or the +, opens a context menu where you can select
a sheet (Figure 65).
Note
When you insert a new sheet into a spreadsheet, Calc automatically uses the
next number in the numeric sequence as a name. To improve navigation, rename
sheets in a spreadsheet to make them more recognizable.
Keyboard navigation
You can navigate a spreadsheet using the keyboard, by pressing a key or a combination of keys.
See Chapter 1, Introduction, and Appendix A, Keyboard Shortcuts, in the Calc Guide for the keys
and key combinations you can use for spreadsheet navigation in Calc.
Tip
You can choose a contiguous range of cells by selecting Selection mode field on
the Status bar (Figure 54 on page 110) and selecting Extending selection before
clicking in the opposite corner of the range of cells. Once you are done, make
sure to change back to Standard selection or you may extend a cell selection
unintentionally.
Tip
You can also directly select a range of cells using the Name Box. Click in the
Name Box on the Formula Bar (Figure 51 on page 109). Enter the cell reference
for the upper left-hand cell, followed by a colon (:), and then the lower right-hand
cell reference. For example, to select the range that would go from A3 to C6, you
would enter A3:C6.
Selecting sheets
If you want to make changes to many sheets at once you can select one or multiple sheets in
Calc.
Single sheet
Click on the sheet tab for the sheet you want to select. The tab for the selected sheet
becomes white (default Calc setup).
Multiple contiguous sheets
To select multiple contiguous sheets:
1) Click on the sheet tab for the first desired sheet.
2) Hold down the Shift key and click on the sheet tab for the last desired sheet.
3) All tabs between these two selections will turn white (default Calc setup). Any actions that
you perform will now affect all the highlighted sheets.
Multiple non-contiguous sheets
To select multiple non-contiguous sheets:
1) Click on the sheet tab for the first desired sheet.
2) Hold down the Ctrl key and click on the sheet tab for the each additional desired sheet.
3) The selected tabs will turn white (default Calc setup).
All sheets
Right-click a sheet tab and choose Select All Sheets in the context menu, or select Edit
> Select > Select All Sheets on the Menu bar.
Tip
To see an indicator for hidden columns and rows, enable the option in View >
Hidden Row/Column Indicator.
Deleting cells
1) Select the cells you want to delete. Choose the Sheet > Delete Cells command, press
Ctrl+-, or right-click on a cell and select Delete in the context menu.
2) When the Delete Cells dialog (Figure 68) appears, select the appropriate items and click
OK.
The Move/Copy Sheet command (Figure 70), allows you to determine where the new sheet will
be in the same or a different spreadsheet, where it will be in the spreadsheet, and decide what
the new sheet’s name will be.
1) In the current document, right-click on the sheet tab you wish to move or copy then select
Move or Copy Sheet in the context menu or choose Sheet > Move or Copy Sheet on
the Menu bar.
2) In the Action area, select Move to move the sheet or Copy to copy the sheet.
Caution
When you move or copy a spreadsheet into a new spreadsheet, a conflict may
occur with formulas linked to other sheets in the previous location.
Note
Hidden elements are not visible to users or printed when a spreadsheet is printed.
However, any hidden elements will be copied if you select the elements around
them. For example, if column B is hidden, it is copied when you select columns A
to C. If a hidden row or column is copied, you can reverse the process and show
the element.
Renaming sheets
Every time a new sheet is created, it is named Sheet X (where X is the number of the sheet as
counted by Calc). When Calc is started, the first sheet is named Sheet 1.
A sheet can be renamed with one of the following methods:
• Enter a new name in the Name text box when the new sheet using the Insert Sheet
dialog (Figure 69 on page 123).
• Right-click on a sheet tab and select Rename Sheet in the context menu to replace the
existing name with a different one.
• Double-click on a sheet tab to open the Rename Sheet dialog.
Note
A sheet’s name must start with either a letter or a number and other characters,
including spaces, are not allowed. Apart from the first character of the sheet
name, permitted characters are letters, numbers, spaces, and the underscore
character. Attempting to rename a sheet with an invalid name will produce an
error message.
Deleting sheets
To delete one sheet, perform one of the following actions:
Right-click on the tab of the sheet that you want to delete and select Delete Sheet in the context
menu
Go to Sheet > Delete Sheet on the Menu bar. Click Yes to confirm the deletion.
If you need to delete multiple sheets, select all of the sheets (see “Selecting sheets” on page
121), then right-click on one of the tabs in the group and select Delete Sheet in the context
menu, or go to Sheet > Delete Sheet on the Menu bar. Click Yes to confirm the deletion.
Unfreezing
To unfreeze rows or columns, select the frozen rows and columns then use View > Freeze Rows
and Columns on the Menu bar, or click on the Freeze Rows and Columns icon on the
Standard toolbar. The heavy lines that indicate frozen rows and columns will disappear.
Numbers
Click in the cell and type the number using the number keys on either the main keyboard or the
numeric keypad. By default, Calc right-aligns the numbers in a cell.
Negative numbers
To enter a negative number, either type a minus (–) sign in front of the number or enclose the
number in parentheses(1234). The negative number will be displayed as follows: –1234.
Leading zeroes
If a number is entered with leading zeroes (i.e. 01481), Calc will drop the leading zero by default.
To retain a minimum number of characters in a cell when entering numbers and retain the
number format, for example 1234 and 0012, use one of two methods to add leading zeroes:
Method 1
1) Select the cell that will retain leading zeroes, then access the Format Cells dialog by
doing one of the following:
2) Right-click on the selected cell then choose Format Cells in the context menu
3) Go to Format > Cells on the Menu bar
4) Press Ctrl+1 to open the Format Cells dialog (Figure 74). Then select the Numbers tab
and select Number from the Category list.
5) Find the Options area and choose the Leading zeroes field, then enter the minimum
number of characters required within the selected cell. If you need four characters, enter
4. Any number less than four characters will have leading zeroes added, for example 12
becomes 0012.
6) Click OK. The number in the selected cell retains its number format and any formula used
in the spreadsheet will treat the entry as a number in formula functions.
Tip
To format numbers with decimal places and prevent a leading zero (for example,
“.019” instead of “0.019”), go to the Format code box then type a period or full
stop and add one or more question marks (“?”) For an example of this case, refer
to Figure 74. Each question mark represents a decimal place. For example, for 3
decimal places, type one period and three question marks [.???] and click OK.
Any number with only decimal places will then have no leading zero.
Numbers as text
Numbers can also be entered as text using one of the following methods:
Method 1
1) Select the cell which contains the number, right-click on the cell, and select Format Cells
from the context menu, or go to Format > Cells on the Menu bar, or use the keyboard
shortcut Ctrl+1, to open the Format Cells dialog (Figure 74).Make sure the Numbers
tab is selected, then select Text in the Category list.
2) Click OK. The number is converted to text and, by default, left-aligned.
Method 2
1) Select the cell.
2) On the Sidebar, go to the Properties deck. If necessary, click the Open Panel icon (+ or
arrow) by Number Format to open that panel (Figure 75).
3) Select Text in the category drop-down list. Formatting is applied to the cell immediately.
Note
If a number has been formatted as text in a spreadsheet, it will be treated as a
zero by any formulas in the spreadsheet. Formula functions will ignore text
entries. You can change this feature in Tools > Options > LibreOffice Calc >
Formula. In Detailed Calculation Settings, select Custom (conversion of text to
numbers and more). Click the Details button, and then select the proper
treatment in the Detailed Calculation Settings dialog.
Text
To enter text in a cell, click in the cell and type. By default, text is left-aligned in a cell. Cells can
contain several lines of text. If you want to use paragraphs, press Ctrl+Enter to create another
paragraph.
if you are entering several lines of text, extend the Input line by clicking on the Expand Formula
Bar icon, which is located on the right-hand end of the Formula bar, and then the Input line
becomes multi-line.
Cell fields
If you wish to insert a date, the sheet name, or the document name in a cell, do the following:
1) Select a cell and double-click to activate edit mode.
2) Right-click and select Insert Field > Date, or Sheet Name, or Document Title in the
context menu.
3) Other Date and Time buttons will insert the same information, but it will not be updated or
recalculated as the options mentioned above.
Note
The Insert Field > Document Title command inserts the name of the
spreadsheet. It does not insert the title defined in the Description tab in the
Properties dialog for the file.
Tip
The fields are refreshed when the spreadsheet is saved or recalculated when
using the Ctrl+Shift+F9 shortcut.
AutoCorrect Options
Calc automatically applies many changes during data input using AutoCorrect, unless you have
deactivated any AutoCorrect changes. For more information, refer to Chapter 2, Entering and
Editing Data, in the Calc Guide.You can also undo any AutoCorrect changes by using Edit >
Undo on the Menu bar, pressing the keyboard shortcut Ctrl+Z, or manually by going back to
the change and replacing the automatic correction with what you want.
To change how AutoCorrect works (Figure 76), go to Tools > AutoCorrect Options on the Menu
bar:
Replace tab
Edit the replacement table for automatically correcting or replacing words or
abbreviations.
Exceptions tab
Specify the abbreviations or letter combinations that you do not want corrected
automatically.
Options tab
Select the options for automatically correcting errors as you type.
Localized Options tab
Specify the AutoCorrect options for quotation marks and for options that are specific to
the language of the text.
Reset button
Reset modified values back to their previous values.
AutoInput tool
The AutoInput tool in Calc automatically completes entries, based on other entries in the same
column. By default, AutoInput is activated in Calc. To turn it off, go to Tools on the Menu bar and
deselect AutoInput. When AutoInput attempts to complete a cell entry for you, do the following:
1) If you agree with the suggestion, press Enter or F2 or click the left mouse button and
AutoInput will complete the cell entry for you.
2) If you wish to see how AutoInput would complete the entire column, use the key
combinations Ctrl+Tab to scroll forward, or Ctrl+Shift+Tab to scroll backward.
3) To see a list of all available AutoInput items for the current column, use the keyboard
combination Alt+Down Arrow.
If you are entering a formula that matches previous entries, a Help tip will appear listing the
available functions that start with matching characters. AutoInput ignores the case sensitivity of
any data you enter.
Caution
When you are selecting cells so you can use the Fill tool, make sure that none of
the cells contain data, except for the cell data you want to use. When you use the
Fill tool, any data contained in the selected target cells is overwritten.
Method 1
1) Select one or more cells that contain the contents you want to copy.
2) Drag the mouse pointer to copy the cell in any direction you desire or hold down the
Shift key and click in the last cell you want to fill.
Method 2
1) Select the cell containing the contents you want to copy or start the series from.
2) Move the mouse pointer over the small square in the bottom right corner of the selected
cell. The mouse pointer will change shape.
3) Click and drag in the direction you want the cells to be filled. If the original cell contained
text, then the text will automatically be copied. If the original cell contained a number, a
series will be created.
Method 3
1) Select one or more cells that contain the contents you want to copy.
2) Go to Sheet > Fill Cells on the Menu bar and select the direction in which you want to
copy or create data (Fill Up, Fill Down, Fill Left, or Fill Right), or Fill Series, or Fill
Random Number in the submenu
Tip
Ctrl+D is an alternative to selecting Sheet > Fill Cells > Fill Down on the Menu
bar.
Caution
This technique automatically overwrites, without any warning, any information that
is already in the cells on the selected sheets. Make sure you deselect the
additional sheets when you are finished entering information that is going to be
repeated before continuing to enter data into the spreadsheet.
Editing data
Calc has multiple tools for data editing, including the ability to delete data, replace data, and
change data.
Replacing data
To completely replace data in a cell, select the cell and type in the new data. The new data will
replace the old data but will retain the cell formatting.
Alternatively, select the cell and click in the Input line on the Formula bar (Figure 51 on page
109), then double-click on the data to highlight it completely and type the new data.
Changing data
Calc can allow you to edit the contents of a cell without removing all of the data from the cell. For
example, changing the phrase “Sales in Qtr. 2” to “Sales rose in Qtr” can be done as follows.
Tip
You may want to enable Tools > Options > LibreOffice Calc > General > Press
enter to switch to edit mode. If you are using macOS, select this option from
the Preferences menu. Then, when you press the Enter key in a selected cell, the
cell switches to edit mode, eliminating the need to press F2.
Deleting data
Deleting data only
To delete only the data in a cell or range of cells, without deleting any of the cell formatting, select
the cells and then press the Delete key.
To completely delete cells, rows, or columns, see the instructions on page 122.
Formatting data
Note
All the settings discussed here can be set as a part of the cell style. See Chapter
5, Using Styles and Templates, in the Calc Guide for more information.
Automatic wrapping
To automatically wrap multiple lines of text in a cell, use one of the following methods:
Method 1
1) Right-click on the cell and select Format Cells in the context menu to open the Format
Cells dialog.
Caution
Merging cells can lead to calculation errors in formulas used in the spreadsheet.
Splitting cells
You can split a cell that was created from several cells by selecting a merged cell and doing the
following:
Go to Format > Merge Cells > Split Cells on the Menu bar, or right-click and select Split Cells
in the context menu, or click on the Merge and Center Cells icon on the Formatting toolbar.
Any data in the cell will remain in the first cell. If the hidden cells did have any contents before the
cells were merged, then you have to manually move the contents in to the correct cell.
Formatting numbers
Calc allows you to apply number formats by using icons on the Formatting toolbar. Select the
cell, then click the relevant icon to change the number format.
For more control or to select other number formats, use the Numbers tab of the Format Cells
dialog (Figure 74 on page 129):
• Apply any of the data types in the Category list to the data.
• Control the number of decimal places and leading zeroes in the Options area.
• Enter a custom format code.
Tip
For consistency in a spreadsheet, use cell styles whenever possible.
Note
The new AutoFormat is stored in your computer user profile and is not available
to other users. However, other users can import the new AutoFormat by selecting
a common style from a table range in the spreadsheet and defining it as a new
AutoFormat.
Using themes
Calc comes with a predefined set of formatting themes (set of styles) that can be applied to
spreadsheets. You cannot add new themes to Calc, but you can modify a theme’s styles after the
theme is applied to the spreadsheet. All modified styles are only available for use in that
spreadsheet.
To apply a theme to a spreadsheet:
1) Go to Format > Spreadsheet Theme on the Menu bar or click the Spreadsheet Theme
icon on the Tools toolbar to open the Theme Selection dialog (Figure 86).
2) Select the theme that you want to apply. The theme styles are immediately visible on the
underlying spreadsheet.
3) Click OK.
Caution
Applying a new theme over an existing one will override all existing theme styles
customization with the new theme styles.
Filtering data
When Calc filters values, it matches them against a list of conditions. If the value meets those
conditions, it is displayed on the spreadsheet. Calc provides three types of filters:
Standard – Specifies the logical conditions to filter the data. It allows filtering by text color
or background color.
AutoFilter – Filters data according to a specific value or string. Automatically filters the
selected cell range and adds list boxes to the top row, where you can choose the items
that you want to display.
Advanced – Uses filter criteria from specified cells.
Cell protection
Cells can be password-protected to prevent unauthorized users from making changes to them.
Protected cells can optionally be hidden. Use the Cell Protection tab of the Format Cells dialog
(Figure 87) to set up cell protection and toggle the hidden status of protected cells.
Sorting records
When Calc sorts cells in a sheet, they are arranged by multiple user-specified criteria that are
sorted in a specified order. Sorts are useful when you are searching for a particular item and
become even more useful after you have filtered data.
Also, sorting allows you to add new information to the bottom of your spreadsheet then use a sort
to put the values in their proper order. When a spreadsheet is long, it is usually easier to add new
information at the bottom of the sheet, rather than adding rows in their correct place. After you
have added information, you can then sort the records to update the spreadsheet.
For more information on sorting records and the sorting options available, see Chapter 2,
Entering and Editing Data, in the Calc Guide.
To use the Sort dialog on cells in a spreadsheet:
1) Select the cells to be sorted.
2) Go to Data > Sort on the Menu bar, or click the Sort icon on the Standard toolbar, to
open the Sort dialog (Figure 90).
Creating formulas
Functions and formulas can be entered directly into the Formula bar or by using the Function
Wizard. To launch the function wizard, click the Function Wizard icon to the right of the Name
Box, or select Insert > Function on the Menu bar, or press Ctrl+F2.
Inside the Function Wizard, you can choose from the many built-in Calc functions available.
When you search for a term in the Function Wizard, function descriptions are provided as well as
their names. You can also choose to complete functions from within the Wizard rather than
having to type full formulas into the Formula bar.
Each function, when selected, will display a brief explanation of its use and acceptable syntax. It
will also allow you to enter the information required by that function and a result window will
showing the expected calculation from the data entered.
Note
A fast alternative to the Function Wizard is the Functions deck on the Sidebar,
where you can quickly list and narrow down functions. It provides brief
explanations on their use and syntax, but does not provide the search or data
entry capabilities of the full wizard.
LibreOffice Calc offers powerful built-in functions under multiple domains or categories, including
Database, Date & Time, Financial, Information, Logical, Mathematical, Array, Statistical,
Spreadsheet, Text, and Add-in functions.
Analyzing data
Calc includes many tools to help you analyze information, including features for copying and
reusing data, for automatically creating subtotals, and other ways to vary information and help
you find the answers you need. These tools are divided between the Tools and Data menus.
Calc also includes many tools for statistical analysis, and they can help you can obtain important
numerical information on data obtained from physical measurements, polls, or even business
transactions such as sales, stock quotations, and so on. These statistical data analyses are
available in the menu Data > Statistics.
See Chapter 10, Data Analysis, in the Calc Guide for more information on the these tools.
Pivot charts
To get a quick visual representation of the data contained in a pivot table, you can generate a
pivot chart. Functionally, pivot charts are nearly identical to regular charts except in two key
areas. First, as the data in the pivot table is altered, the pivot chart will adjust itself automatically.
Second, a pivot chart includes field buttons, which are graphical elements that allow you to filter
the content of the pivot table from within its pivot chart.
For more information on pivot charts and charts in general, see Chapter 3, Creating Charts and
Graphs, and Chapter 9, Using Pivot Tables, in the Calc Guide.
Printing
Printing from Calc is similar to printing from other LibreOffice components (see Chapter 1,
LibreOffice Basics), but some details in printing in Calc are different, especially regarding
preparation for printing.
After print ranges have been defined, they are formatted with automatic page breaks. To view the
page breaks, go to View > Page Break on the Menu bar.
Print ranges
Print ranges can be used to print a specific part of the data and print selected rows or columns on
every page. For more information about using print ranges, see Chapter 7, Printing, Exporting,
Emailing, and Signing in the Calc Guide.
Note
The additional print range will print as a separate page, even if both ranges are
on the same sheet.
Printing options
To select the printing options for page order, details, and scale to be used when printing a
spreadsheet:
1) Go to Format > Page Style on the Menu bar to open the Page Style dialog (Figure 92).
2) Select the Sheet tab and make your selections from the available options. Click OK.
Printing | 135
Figure 92: Page Style dialog – Sheet tab
Inserting a break
To insert a page break:
1) Navigate to the cell where the page break will begin.
2) Go to Sheet > Insert Page Break on the Menu bar.
3) Select Row Break to create a page break above the selected cell. Select Column Break
to create a page break to the left of the selected cell.
Deleting a break
To remove a page break:
1) Navigate to a cell that is next to the break you want to remove.
2) Go to Sheet > Delete Page Break on the Menu bar.
3) Select Row Break or Column Break as needed.
Note
Multiple manual row and column breaks can exist on the same page. When you
want to remove them, you have to remove each break individually.
For more information on manual breaks, see Chapter 7, Printing, Exporting, E-mailing, and
Signing, in the Calc Guide.
Printing | 137
6) To change the appearance of the header or footer, click on More to open the Border /
Background dialog.
7) To set the contents, for example page number, date and so on, that appear in the header
or footer, click Edit to open the Header (or Footer) dialog.
Chapter 4,
Working with Styles,
Templates, and Hyperlinks
Using consistent formatting in documents
Introduction
To ensure formatting consistency in LibreOffice documents, users can control text and other
elements by using templates, styles and direct formatting. Direct formatting is also known as
manual formatting. Understanding how to format documents unlocks the power of LibreOffice.
Styles
A style in LibreOffice is a collection of formatting attributes that can be applied to text and
other objects. If text or object shares a style in LibreOffice, then that text or object shares
the chosen attributes of that style. For example, a paragraph style can include settings
such as font type and size, indents, spacing between lines, alignment on a page, and so
on.
All LibreOffice installations share a default set of styles that cannot be deleted, but can be
modified to suit the user’s formatting requirements. Also, new styles can be created and
these styles can be deleted.
Templates
A template is a document that allows users to generate new documents that has pre-
existing contents and a set of specific formatting styles, graphics, tables, objects, and so
on. Templates are used as a basis for creating several similar documents for company
documents, or user guides. For example, define paragraph and character styles in a
document, then save the document as a template. Then the command New >
Templates… can be used to create a new document with the same look and feel of that
template.
New documents created in LibreOffice use a default template that is hard coded into
LibreOffice. This default template can be changed to suit personal or corporate
requirements.
When LibreOffice is installed on a computer, a number of predefined templates are also
installed, providing a starting point for different types of documents, such as business
letters, presentations, or drawings.
Direct (or manual) formatting
Applies formatting directly, or manually, to selected text. For example, select a word, then
click on a tool on the Formatting toolbar, the Sidebar, or use a keyboard shortcut to format
the text as bold or italic. However, using direct formatting can produce documents with a
mismatch of formatting attributes.
Styles
Working with styles
A style allows you to apply a set of common formatting elements to pages, text, frames, cells,
graphic objects, and so on. Each style has a name such as “Body Text” and “Document Title.”
Using styles can quickly change the format, or appearance, of selected elements.
If you do not use styles and manually format paragraphs, words, tables, page layouts, and other
elements in documents, this can increase user workload and introduce format errors into a
document. Styles provide consistency in documents. LibreOffice recommend the use of styles to
reduce the workload and increase the accuracy of producing good documents with ease.
Since LibreOffice styles may work differently from other office software programs, some planning
may be needed, but that effort will save time and effort over the longer term. Also, Writer relies on
heading styles (or other styles if specified) when compiling a table of contents.
Style categories
See Table 5 on which style categories are available for each module. For more information, see
the specific user guide for each LibreOffice module. All the styles are defined as:
Page styles
Controls margins, headers and footers, borders and backgrounds. In Calc, page styles
also define the sequence for printing sheets.
Paragraph styles
Controls all the formatting elements of a paragraph, such as text alignment, tab stops, line
spacing, and borders, and can include character formatting.
Character styles
Affects the formatting of text within a paragraph, such as the font and size of text, or
modifies elements such as bold and italic.
Table styles
Apply predefined formats to tables and table elements in a text document.
Frame styles
Format graphic and text frames, including text wrap, borders, backgrounds, and columns.
List styles
Allows selection of format and positioning of numbers or bullets in lists.
Cell styles
Format cell data, such as fonts, alignment, borders, background, number formats (for
example, currency, date, number), and cell protection.
Drawing styles
Format drawings and presentations, such as line, area, shadowing, transparency, font,
connectors, dimensioning, and other attributes.
Presentation styles
Format font, indents, spacing, alignment, and tabs.
Table 5: Style categories available in LibreOffice modules
Style Category Writer Calc Draw Impress
Page Yes Yes
Paragraph Yes
Character Yes
Frame Yes
List Yes
Table Yes
Cell Yes
Presentation Yes
Drawing Yes Yes
Styles | 141
Style types
See Table 6 on which style types are available for each module. For more information on styles,
see the user guide for that LibreOffice module. Generally, the LibreOffice style types are:
Hierarchical
Displays the styles in the selected category in a hierarchical list. To view the styles inside
a sub-level, click on the chevron > next to the style name.
All Styles
Displays all styles of the selected style category.
Hidden Styles
Displays the styles that have been hidden in the document. Hiding styles removes, but
does not delete, selected styles from the list of displayed styles.
Applied Styles
Displays the styles of the selected category that have been applied in the current
document.
Custom Styles
Displays all user-defined styles in the selected style category.
Automatic
Displays styles appropriate to the current context.
Text Styles
Displays formatting styles for text.
Chapter Styles
Displays formatting styles for headings.
List Styles
Displays formatting styles for ordered or unordered lists.
Index Styles
Displays formatting styles for indexes.
Special Styles
Displays formatting styles for headers, footers, footnotes, endnotes, tables, and captions.
HTML Styles
Displays a list of styles for HTML documents.
Conditional Styles
Displays the user-defined conditional styles.
Table 6: Style types available in LibreOffice modules
Style Type Writer Calc Draw Impress
Hierarchical Yes Yes Yes Yes
All Styles Yes Yes Yes Yes
Hidden Styles Yes Yes Yes Yes
Applied Styles Yes Yes Yes Yes
Custom Styles Yes Yes Yes Yes
Automatic Yes
Text Styles Yes
List Styles Yes
Index Styles Yes
Special Styles Yes
HTML Styles Yes
Conditional Styles Yes
Styles | 143
– For Writer or Calc only, go to Styles > Manage Styles on the Menu bar.
– Use the keyboard shortcut F11 (macOS ⌘+T).
– Click on Styles on the right of the Sidebar.
2) To display a preview of styles in the Styles deck, select Show previews at the bottom of
the Styles deck.
3) To select a style category, click on one of the icons at the top of the Styles deck to display
the styles available in the selected category. See “Style categories” on page 161 for more
information on available style categories for each LibreOffice module.
4) To select a style type, click on the drop-down list to open it and select the style type
required. The style types available depends on which LibreOffice module is open and the
type of document being edited. See “Style types” on page 162 for more information on
available style types for each LibreOffice module.
5) To apply a style to an element, position the cursor in text, or select an object, in the
document, then double click on the required style in the Styles deck on the Sidebar.
Splotlighting styles
LibreOffice Styles deck on the sidebar also provides a tool to spotlight paragraph and character
styles as well as direct formatting present in the document. The Spotlight tool is handy to assist in
housekeeping the document with respect to the styles in use and direct formatting. To enable the
spotlight feature proceed as follow:
1) Open the Styles deck on the Sidebar as indicated above.
2) Mark the Spotlight checkbox at the bottom of the Styles deck (Figure 95).
• The paragraph spotlight indicator is codified using numbers and colors displayed in the
left margin. They correspond to the numbers and colors displayed in the Styles deck.
• The character spotlight indicator is codified using number and colors displayed in a call-
out. They also correspond to the numbers and colors displayed in the Styles deck.
• Paragraphs with direct formatting are indicated by a hatch pattern in the Spotlight colored
indicators on the margin.
Note
Choose Format > Spotlight Character Direct Formatting to activate the
character direct formatting visual indicator.
Styles menu
The Styles menu is available in LibreOffice's Writer and Calc modules. It displays the default set
of styles available in the Styles deck on the Sidebar (Figure 97 for Writer and Figure 98 for Calc).
These styles are factory set and available in all LibreOffice installations.
1) Locate the text or element where the style will be applied. If necessary, select it.
2) Go to Styles on the Menu bar.
3) Click on the style name to apply its attributes to the selected text, or element.
Figure 97: Styles submenu in Writer Figure 98: Style submenu in Calc
Calc
In this module, select cells, right-click to bring up the context menu, then select Styles to apply a
style to those cells.
Styles | 145
Formatting toolbar
Writer
If a paragraph style has been created and applied to text, the style name will appear in the Set
Paragraph Style drop-down list at the left-hand end of the Formatting toolbar.
1) Click in a paragraph to select that style.
2) Click on Set Paragraph Style on the Formatting toolbar to open the drop-down list.
3) Select the required paragraph style from the options available in the drop-down list to
apply it to the selected paragraph.
Calc
After a style has been created in Calc and applied to one or more cells, the style name appears
in the Apply Style drop-down list at the left-hand end of the Formatting toolbar.
1) Click in a cell to select it.
2) Click on Apply Style on the Formatting toolbar to open the drop-down list.
3) Select the required cell style from the options available in the drop-down list to apply it to
the selected cell.
Keyboard shortcuts
In Writer, keyboard shortcuts can apply paragraph styles to selected paragraphs and also allow
users to perform some edits on styles, as shown in Table 98.
Table 7: Paragraph style and style editing keyboard shortcuts
Style name & editing function Windows & Linux macOS
Body Text Ctrl+0 ⌘+0
Heading 1 Ctrl+1 ⌘+1
Heading 2 Ctrl+2 ⌘+2
Heading 3 Ctrl+3 ⌘+3
No List Ctrl+Shift+F12 ⌘+Shift+F12
Edit Style Alt+P ⌥+P
Update Selected Style Ctrl+Shift+F11 ⌘+Shift+F11
New Style from Selection Shift+F11 Shift+F11
Manage Styles F11 F11
Note
If a style has been selected in Inherit from on the dialog Organizer page, any
formatting changes to this style are also carried out on the new style that is
created.
Styles | 147
5) In the New Style from Selection dialog, enter a name for the new style in Enter new style
name text box.
6) Click OK to create the new style in the selected style category using the selected
formatting options and close the dialog.
Note
The New Style from Selection dialog displays a list of custom styles that are
available in the document. By default, a new style created from a selection is
placed in the Custom Styles.
Editing styles
When LibreOffice is installed onto a computer, a default set of styles is included. It provides a
starting point for creating documents with styles. These default styles cannot be deleted, but can
be edited to match the formatting requirements for documents.
All user-created styles can be edited or deleted. For more information on creating styles, see
“Creating new styles” on page 167.
Styles can be edited using one of the following methods:
• Dragging and dropping a formatted element into the Styles deck in the Sidebar.
• Select a formatted element and edit its style.
• Use AutoUpdate to edit paragraph and frame styles only.
• Add styles from another document or template into a document.
Note
Any editing, or changes made to a style are effective only in the current
document. To edit or change styles in more than one document, the template has
to be changed, or styles loaded from another document.
Styles | 149
4) Update the style using one of the following methods:
– At the top of the Sidebar, click on the chevron ˅, or triangle ▼next to Styles actions
and select Update Selected Style from the context menu.
– In Writer or Calc, go Styles > Update Selected Style on the Menu bar.
– Using Set Paragraph Style for Writer, or Apply Style for Calc, click on the
chevron ˅, or triangle ▼next to the selected style and select Update to Match
Selection from the context menu.
– Use the keyboard shortcut Ctrl+Shift+F11 (macOS ⌘+Shift+F11).
Using AutoUpdate
When the AutoUpdate option is selected on the Organizer page of the Paragraph Style, or
Frame Style dialog, a style is updated whenever you directly format a paragraph or frame that is
in that style. In Writer, AutoUpdate only applies to paragraph and frame styles. See the Writer
Guide for more information on AutoUpdate.
Renaming styles
In LibreOffice, only custom styles can be renamed.
1) Open the Styles deck on the Sidebar.
2) In the Styles drop-down list at the bottom of the Sidebar, select Custom Styles so you
can see any custom styles that are available in the document.
3) Select the style that is going to be renamed from the displayed list of custom styles.
4) Right-click on the selected style and select Modify from the context menu to open the
style dialog for the selected type of of style.
Note
If Modify is grayed out in the context menu, then the selected style cannot be
renamed.
Deleting styles
Only custom styles can be deleted.
1) If not already open, open the Styles deck on the Sidebar.
2) In the styles category drop-down list at the bottom of the Sidebar, select Custom Styles
to display any custom styles that are available in the document.
3) Select the style that is going to be deleted from the displayed list of custom styles. To
delete multiple styles, hold down the Ctrl key (macOS ⌘) while selecting styles.
4) Right-click on the selected style and select Delete from the context menu.
5) Click on Apply to delete the selected style, then click OK to close the style dialog.
Note
If Delete is grayed out in the context menu, then the selected style cannot be
deleted.
Page styles
Page styles can be created in Writer or Calc. For more information on page styles, see the Writer
Guide and the Calc Guide. For example, you can create a style that is only applied to the first
page.
To create a new page style in Writer, do the following:
1) Open a new text document and open the Styles deck on the Sidebar.
2) Open the Page Styles panel and select Page Styles at the top of the Styles deck.
3) Click on Styles actions at the top of the Styles deck and select New Style from
Selection from the context menu to open the New Style from Selection dialog
4) Add the name of the new page style in the Enter new style name text box and click OK.
This closes the New style from Selection dialog and the new page style appears in the
Page Styles panel.
5) Right-click on the new page style in the Page Styles panel and select Modify from the
context to open the Page Style dialog.
6) Modify and format the page with the options available on the Page Style dialog.
7) Click OK to save the changes and close the Page Style dialog.
8) To apply the new page style, double-click on the required page style.
Templates
A template is a document that contains user-specified formatting styles, graphics, tables, objects,
and other information. LibreOffice can use a template to generate new documents with a
common content and a common format. For example, you can add the outline of a report and
also define paragraph and character styles in a document, save the document as a template, and
then use the template to create a new document with the same report outline and styles.
All documents in LibreOffice are based on templates. The software has a number of predefined
templates that can be used to create different types of documents, including business letters,
presentations, or drawings. Templates can be created to suit your requirements. Also, templates
can be downloaded from the LibreOffice website using the following link:
https://extensions.libreoffice.org.
If a blank document is created in LibreOffice, then the software uses the appropriate LibreOffice
default template. If required, this default template can be replaced by a custom template to suit
user requirements, see “Setting default template” on page 174 for more information.
Templates | 151
Figure 100: Templates dialog
Creating a template
Any formatting element in a document can be saved in a template: for example, printer settings;
file paths; text or object colors; and so on. Also, predefined text and graphics can be added to a
template.
Template wizard
Writer has a Template Wizard which speeds up the template creation process. For more
information on the Template Wizard, see the Writer Guide.
1) Go to File > Wizards on the Menu bar and select Letter, Fax, or Agenda to start a
template for one of those types of documents. The Letter Wizard dialog is shown in
Figure 102.
2) Go through the wizard and go through the steps as the wizard instructs.
3) Click on Finish and a Save as dialog opens.
4) Navigate to the required folder where the template is going to be saved.
5) Enter a file name in the text box using the file extension OTT for document templates.
6) Click on Save to save the new template and close the Save as dialog. The new template
appears in the list of templates available.
Templates | 153
Figure 102: Letter Wizard dialog
Editing templates
Default LibreOffice templates cannot be edited. Only templates that are created or imported can
be edited.
Note
Any document created from a template before editing can be updated to show the
changed template settings the next time the document is opened. A confirmation
dialog opens asking if the updated styles are to be used or keep the old styles. If
keep the old styles is selected, then the document continues to use the old styles
without any confirmation.
Organizing templates
LibreOffice templates must be in specific LibreOffice template folders. New LibreOffice template
categories can be created and used to organize LibreOffice templates. For example, separate
template categories for different projects or clients. Templates can also be imported and
exported.
Tip
The location of folders used LibreOffice template categories varies with computer
operating systems. To learn where the template folders are stored on a computer,
go to Tools > Options > LibreOffice > Paths (macOS LibreOffice >
Preferences > LibreOffice > Paths).
Templates | 155
Figure 103: New Category dialog
Note
LibreOffice’s default template categories or categories using the Extension
Manager cannot be deleted. Only custom categories that have been created in
Impress can be deleted.
Moving templates
1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog.
2) Right-click on the template that is going to be moved and select Move from the context
menu.
3) In the Select Category dialog (Figure 104), select a category from the displayed list of
categories, or enter a name in the Create a New Category box to create a new category
for the template.
4) Click OK to move the template to its new category and close the Select Category dialog.
Note
Only custom templates can be moved between categories. Templates supplied
with LibreOffice or installed with the Extension Manager cannot be moved.
Deleting templates
1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog.
2) Right-click on the template being deleted and select Delete from the context menu.
Note
Templates supplied with LibreOffice, or installed using the Extension Manager,
cannot be deleted. Only templates that have been created in LibreOffice, or
imported from other sources, can be deleted.
Renaming templates
1) Go to File > New > Templates or File > Templates > Manage Templates on the Menu
bar to open the Templates dialog .
2) Right-click on the template being renamed and select Rename from the context menu.
3) Enter a new template name in the text box that has opened, then click on OK to save the
new template name.
Note
Templates supplied with LibreOffice or installed with the Extension Manager,
cannot be renamed. Only templates that have been created in LibreOffice or
imported from other sources can be renamed.
Importing templates
LibreOffice uses the term “repositories” when it refers to sources for templates. A repository can
be a directory on a computer or a location on the internet. The community-created template
repository for LibreOffice is at https://extensions.libreoffice.org/.
If a template is in a different location on the computer, then the template must be imported into a
LibreOffice category for LibreOffice to recognize the template.
1) To import a template onto the computer, go to https://extensions.libreoffice.org/ or another
internet location and download the required template to your computer.
2) Open the Templates dialog by selecting File > New > Templates or File > Templates >
Manage Templates on the Menu bar.
3) Find the Filter drop-down lists then select the required document type and template
category.
4) Click on Manage at the top right of the Template dialog and open the Open dialog by
selecting Import from the context menu.
5) Use the Open dialog, to find the folder where the template is located on the computer.
6) Display the available templates by selecting the Templates in the File type box.
7) Select the template and click Open toimport template into the selected category.
Exporting templates
1) Open the Templates dialog by selecting File > New > Templates or File > Templates >
Manage Templates on the Menu bar.
2) Activate the context menu by right-clicking on the template to be exported then select
Export from the menu. A file browser window will appear.
3) Navigate to the folder where the template will be exported and click on OK. The template
is exported to the selected location and the browser closes.
Templates | 157
Hyperlinks
In LibreOffice, hyperlinks allow you to create references to web pages and other elements in
remote locations.
Inserting hyperlinks
1) Select the location where the hyperlink will be inserted.
2) Go to Insert > Hyperlinks on the Menu bar or use the keyboard shortcut Ctrl+K
(macOS ⌘+K) to open the Hyperlink dialog (Figure 105).
3) On the left hand side, determine whether the hyperlink will be absolute or relative.
4) Click Apply to insert the hyperlink into the document.
5) Click Close or OK to close the dialog.
Tips
LibreOffice automatically converts website URLs into hyperlinks. To turn off this
function, go to Tools > AutoCorrect Options > Options and deselect URL
Recognition.
To change the color of hyperlinks, go to Tools > Options > LibreOffice >
Application Colors (macOS LibreOffice > Preferences > LibreOffice >
Application Colors), and scroll to the Unvisited links and/or Visited links
checkboxes. Select them, choose new colors from the color palettes for the links,
and click OK. Note that this color change changes the color for all hyperlinks
across all LibreOffice modules.
Note
In Writer and Calc, the Navigator can be used to insert hyperlinks. For
information, see the Writer Guide and Calc Guide.
Hyperlink types
To choose a hyperlink type, go to Insert > Hyperlinks on the Menu bar or use the
keyboard shortcut Ctrl+K (macOS ⌘+K) to open the Hyperlink dialog.
Internet
Select either Web or FTP protocol. Enter the required web address in the URL text box
and a name for the hyperlink in the Text text box (Figure 105).
Hyperlinks | 159
Figure 107: Hyperlink dialog — Document page
Editing hyperlinks
1) Select a hyperlink using one of the following methods (depends on the module):
– Click anywhere in the hyperlink text.
– Click and drag a selection marquee over the hyperlink text to display a text box
border and selection handles.
– Double-click on a hyperlink to open an editing box.
2) Select editing mode and open the Hyperlink dialog using one of the following methods:
– Click on Insert Hyperlink on the Standard toolbar.
– Go to Edit > Hyperlink on the Menu bar.
– Use the keyboard shortcut Ctrl+K (macOS ⌘+K).
– Right-click and select Edit Hyperlink from the context menu.
3) Modify the link in the Hyperlink dialog then click Apply to save the changes. The
Hyperlink dialog remains open.
4) Once you have finished editing hyperlinks, click on OK to close the Hyperlink dialog.
Removing hyperlinks
To turn a hyperlink into plain text, right-click on the link and select Remove Hyperlink from the
context menu. To delete a hyperlink, select the hyperlink and press the Delete or Backspace
key.
Hyperlinks | 161
Getting Started Guide 7.6
Chapter 5,
Working with Images and
Graphics
Images, Graphics, Gallery, Drawing Tools, Fontwork
Introduction
Adding image and graphic files to LibreOffice documents consist of the following types:
• Image and graphic files, for example photos, drawings, PDF documents, and scanned
images.
• Diagrams created using LibreOffice Draw.
• Artwork created using clipart or Fontwork.
• Charts created using LibreOffice Calc.
• Images, clipart and diagrams from the LibreOffice Gallery.
This chapter provides basic instructions and information for image and graphic files. For more
detailed information and instructions on image and graphic files, see the specific user guide
available for each LibreOffice module.
Editing
To edit photos and other bitmap images, use a bitmap editor. To edit line drawings, use a vector
drawing program. There is no need to use additional graphic applications because LibreOffice
Draw has the capability to edit images and graphics.
Freely available Open-source tools are also a good alternative when editing image and graphic
files, for example GIMP (bitmap editor) and Inkscape (vector drawing program). Open-source
tools and many other Open-source applications work on Windows, macOS, and Linux operating
systems.
Adding
Image and graphic files can be added to a document using one of the following methods:
• Inserting a file directly from a graphics program, or a scanner.
• Dragging images and graphics from a clipart gallery.
• Copying and pasting from a source on a computer.
Note
To link an image, or graphic, file instead of embedding, hold down the
Ctrl+Shift keys (macOS ⌘+Shift) while dragging the file.
Note
Embedding
If the source document is closed before the image is pasted into the target
document, the image stored on the clipboard could be lost.
Embedding linked image, or graphic, files breaks the link to the file and becomes part of the
document. Linked images, or graphics can be embedded as follows:
1) Open a document in LibreOffice and go to Edit > External Links on the Menu bar to
open the Edit Links dialog (Figure 110).
Scanning
If a scanner is connected to a computer, LibreOffice can use the scanning software to scan an
image, graphic, or document, then place the scanned media into the open document. The
following scanning procedure is an example of how to insert scanned media into a document.
1) Go to Insert > Media > Scan > Select Source on the Menu bar and select the scanning
source from the list of available devices.
2) Click in the document where the scanned media is to be inserted.
3) Place the media for scanning onto the selected scanner.
4) Go to Insert > Media > Scan > Request on the Menu bar to open the scanning software.
5) Click on Preview in the scanning software to scan the media and a preview image
appears in the scanning software.
6) Adjust settings for image quality, size, and other attributes in the scanning software.
7) Click on Scan in the scanning software and the media is scanned. A scanned copy of the
media is inserted into the LibreOffice document.
8) Click on Close in the scanning software to close the scanning application.
Note
The scanning software must be an application that LibreOffice recognizes and is
compatible to scan and insert media into a document.
After a scanning sources has been selected, LibreOffice remembers the selected
scanning source. This eliminates the need to select a scanning source each time
scanned media is inserted into a document.
Image toolbar
When an image is inserted, or an image is selected in the document, the Image toolbar opens
automatically. If the Image toolbar does not open, go to View > Toolbars on the Menu bar and
select Image from the submenu. Two other toolbars also become available when an image is
selected:
• Image Filter toolbar, which can be used as a floating toolbar.
• Color toolbar, which opens as a separate floating toolbar.
Using these three toolbars together, corrections and adjustments can be applied to an image.
Also, special effects can be applied, such as transparency, color adjustment, flipping and
rotation, and special effect filters.
Cropping
If only a part of an image, or graphic, is to be used in a document, it can be cropped. LibreOffice
provides two ways to crop an image, or graphic:
• Crop tool — available as a tool on toolbars, or in a context menu after right-clicking on an
image, or graphic. The Crop tool provides a quick and easy way to crop an image, or
graphic.
• Crop page in the Writer Image dialog — accessed by right-clicking on the image, or
graphic, and selecting Properties in the context menu. The Crop page provides more
control when cropping.
Note
When an image, or graphic, is inserted into a LibreOffice document and is
cropped, the image, or graphic, itself is not cropped. LibreOffice masks the parts
of the image, or graphic, that have been cropped. If the document is exported as
HTML, the original image, or graphic, is also exported. For exporting individual
cropped images, or graphics, see “Exporting” on page 197.
Resizing
To fit an image, or graphic, into a LibreOffice document, it may have to be resized. The quickest
way to resize an image, or graphic, is to use the selection handles as shown by the following
example.
1) Click on an image, or graphic, to display the selection handles.
Positioning
After inserting an image, or graphic, into a LibreOffice document, it may have to be repositioned
to achieve the correct document format. The quickest way to resize an image, or graphic, is to
use the cursor as shown by the following example.
1) Select an image, or graphic, to display the selection handles.
2) Move the cursor over a selected image, or graphic, and the cursor changes shape to a
grabbing cursor. The grabbing shape depends on the computer setup and the computer
operating system.
3) Click and drag the selected image, or graphic, to the desired position. During movement,
a ghost image appears helping with repositioning (Figure 113).
4) Release the cursor when the image, or graphic, is in the desired position.
Tip
The arrow keys on the keyboard can also be used to quickly move a selected
image, or graphic, into a new position.
Rotating images
After inserting an image, or graphic, into a LibreOffice document, it can be rotated to achieve the
correct document format. The quickest way to rotate an image, or graphic, is to use the cursor as
shown by the following example.
1) Click on an image, or graphic, to display the selection handles.
2) Click again (NOT double-click) on the selected image, or graphic, switching on rotation
mode, or go to Format > Rotate on the Menu bar.
3) Move the cursor over one of the corner handles and the cursor changes shape indicating
the movement direction.
4) Click on a corner selection handle and move in the direction required to rotate the object.
Only the corner selection handles are active for rotation.
5) When satisfied with the rotation, release the cursor.
6) To restrict the rotation angles to multiples of 15 degrees, press and hold the Shift key
while rotating the image. This is useful for rotating images through a right angle, for
example from portrait to landscape. Remember to release the Shift key before
releasing the cursor.
7) To change the rotation center of the object, click and drag the central pivot point to the
desired position before rotating. The central pivot point can be moved to any position on
the document, even outside of the image boundaries.
Flipping
After inserting an image, or graphic, into a LibreOffice document, it can be flipped either
vertically, or horizontally. Depending on which LibreOffice module is being used, use one of the
following methods to quickly flip an image, or graphic:
• Right-click on the selected image, or graphic, and select Flip > Vertically or Horizontally
from the context menu.
• Click on Vertically, or Horizontally on the Line and Filling toolbar.
• Click on Flip Vertically, or Flip Horizontally on the Image toolbar.
• Go to Format > Flip > Vertically, or Horizontally on the Menu bar.
• Go to Format > Rotate or Flip > Flip Vertically, or Flip Horizontally on the Menu bar
• Click on Flip Vertically, or Flip Horizontally in the Position and Size panel on the
Properties deck of the Sidebar.
Arranging
LibreOffice organizes images and graphics in a stack. The image, or graphic, on the top level of a
stack covers the images and graphics on the lower levels, if any overlapping occurs. Select
images, or graphics, and use one of the following methods to change the stack level:
• Click on the required arrange tool on the Line and Filling toolbar.
Exporting
To use another graphics application to edit an image, or graphic, the file is exported directly from
the document. The following procedure is an example only. Actual procedure depends on the
computer operating system and computer setup.
1) Right-click on the image, or graphic.
2) Select Save from the context menu to open the Image Export dialog (Figure 115).
3) Navigate to the folder where the image, or graphic, is going to be exported to.
4) Enter a file name in the File name text box and select the file type from the options
available from the drop-down list in File type.
5) Click on Save to export the file and close the dialog.
6) Open the graphics program, then navigate to the folder where the file is located.
7) Carry out the necessary editing to the file and save the file in the required format. The
image, or graphic, can then be re-inserted back into the document.
Compressing
If an image, or graphic, has a large file size, it can be compressed to reduce the file size. This
results in a smaller file size for the document, but may result in a loss of quality when the image,
or graphic, is compressed. The following procedure is an example only. Actual procedure
depends on the computer operating system and computer setup.
1) Right-click on the image, or graphic.
2) Select Compress from the context menu to open the Compress Image dialog
(Figure 116).
3) Use options available in Compression and Resolution to compress the image, or
graphic.
4) If necessary, click on Calculate New Size and check the file file size of the compressed
image, or graphic.
5) Click on OK to save the changes and close the dialog.
6) If the resulting image is not acceptable, undo the changes and repat the procedure using
different compression settings.
LibreOffice Gallery
Graphics in the Gallery are grouped by themes, such as Arrows, Diagrams, and Icons, and are
installed when LibreOffice is installed on a computer. The Gallery can be displayed in Icon View
(Figure 111 on page 192), or Detailed View (Figure 117).
Default themes
Images and graphics in the Gallery are grouped by themes, such as Arrows, Bullets, Diagrams
and so on. These default themes are listed alphabetically in the box at the top of the Gallery deck
on the Sidebar. Click on a theme name to see its images and graphics displayed in the Gallery
deck.
The Gallery default themes are read-only. No images or graphics can be added to or deleted
from these themes. The default themes are easily identified by right-clicking on a theme name
and the only available option in the context menu is Properties.
Custom themes
Custom themes, when added to the Gallery, are the only themes where images and graphics can
be added. Custom themes are listed alphabetically, along with the default themes, in the box at
the top of the Gallery deck on the Sidebar. Custom themes are easily identified by right-clicking
on a theme name and the options available in the context menu are Delete, Rename, and
Properties.
Tip
Gallery themes are available from the LibreOffice extensions website at
https://extensions.libreoffice.org/. This website also includes themes from
previous versions of LibreOffice that are no longer installed when newer versions
of LibreOffice are installed. See Chapter 13, Customizing LibreOffice for
information on managing extensions.
Creating themes
1) Open the Gallery deck in the Sidebar using one of the following methods:
– Go to Insert > Media > Gallery on the Menu bar.
– Click on Gallery in the Sidebar.
2) Click New at the bottom of the Gallery deck and the Properties of New Theme dialog
opens (Figure 118).
3) Click on General and type a name for the new theme in the text box.
4) Click OK to save the new theme and close the dialog. The new theme is displayed in the
list of themes in the Gallery.
Note
The name of the Properties of New Theme dialog changes to show the name of
the newly created custom theme in the Gallery deck.
Note
Images and graphics in custom themes are linked files and are deleted from the
Gallery only. The original image and graphic files are not deleted.
Updating themes
All images and graphics in the Gallery are linked files. It is recommended that any custom
themes are updated on a regular basis to make sure that all the files are still available.
1) Open the Gallery deck and select a custom theme that contains at least one image or
graphic.
Note
The location of Gallery themes installed using LibreOffice extensions are
determined by the extension settings.
Note
The value _self for the target frame works in the vast majority of occasions. It is
not recommended to use the other selections unless absolutely necessary.
Tip
When creating complex drawings, it is recommended to use LibreOffice Draw to
make use of more advanced drawing features, for example drawing layers and
styles.
Drawing toolbar
An example Drawing toolbar is shown in Figure 121. If the Drawing toolbar is not displayed, it can
be opened by going to View > Toolbars > Drawing on the Menu bar, or by clicking on Show
Draw Functions on the Standard toolbar.
The default tools available on a Drawing toolbar do vary slightly between the LibreOffice
modules. Tools can be added to a Drawing toolbar using Visible Buttons, or customizing the
toolbar. See Chapter 12, Configuring LibreOffice, Chapter 13, Customizing LibreOffice for more
information, or the specific user guide for each LibreOffice module.
Note
The following procedures are examples only using LibreOffice Writer. Actual
procedures depend on the LibreOffice module being used, computer operating
system, and computer setup.
Changing properties
1) Click on Select on the Drawing toolbar, then select the drawing object.
2) On the Drawing Object Properties toolbar, select each property tool required for the
drawing object.
3) If necessary, select the property value from the available options.
4) Select the type of drawing object required on the Drawing toolbar.
5) Click and drag to create the drawing object using the selected properties.
Grouping objects
This section gives only a brief introduction to grouping of objects. An example of grouping two
objects together is shown in Figure 123. For more information on working with grouped objects,
see the specific user guide for each LibreOffice module.
Grouping of objects is similar to putting objects into a container. Objects within a group are
moved together as one object and any changes made are applied globally to the objects within
the group. A group can always be undone and the objects that make up the group can always be
manipulated separately.
Permanent grouping
1) Objects are grouped together using one of the following methods:
– Hold down the Shift key whilst clicking multiple objects on a slide.
– Click and drag the cursor to create a marquee around multiple objects. Release the
cursor and all the objects within the marquee are selected.
– To select all the objects on the slide, go to Edit > Select All on the Menu bar, or use
the keyboard shortcut Ctrl+A (macOS ⌘+A).
2) With selection handles displayed, use one of the following methods to create a group of
selected objects:
– Go to Format > Group > Group on the Menu bar.
– Use the keyboard shortcut Ctrl+Shift+G (macOS ⌘+Shift+G).
– Right-click on an object within the selected group and select Group from the context
menu.
Fontwork
With Fontwork, graphical text art objects can be created to make a document more attractive.
There are many different settings for text art objects (line, area, position, size, and more) giving a
large selection of effects. Fontwork is available with the Writer, Calc, Draw, and Impress modules
of LibreOffice, but there are small differences in the way that each module displays Fontwork.
Creating Fontwork
1) Click on Insert Fontwork Text on the Drawing toolbar, or go to Insert > Fontwork on the
Menu bar to open the Fontwork Gallery dialog (Figure 126).
2) Select a Fontwork style from the dialog and click OK. The selected Fontwork appears
centrally on the page and the dialog closes.
3) Double-click on the Fontwork text graphic to switch on editing mode.
4) Type in the required text to replace the default text in the Fontwork graphic and the text
appears over the default text as shown by the example in Figure 127.
5) Press Esc key, or click outside the Fontwork graphic and the text replaces default text.
Fontwork | 185
Figure 128: Fontwork panel in Properties deck on Sidebar
Fontwork toolbar
The Fontwork toolbar (Figure 125) becomes visible and active when a Fontwork object is
selected. If the toolbar is not visible, go to View > Toolbars > Fontwork on the Menu bar. Also,
the Fontwork panel opens in the Properties deck on the Sidebar (Figure 128) and contains the
same tools as the Fontwork toolbar.
Insert Fontwork Text
Opens the Fontwork Gallery dialog.
Fontwork Shape
Changes the shape of the selected object. Clicking on the triangle ▼ next to Fontwork
Shape opens the Fontwork Shape sub-toolbar (Figure 129) allowing selection of different
Fontwork shapes.
Generating
1) Go to Insert > OLE Object > QR and Barcode on the Menu bar to open the QR and
Barcode Code dialog.
2) Enter the required information in the URL/Text field. This can be, for example, a website
address, or a product number.
3) Select the error correction factor from the options available in Error correction. This is the
complexity of the graphic generated.
4) Enter the margin required in the Margin text box. The margin is placed around the code
when it is generated.
5) Select the type of code from the options available in the Type drop-down list.
6) Click OK to generate the code and close the QR and Barcode dialog.
Editing
1) After the barcode, or QR code has been generated, right-click in the code and select Edit
Barcode from the context menu to open the QR and Barcode dialog.
2) Make the necessary changes to the information in the QR and Barcode dialog.
3) Click OK to regenerate the code and close the QR and Barcode dialog.
Chapter 6,
Getting Started with Impress
Presentations in LibreOffice
What is Impress?
Impress is the presentation (slide show) program included in LibreOffice creating presentations in
the Open Document Presentation (ODP) format. ODP presentations can be opened by other
presentation software, or exported in different presentation formats.
Slides can contain many different elements, including text, bulleted and numbered lists, tables,
charts, and a wide range of graphic objects such as clip art, drawings, and photographs. Impress
also includes a spelling checker, a thesaurus, text styles, and background styles.
This chapter introduces some features of Impress and does not attempt to cover all of the
features available in Impress that can be used to create presentations. See the Impress Guide
and LibreOffice Help for more information.
To use Impress for more than very simple presentations requires some knowledge of the
elements used on the slides. Slides containing text use styles to determine the appearance of
that text. Creating drawings in Impress is similar to the Draw module included in LibreOffice. For
more information, refer to Chapter 4, Working with Styles, Templates, and Hyperlinks, and
Chapter 7, Getting Started with Draw, in this guide. It is recommended to consult the Draw Guide
for more details on how to use the drawing tools.
Starting Impress
Start Impress using any of the methods described in Chapter 1, LibreOffice Basics. The main
Impress window opens and, by default, the Select a Template dialog (Figure 132) displaying
templates installed with LibreOffice.
Tips
To start Impress without the Select a Template dialog, deselect Show this dialog
box at startup in the lower left of the dialog.
In Windows or Linux, go to Tools > Options > LibreOffice Impress > General
on the Menu bar (macOS LibreOffice > Preferences > LibreOffice Impress >
General) and deselect Start with Template Selection under New Document.
The Slides pane and/or Sidebar can be closed by clicking the X in the upper right
corner of each pane, or go to View > Slide Pane or View > Sidebar on the Menu
bar to deselect. To reopen a pane, select View > Slide Pane or View > Sidebar
on the Menu bar.
Menu bar
The Impress Menu bar, at the top of the main window, provides several menus common to all
LibreOffice modules. The commands may differ between each LibreOffice module for File, Edit,
View, Insert, Format, Tools, Window, and Help. Impress has two extra menus for Slide and
Slide Show. When a menu item is selected, a submenu opens to show commands. The Menu
bar can be customized; see Chapter 13, Customizing LibreOffice.
Slides pane
The Slides pane contains thumbnail images of slides in a presentation in the order in which the
slides are shown. Clicking on a slide image in the Slides pane selects it and places the slide in
the Workspace where changes are made to the displayed slide.
• To display or close the Slides pane, go to View > Slide Pane on the Menu bar.
• To close the Slides pane, click on the X in the right top corner of the Slides pane.
• To display or hide the Slides pane, use the Hide/Show marker on the left of the
Workspace.
Several additional operations can be carried out on one or more slides in the Slides pane. Also,
these additional operations are available from a context menu when right-clicking on a slide in
the Slides pane.
• Add new slides to a presentation.
• Hide a slide so that it will not show in a presentation.
• Delete a slide from a presentation.
• Rename a slide.
• Duplicate a slide (copy and paste).
• Move a slide to another position in the slide order by dragging and dropping it to the
desired position.
Also, the following operations can be carried out, although there are more efficient methods than
using the Slides pane:
• Change the slide transition following the selected slide, or after each slide in a group.
• Change the sequence of slides in the presentation.
• Change the slide design.
• Change slide layout for a group of slides simultaneously.
Sidebar
The Sidebar, normally located on the right side of the Workspace, is similar to the Sidebar in the
other LibreOffice module and consists of eight decks. To display or hide the Sidebar, use one of
the following methods:
• Go to View > Sidebar on the Menu bar.
• Use the keyboard shortcut Ctrl+F5 (macOS ⌘+F5).
• Use the Hide/Show marker on the right of the Workspace (Figure 133 on page 221).
• To hide the Sidebar, click on the X in the right top corner of the Sidebar.
• To display the Sidebar, click on one of the Sidebar icons to open a deck.
Properties
The Properties deck (Ctrl+Alt+1, macOS ⌘+⌥+1) has ten panels, allowing changes to slide
layout and formatting of slide objects.
• When a slide is selected and appears in the Workspace, the Properties deck opens with
the Slide and Layouts panels available.
• When a slide object is selected, the panels in the Properties deck become available:
Character, Lists, Paragraph, Area, Shadow, Line, Position and Size, Columns,
Effect, and Image. Actual panels displayed depends on the type of object selected.
Styles
In the Styles deck (Ctrl+Alt+2, macOS ⌘+⌥+2), drawing and presentation styles are applied
to a selected object, new styles created for drawing and presentation, and formatting changes to
both types of styles. When saving changes to a style, the changes are applied to all of the
elements formatted with that style in the presentation. For more information on styles, see
“Styles” on page 251 and the Impress Guide.
Gallery
Using the Gallery deck (Ctrl+Alt+3, macOS ⌘+⌥+3), an object is inserted into a
presentation either as a copy or as a link. A copied object is independent of the original object.
Changes to the original object have no effect on the copy. A link remains dependent on the
original object. Changes to the original object are also reflected in the linked object. See the
Impress Guide for more information.
Navigator
The Navigator deck (Ctrl+Alt+4, macOS ⌘+⌥+4) displays all objects contained in a
presentation. It provides a convenient way to move between slides in a presentation, or select an
object on a slide. It is recommended to give slides and objects in a presentation meaningful
names for easy identification when using the Navigator. For more information, see “Navigator” on
page 226 and the Impress Guide.
Shapes
The Shapes deck (Ctrl+Alt+5, macOS ⌘+⌥+5) provides panels for quick selection of basic
shapes that are available on the Drawing toolbar: Lines and Arrows, Curves and Polygons,
Connectors, Basic Shapes, Symbol Shapes, Block Arrows, Flowchart, Callout Shapes,
Stars and Banners, and 3-D Objects.
Slide transition
The Slide Transition deck (Ctrl+Alt+6, macOS ⌘+⌥+6) provides a selection of slide
transitions used in a presentation. There are controls to adjust transition speed, automatic or
manual transition, and how long a selected slide is shown (automatic transition only). For more
information on transitions, see “Slide transition” on page 264 and the Impress Guide.
Master slides
The Master Slides deck (Ctrl+Alt+8, macOS ⌘+⌥+8) provides access to slide designs for
presentations and several designs of master slides are available. The default master slide is
blank, but the remaining master slides have backgrounds and styled text. For more information
on master slides, see “Working with master slides” on page 251 and the Impress Guide.
Rulers
Rulers are positioned on the upper and left-hand sides of the Workspace. If the rulers are not
visible, go to View > Rulers on the Menu bar. The rulers show the size of a selected object on
the slide using double lines (highlighted in Figure 134). Rulers are also used to manage object
handles and guide lines when positioning objects.
To change the measurement units of the rulers, right-click on a ruler and select the measurement
unit from the drop-down list, as shown in Figure 135 for the horizontal ruler. The horizontal and
vertical rulers can be set to different measurement units.
The page margins in the drawing area are also represented on the rulers. The margins can be
changed directly on the rulers by dragging them with the mouse. The margin area is indicated by
either a grayed out area on the rulers or borders around the unused area of the ruler. This margin
indication depends on computer setup and operating system.
Status bar
The Status bar (Figure 136), located at the bottom of the Impress window, contains information
that maybe useful when working on a presentation. Several of the fields are the same as those in
other modules of LibreOffice. Some Impress specific fields are described briefly below.
For details on the contents and use of these fields, see Chapter 1, LibreOffice Basics, in this
guide and the Impress Guide. To hide the Status bar, go to View on the Menu bar and deselect
Status Bar.
Slide number
The slide number currently displayed in the Workspace and the total number of slides in
the presentation.
Information area
This changes depending on the object selected on the slide. Examples of the information
displayed are shown in Table 8.
Table 8: Examples of information on Status Bar
Navigator
The Navigator displays all objects contained in a presentation providing a convenient way to
move around a presentation find items in the presentation, and reorder objects on slides.
To open the Navigator dialog (Figure 137) go to View > Navigator on the Menu bar, or use the
keyboard shortcut Ctrl+Shift+F5 (macOS ⌘+Shift+F5). Alternatively, click on Navigator in
the Sidebar to open the Navigator deck which is similar in appearance and function as the
Navigator dialog.
Toolbars
Toolbars provide several tools that are used for creating slides for a presentation. To display or
hide the various toolbars in Impress, go to View > Toolbars on the Menu bar and select the
required toolbar in the submenu that opens. For example, the Standard and Drawing toolbars are
displayed by default, but the Line and Filling, and Text Formatting toolbars are not shown. For
more information on toolbars and how to use them, see Chapter 1, LibreOffice Basics, and the
Impress Guide.
Note
The appearance of toolbar icons varies depending on the computer operating
system, and the selection of icon size and style in Tools > Options > LibreOffice
> View (macOS LibreOffice > Preferences > Options > LibreOffice > View).
Workspace views
The Impress workspace has four standard views selected using tabs: Normal, Outline, Notes,
and Slide Sorter. These tabs are normally displayed the top of the Workspace (Figure 133 on
page 221). If the tabs are not displayed, then go to View > Views Tab Bar on the Menu bar. Also,
different workspace views can be selected by going to View on the Menu bar and selecting a
view in the submenu. Each of the workspace views is designed to ease the completion of certain
tasks.
Master views only become available in the Workspace when Master Slide, Master Notes or
Master Handout are selected. There are no tabs for master views and can only be selected by
going to View on the Menu bar.
Normal view
Normal view is the main standard view for creating individual slides in a presentation. In Normal
view slides are designed, text or graphics added and formatted, and any animation effects added
to text or graphics.
To place a slide in Normal view of the Workspace, either click on the slide thumbnail in the Slide
Pane or click on the slide name in the Navigator.
Outline view
Outline view (Figure 138) contains all the slides of the presentation in their numbered sequence.
It shows topic titles, bulleted lists, and numbered lists for each slide in outline format. Only the
text contained in the default text boxes in each slide is shown. If text boxes or graphic objects
have been added to the slides, then these objects are not displayed. Slide names are not
included.
• Use Outline view for the following tasks:
– Make changes in the text of a slide:
– Add or delete text in a slide as in Normal view.
– Move a paragraph in a slide up or down by using the movement arrows on the Outline
toolbar (Figure 139).
Notes view
Use Notes view (Figure 140) to add notes to a slide. These notes are not seen when the
presentation is shown to an audience using an external display connected to a computer. Click
on the words Click to add Notes and begin typing.
The Click to add notes text box can be resized using the resizing handles which appear when the
edge of the notes box is selected. Move or change the size of the box by clicking and dragging
on the box border.
When text is inserted in the Click to add notes text box, it is automatically formatted using the
predefined Notes style in Presentation Styles in the Styles deck on the Sidebar. The Notes style
can be formatted to the presentation requirements. For more information on editing styles, see
Chapter 4, Working with Styles, Templates and Hyperlinks in this guide and the Impress Guide.
Creating presentations
By default, Impress opens with the Select a Template dialog (Figure 132 on page 220) displayed
allowing the selection of a template for a new presentation. To create a new presentation without
a template, click on Cancel in the Select a Template dialog and a blank slide opens in the
Workspace and Slides pane. For more information on creating presentations, slide show options,
and presentation settings, see the Impress Guide.
Tip
The first thing to do is decide on the purpose of a presentation and plan
accordingly. Having an idea of audience type, structure, content, and how the
presentation will be delivered, saves a lot of time from the start.
New presentation
When creating a new presentation, Impress shows only one slide in the Slides pane and
Workspace.
Duplicating slides
To duplicate a slide, select a slide for duplication in the Slides pane and use one of the following
methods. A duplicate slide is inserted after the selected slide in the presentation.
• Right-click on a slide in the Slides pane and select Duplicate Slide in the context menu.
• Go to Slide Sorter view in the Workspace, right-click on a slide and select Duplicate
Slide in the context menu.
• Go to Slide > Duplicate Slide on the Menu bar.
• Click on the Duplicate Slide icon on the Presentation toolbar.
Slide format
Click on Properties on the Sidebar and open the Slide panel (Figure 144) to display the format
options available for a presentation. The Slide panel allows for quick formatting of all slides
included in a presentation and selecting master slides for a presentation. For more information on
formatting slides and using master slides, see the Impress Guide.
Tip
To view the names for slide layouts, use the tooltip feature. Position the cursor on
an icon in the Layouts panel (or on any other tool icon) in the Properties deck on
the Sidebar and its name is displayed in a small rectangle.
Slide contents
Several layouts can contain one or more content boxes, as shown by the example in Figure 145.
Each of these content boxes can be configured to contain the following elements. For more
information on layout content boxes, see the Impress Guide.
Note
Text and graphic elements can be readjusted at any time during the preparation
of a presentation. However, changing slide layout that already has contents can
have a dramatic effect. If the layout is changed after contents have been added,
the contents are not lost, but they may need to be reformatted.
Note
It is recommended that changes to slide elements in the layouts included in
Impress are only made using Normal view, which is the default. Attempting any
changes to a slide element when in Master view is possible, but may produce
unpredictable results. Using Master view requires extra care as well as a certain
amount of trial and error.
Removing elements
1) Select a contents box, or an element to highlight it and the selection handles are
displayed.
2) Press the Delete or Backspace key to remove the contents box or element.
Adding text
There are two ways of adding text to a slide — contents box or text box. For more information,
see “Adding and formatting text” on page 237 and the Impress Guide.
Contents box
Click on Click to add Text in the contents box and type the text. Outline styles are
automatically applied to the text as it is inserted. If required, change the outline level of
each paragraph as well as its position within the contents box by using the arrow buttons
on the Outline toolbar and Workspace Outline view.
Text box
Click on Insert Text Box on the Standard toolbar or Drawing toolbar to select text mode,
then click on the slide. A text box is created and the Text Formatting toolbar automatically
opens. Type the text and click outside the text box to end text mode.
Modifying presentations
By default, a presentation displays all the slides in the same order as they appear in Slide Sorter
view on the Workspace. Run the presentation at least once, then answer the following questions:
• Are the slides in the correct order? If not, some of the slides have to be moved.
• Is the information well spaced and visible to members of an audience at the back of a
large room? The audience may not be able to see information at the bottom of a slide, so
redesign the presentation to fit the top three-quarters of a screen.
• Would an additional slide make a particular point clearer? If so, create another slide.
Note
If the toolbars are not visible, go to View > Toolbars on the Menu bar and select
the required toolbars in the drop-down list.
Text boxes
1) Make sure Normal view is selected in the Workspace.
2) Select the slide where the text is to be added.
3) For horizontal text: click on the selected slide and create a text box using one of the
following methods:
– Single line text box — select Insert Text Box, click on the slide and then type or
paste the text. The width of the text box increases as text is added creating a single
line of horizontal text.
– Single line text box — use the keyboard shortcut F2, click on the slide and then type
or paste the text. The width of the text box increases as text is added creating a
single line of horizontal text.
– Multiple line text box — select Insert Text Box, or use the keyboard shortcut F2, click
on the slide and drag to the approximate width required for the text box, then type or
paste the text into the text box. The width of the text box is fixed and the height of the
text box increases automatically as text is added creating multiple lines of horizontal
text.
– Multiple line text box from a single line text box — use the Enter key to create a new
paragraph, or the keyboard combination Shift+Enter to create a line break in the
text.
Vertical text
In addition to normal text boxes, where text is horizontally aligned, it is possible to insert text
boxes where the text is vertically aligned. Vertical text is available only when Asian languages are
selected in Tools > Options > Language Settings > Languages (macOS LibreOffice >
Preferences > Language Settings > Languages).
Creating vertical text boxes is similar to creating horizontal text boxes. Use the Insert Vertical
Text tool on the Standard, Drawing, or Text toolbars to create a vertical text box with single or
multiple lines of text. See “Text boxes” on page 238 on how to create a text box for single or
multiple lines of text.
Note
AutoLayout text boxes automatically adjust font size of any text inserted into the
box. For example, if a long piece of text is inserted into an AutoLayout text box,
the font size may decrease in size to fit into the box.
Pasting text
Text can be added to an AutoLayout, or normal text box, by copying it from another document
and pasting it into Impress. The formatting of pasted text will probably not match the formatting of
the surrounding text, or that of the other slides in the presentation. This maybe what is required
on some occasions. However, to make sure that the presentation style is consistent and does not
become a patchwork of different styles, font types, bullet points, and so on, the text has to be
formatted to match the rest of the presentation.
Unformatted text
It is good practice to paste text without formatting and apply the formatting later.
1) Highlight and copy the text from another document or slide.
2) Create a text box on a slide and make sure the text cursor is flashing in the text box.
Alternatively, select an AutoLayout text box on a slide. See “Text boxes” on page 238 and
see “AutoLayout text boxes” on page 238 and the Impress Guide for more information.
3) Paste unformatted text into the text box using one of the following methods. Text is pasted
at the cursor position in the text box formatted using the Default Drawing Style, or
Presentation Style if text was pasted into an AutoLayout text box.
– Go to Edit > Paste Special > Paste Unformatted Text on the Menu bar.
– Click on the triangle ▼to the right of the Paste tool on the Standard toolbar and select
Unformatted Text in the context menu.
Note
The Presentation style used in AutoLayout text boxes cannot be changed by
selecting another presentation style. Make sure the AutoLayout text box uses the
presentation style required. Change outline levels and outline styles using the
Tab key or Shift+Tab key combination. See the Impress Guide for more
information.
Note
Drawing styles can be created in Impress and are only available for the
presentation which is being created and has been saved. Templates can also be
created that include any drawing styles required. For more information, see the
Impress Guide.
Creating lists
The procedure to create an unordered (bulleted) or ordered (numbered) list varies depending on
the type of text box used. The tools to manage and format a list are the same. To change the
appearance of a list, see “Changing list type” on page 243.
Note
In AutoLayout text boxes, promoting or demoting an item in the list corresponds to
applying a different outline style. The second outline level corresponds to Outline
2 style, the third outline level to Outline 3 style, and so on. A change in level and
style produces other changes, for example, to font size, bullet type, and so on.
Text boxes
Create an unordered or ordered list in a text box as follows:
Notes
The Bullets and Numbering dialog can also be opened by going to Format >
Bullets and Numbering on the Menu bar, or by right-clicking on a list point and
selecting Bullets and Numbering from the context menu.
If a list was created in an AutoLayout text box, then the Outline styles can be
modified to change the list type and/or format. Changes made to an Outline style
apply to all the slides that use that style. See the Impress Guide for more
information.
Text in a presentation can be formatted into columns inside text boxes and
objects. However, columns cannot be used on separate parts of text inside a text
box or object. The whole of the text box or object has to be used for columns.
Text columns
The type of columns used in Impress are continuous flow columns. This means that when text
reaches the bottom of a column, it automatically flows into the next column as text is added. This
type of columns is also known as newspaper columns.
Note
Any text inside a text box, or graphic object, automatically flows into column
format when the changes are saved.
Inserting images
1) Open the slide in Normal view on the Workspace where the image is going to be
inserted.
2) Open the Insert Image file browser using one of the following methods:
– Go to Insert > Image on the Menu bar.
– Click on Insert Image on the Insert toolbar (Figure 155).
– Click on Insert Image on the Standard toolbar.
3) Navigate to the location of the file and select the image file required.
4) Click Open to place the image in the center of the slide.
5) Reposition and resize the image to the presentation requirements.
Inserting tables
When a table is inserted into a slide, the Table toolbar (Figure 156) automatically opens. The
Table toolbar in Impress offers the same functions as the Table toolbar in Writer, with the
exception of the calculation functions Sort and Sum. To use Sum and Sort in a presentation, a
Calc spreadsheet has to be inserted into the slide.
Entering data into table cells is similar to working with text box objects. Click in a cell and begin
typing. To move around cells quickly, use the following keyboard options:
• Use the arrow keys to move the cursor to another cell if the cell is empty, or to the next
character if the cell already contains text.
• Press the Tab key to move to the next cell on the right, or press Shift+Tab to move to
the next cell on the left.
Note
Select More Options at the bottom of the Insert Table grid (Figure158) to open the
Insert Table dialog (Figure 157) where the number of rows and columns required
can be selected.
Inserting charts
To insert a chart into a selected slide in Normal view on the Workspace, use one of the following
methods:
• Go to Insert > Chart on the Menu bar.
• Click on Insert Chart on the Insert toolbar.
Spreadsheets
Spreadsheets embedded in Impress include most of the functionality of Calc spreadsheets and
are capable of performing complex calculations and data analysis. If the data has to be analyzed
or formulas applied, then these operations are best performed in a Calc spreadsheet and the
results displayed in an embedded Calc spreadsheet or in an Impress table. For more information
on spreadsheets, see the Impress Guide and the Calc Guide.
OLE objects
Object Linking and Embedding (OLE) is a software technology that allows linking and embedding
of spreadsheets, charts, drawings, formulas, and text files into an Impress presentation.
The major benefit of using OLE objects is that it provides a quick and easy method of editing the
object using tools from the software used to create the object. These file types can all be created
using LibreOffice and OLE objects can be created from new or from an existing file.
Styles
All of the characteristics of master slides are controlled by styles. The styles of any new slide
created are inherited from the master slide from which it was created. In other words, the styles
of the master slide are available and applied to all slides created from that master slide.
Changing a style in a master slide results in changes to all the slides based on that master slide.
It is possible to modify each individual slide without affecting the master slide.
Master slides have two types of styles — presentation styles and drawing styles. The
presentation styles included with Impress can be modified, but new presentation styles cannot be
created or deleted. The drawing styles included with Impress can be modified, but cannot be
deleted. However, new drawing styles can be created and these drawing styles can be deleted.
Note
It is highly recommended to use the master slides whenever possible. However,
there are occasions where manual changes are needed for a particular slide, for
example editing an individual slide to enlarge the chart area when the text and
chart layout is used.
Master slides
Impress comes with a collection of master slides, which are are shown on the Master Slides deck
of the Sidebar (Figure 163).
This deck has three panels: Used in This Presentation, Recently Used, and Available for
Use. Click the expand marker on the title bar of a panel to expand it and show thumbnails of the
master slides, or click the collapse marker to collapse the panel to hide the thumbnails.
Each of the master slides shown in the Available for Use panel are from templates that are
available in LibreOffice Impress:
• Presentation templates included when LibreOffice is installed on a computer.
• Templates have been created, or added from other sources.
If a new presentation is created without using one of the templates available, then a default
master slide is available. This default master slide is a good starting point for creating master
slides. An example of the default master slide is shown in Figure 164.
Note
The master slides in the template selected are now shown in the Available for use
panel on the Master Slides deck on the Sidebar.
Notes
Any changes made to one slide when in Master Slide mode appears on all slides
using this master slide. Always make sure to close Master Slide and return to
Normal view before working on any of the presentation slides.
The changes made to an element on a slide in Normal view is not overridden by
subsequent changes to the master slide. However, sometimes it is desirable to
change a manually modified element of a slide to the style defined in the master
slide. To change to default formatting, select the element and select Format >
Clear Direct Formatting on the Menu bar.
Text
1) Go to View > Master Slide on the Menu bar to open Master View.
2) Insert a text box on the master slide, see “Text boxes” on page 238 for more information.
3) Type or paste the text into the text box.
4) Click outside the text box when finished adding text.
5) Go to View > Normal on the Menu bar or click Close Master View on the Master View
toolbar when finished.
Default footers
By default, a slide footer consists of three sections, each containing a default field:
• Left section — date and time, labeled Date Area. Field name is <date/time>.
• Center section — footer text, labeled Footer Area. Field name is <footer>. This section
could be the presentation title, file name, or other information.
• Right section — slide number, labeled Slide Number Area. Field name is <number>.
The default footer fields are set up as follows using the Header and Footer dialog (Figure 169):
1) Go to View > Master Slide on the Menu bar to open Master View.
2) Go to Insert > Header and Footer on the Menu bar to open the Header and Footer
dialog.
3) Click on the Slides tab to open the options available for inserting footers onto a slide.
4) Select Date and Time for the date and time to appear in the left section of the footer.
– For a fixed date and time, select Fixed and enter the date required in the Fixed text
box.
– For a variable date and time, select Variable, then select the format and language in
the Format and Language drop-down lists. Using a variable date and time means that
each time the presentation is opened, the date and time are updated.
5) To place text in the footer center section, select Footer and then type or paste the text into
the Footer text input field.
6) To place the slide number in the right section of the footer, select Slide number.
7) If the footer is not going to appear on the first slide of a presentation, select Do not show
on the first slide. The first slide is normally the title slide of a presentation.
8) Click Apply to save the changes and close the Header and Footer dialog.
Note
The default sections in a footer can be formatted, resized, and repositioned. See
“Adding and formatting text” on page 237 for more information.
Custom footers
The default fields in a footer section can be replaced with text, or manual fields as follows:
1) Go to View > Master Slide on the Menu bar to open the master slide view.
2) Highlight the default field in the footer section and press the Delete or Backspace key.
A flashing text cursor will appear in the footer section and the Text Formatting toolbar
automatically opens replacing the Line and Filling toolbar.
3) Type in the required text or insert a manual field into the footer section. For more
information, see “Manual fields” on page 258.
4) Format the text or manual field placed in the footer section. See “Adding and formatting
text” on page 237 and the Impress Guide for more information.
5) Click outside the footer section to close the Text Formatting toolbar and reopen the Line
and Filling toolbar.
6) Click Close Master View on the Master View toolbar or go to View > Normal on the
Menu bar when setting up a custom footer section is completed.
Manual fields
Manual fields can be added as text objects on a master slide or replace one of the default footer
fields and are as follows:
• Date (fixed)
• Date (variable) — updates automatically each time the presentation is opened.
• Time (fixed)
• Time (variable) — updates automatically each time the presentation is opened and each
time a slide is opened more than once during a presentation.
• Author — first and last names listed in the LibreOffice user data.
• Slide number — the sequence number of the slide, without the word “Slide”.
• Slide Title — defaults to Slide 1, Slide 2, and so on if the slides have not been renamed.
• Slide Count — the number of slides in the presentation.
• File Name
Adding comments
Impress supports comments similar to those in Writer and Calc. For more about adding,
navigating, and replying to comments, see Chapter 2, Getting Started with Writer.
Note
A small box containing the user initials appears in the upper left-hand corner of
the slide, with a larger text box beside it. Impress automatically adds the user
name and current date at the bottom of the text box.
Printing handouts
Handouts are used for distributing copies of presentation slides to each member of the audience.
Handouts are only available in View > Handout on the Menu bar and are printed using the
printing options in Impress.
The printing of handouts depends on the printer, computer operating system, and how a
computer is set up. The following is only an example of how to print handouts.
1) Go to View > Master Handout on the Menu bar to open the Master Handout layout in the
Workspace. An example Master Handout is shown in Figure 171.
2) Go to Insert > Header and Footer on the Menu bar to open the Header and Footer
dialog (Figure 172).
Figure 172: Header and Footer dialog — Notes and Handouts page
3) Click on Notes and Handouts tab and select the required header and footer options as
follows:
– Select Header then enter text in the Header text: text box.
– Select Date and time then select either Fixed or Variable for the date and time.
Hiding slides
1) Select slides for hiding in the Slides pane, or Slide Sorter view in the Workspace.
2) Hide the selected slides using one of the following methods. Hidden slides are grayed out
in the Slides pane or Slide Sorter view in the Workspace.
– Go to Slide > Hide Slide on the Menu bar.
– Right-click on the slide thumbnail and select Hide Slide in the context menu.
– Click on Hide Slide in the Slide View toolbar.
3) To show a hidden slide, use one of the following methods.
– Go to Slide > Show Slide on the Menu bar.
– Right-click on the hidden slide thumbnail and select Show Slide in the context menu.
– Click on Show Slide in the Slide View toolbar.
Slide transition
Slide transitions are effects and/or sounds that take place between slides when slides change in
a presentation and can add a professional look to a presentation, smoothing the change over
between slides. For more information on how to setup slide transitions, modify slide transitions,
and to advance slides in a presentation, see the Impress Guide.
1) Click on Slide Transition in the Sidebar to open the Slide Transition deck (Figure 177).
2) In the Slides pane or Slide Sorter view in the Workspace, select the slides where slide
transitions are going to be applied.
3) Select a transition from the available options in the Slide Transition panel.
4) In the Modify Transition panel, select from the following options to modify the selected
transition:
– Variant — if available, select a slide transition variant from the options available in the
drop-down list.
– Duration — enter a duration time in seconds for slide transition.
Notes
Do not select the Apply Transition to All Slides option, otherwise the selected
music file restarts at every slide.
The sound or music file is linked to a presentation rather than embedded. If the
presentation is going to be displayed on a different computer, remember to make
sure that the music file is available on the computer where the presentation will
be played. The link to the sound or music file must be established before starting
the presentation.
Animation effects
Slide animations are similar to transitions, but they are applied to individual elements in a single
slide, such as title, chart, shape, or individual bullet point. Animations can make a presentation
more lively and memorable. However, as with transitions, heavy use of animations can be
distracting and even annoying for an audience expecting a professional presentation.
Animations are best applied using Normal view in the Workspace so that individual objects on a
single slide can easily be selected.
On a slide, an element, such as a graphic or an entire text box, has selection handles around it
when selected. If a portion of the text in a text box is selected, any selection handles may not be
visible. For more information on animation effects, see the Impress Guide.
1) Go to View > Normal on the Menu bar to open Normal view in the Workspace.
2) Select an element on a slide for animation.
3) On the Sidebar, select Animation to open the Animation deck (Figure 178).
4) Select an element in the Animation panel.
5) In the Effects panel, click on +Add to open the animation options.
a) In Category, select an animation category from the drop-down list.
b) In Effect, select an animation effect from the available options.
c) In Start, select how the animation starts from the drop-down list.
Running presentations
1) Open the presentation and start the slide show using one of the following methods:
– Use the keyboard shortcut F5 to start from the first slide, or Shift+F5 to start from
the current slide.
– Go to Slide Show > Start from First Slide, or Start from Current Slide on the Menu
bar.
– Click on Start from First Slide on the Slide Sorter toolbar.
2) If the slide transition is set to start after a time delay set in After on the Advance Slide
panel, the transition runs after the time delay has elapsed and advances to the next slide.
Note
During the presentation, any animations on a slide are run in the specified order
as the slide is displayed.
Presenter Console
The Presenter Console provides extra control over slide shows when using dual displays, such
as a laptop and a large display, or projector, for an audience. The view seen on a laptop display
includes the current slide that can be seen by the audience, the next slide in the presentation,
any slide notes, and a presentation timer.
Note
The Presenter Console only works with computers and operating systems that
support two displays. When two displays are being used, one display can be a
laptop.
The Presenter Console has to be enabled in Impress before use. Go to Tools > Options >
LibreOffice Impress > General (macOS LibreOffice > Preferences > LibreOffice Impress >
General) and select Enable Presenter Console in Presentation.
• Default view — displays the current slide, including any effects and the next slide in the
presentation (Figure 179). Click on the Previous and Next arrows to navigate through the
presentation.
• Notes view — click on Notes to switch to display any notes that accompany each slide in
the presentation (Figure 180). Click on Notes again to return to the default view.
• Slides view — click on Slides to switch to display the slide thumbnails that are being
used for the presentation (Figure 181). Click on Slides again to return to the default view.
Chapter 7,
Getting Started with Draw
Vector Drawing in LibreOffice
Introduction
LibreOffice Draw is the vector graphics drawing module included with the LibreOffice installation.
Draw can also carry out some operations on raster graphics (pixels) and a wide variety of
graphical images can also be created.
Vector graphics store and display an image as an assembly of simple geometric elements such
as lines, circles, and polygons, rather than a collection of pixels (points on the screen). Vector
graphics allow for easier storage and scaling of the image.
Draw is fully integrated into the LibreOffice suite simplifying the exchange of graphics with all
LibreOffice modules. For example, if an image is created in Draw, reusing it in a Writer document
is easy. Select and copy the drawing in Draw and then paste the image directly into a Writer
document. Also, drawings can be worked on directly from within Writer or Impress, using a
subset of the functions and tools from Draw.
The functionality of LibreOffice Draw is extensive. Draw was not designed to rival high-end
graphics applications, but has more functionality than drawing tools that are generally integrated
with the majority of office software suites. A few examples of the drawing functions are as follows:
• Layer management
• Magnetic grid-point system
• Dimensions and measurement display
• Connectors for making organization charts and other diagrams
• 3D functions for creating small three-dimensional drawings
• Drawing and page-style integration
• Bézier curves
This chapter introduces some features of Draw, but does not cover all the available Draw
features. See the Draw Guide and LibreOffice Help for more information.
Pages pane
Drawings can be split over several pages. Multi-page drawings are used mainly for
presentations. The Pages pane on the left side of the Draw main window provides an overview of
the pages that are created in a drawing. If the Pages pane is not visible, go to View > Page Pane
on the Menu bar. The Pages pane is also used to make changes to the page order by dragging
and dropping one or more pages.
Layers bar
A layer is a workplace where drawing elements and objects are inserted. By default, the
Workspace consists of three layers, which are Layout, Controls, and Dimension Lines. These
default layers cannot be deleted or renamed, but layers can be added when required.
Tabs for default and other layers appear in the Layers bar at the bottom of the Workspace. The
Layers bar can be used to navigate between layers, add layers, or delete layers. For more
information, see “Working with layers” on page 307.
Sidebar
The Sidebar in Draw is similar to the Sidebar in the other LibreOffice modules and consists of five
main decks. To open a deck, click on its icon on the right of the Sidebar, or click on the Sidebar
Settings icon at the top of the tab bar and select a deck from the drop-down list. If the Sidebar is
not visible, go to View > Sidebar on the Menu bar.
Properties
Contains panels where properties of a selected object in a drawing are changed: Page,
Character, Paragraph, Area, Effect, Shadow, Line, Position and Size, Columns, and
Image. Available panels depend on the selected object.
Styles
Provides options for editing and applying one of the available Drawing Styles to drawing
objects. When a style is modified, the changes are automatically applied to all of the
elements formatted using that style. In Draw, Presentation Styles are not available. New
drawing styles can be added to a drawing.
Rulers
Rulers are positioned on the upper and left-hand sides of the Workspace. If the rulers are not
visible, go to View > Rulers on the Menu bar. The rulers show the size of a selected object using
double lines (highlighted in Figure 183). Also the rulers are used to manage object handles and
guide lines when positioning objects.
Status bar
The Status bar (Figure 185) is located at the bottom of the Workspace in all LibreOffice modules.
It includes several Draw-specific fields. For content details and use of these fields, see Chapter
1, LibreOffice Basics, in this guide and the Draw Guide. To hide the Status Bar, go to View on the
Menu bar and deselect Status Bar.
Note
The measurement units shown on the Status Bar are set by going to Tools >
Options > LibreOffice Draw > General (macOS LibreOffice > Preferences >
LibreOffice Draw > General) on the Menu bar. These measurement units can be
different to the measurement units set for the rulers.
Toolbars
To display or hide Draw toolbars, go to View > Toolbars on the Menu bar and select a toolbar
from the drop-down menu. For more information on toolbars, see the Draw Guide.
The icons used for the tools on each toolbar depend on the computer operating system and how
LibreOffice has been set up on a computer. For more information, see Chapter 12, Configuring
LibreOffice. The three main toolbars used in Draw are:
• Standard — is similar for all LibreOffice modules. By default it is docked at the top of the
Workspace when a Draw document is opened (Figure 186)
Note
When drawing basic shapes, or selecting a shape for editing, the Information field
in the Status bar changes to reflect the present action, for example Line created,
Text frame xxyy selected, and so on.
Straight lines
1) Use one of the following methods to start drawing a line:
– Click on Insert Line on the Drawing toolbar.
– Click the triangle ▼ on the right of Lines and Arrows on the Drawing toolbar and
select Insert Line in the drop-down list.
– Click on Insert Line in the Lines and Arrows panel of the Shapes deck on the
Sidebar (Figure 189).
Tips
To snap the end of a line to the nearest grid point, keep the Ctrl key (macOS ⌘)
pressed while drawing the line. However, if the Snap to Grid option in View >
Snap Guides on the Menu bar is selected, the Ctrl key (macOS ⌘) deactivates
the snap to grid.
To restrict the drawing angle of a line to multiples of 45 degrees, keep the Shift
key pressed while drawing the line. However, if the option When creating or
moving objects in the Constrain Objects section of Tools > Options >
LibreOffice Draw > Grid (macOS LibreOffice > Preferences > LibreOffice
Draw > Grid) has been selected, the Shift key deactivates this restriction.
To draw a line symmetrically outwards in both directions from the start point, keep
the Alt key (macOS ⌥) pressed while drawing the line. Lines are drawn starting
from the center of the line.
Arrows
Draw classifies both lines and arrows as lines. Arrows are drawn like straight lines. Hovering the
cursor over each tool in the Lines and Arrows sub-toolbar (Figure 193) indicates what type of line,
or arrow each tool will draw. The information field on the Status bar shows them only as lines.
1) Use one of the following methods to start drawing an arrow:
– Click the triangle ▼ on the right of Lines and Arrows on the Drawing toolbar and
select the type of arrow required from the Lines and Arrows sub-toolbar.
– Click on the type of arrow required in the Lines and Arrows panel of the Shapes
deck on the Sidebar.
2) Place the cursor at the starting point of the arrow, then click and drag the cursor. The
arrowhead is drawn when the hold is released.
Notes
The tool icon for the Lines and Arrows tool recently used is shown on the
Drawing toolbar. This makes it easier to use the same tool again.
After drawing a line, or arrow, the line, or arrow style is changed by opening the
Line dialog and using the options available on the Line Styles or Arrow Styles
pages.
Rectangles
1) Use one of the following methods to start drawing a rectangle:
– Click on Rectangle on the Drawing toolbar.
– Click the triangle ▼ on the right of Basic Shapes on the Drawing toolbar and select
Rectangle on the Basic Shapes sub-toolbar (Figure 194).
– Click on Rectangle in the Basic Shapes panel of the Shapes deck on the Sidebar.
– Select the type of rectangle on the Legacy Rectangles toolbar (Figure 195). To display
the toolbar, go to View > Toolbars on the Menu bar and select it.
2) Place the cursor at the starting point for the rectangle, then click and drag the cursor until
the required size is drawn. As the rectangle is drawn, the rectangle appears with its
bottom right corner attached to the cursor.
3) To draw a rectangle from its center, position the cursor on the drawing, press and hold the
Alt key (macOS ⌥) while dragging the cursor. The rectangle uses the start point as the
center of the rectangle.
Squares
1) Use one of the following methods to start drawing a square:
– Click on Rectangle on the Drawing toolbar, then hold down the Shift key while
dragging the cursor to draw a square.
– Click the triangle ▼ on the right of Basic Shapes on the Drawing toolbar and select
Square on the Basic Shapes sub-toolbar (Figure 194).
– Click on Square in the Basic Shapes panel of the Shapes deck on the Sidebar.
– Select the type of square from the Legacy Rectangles toolbar (Figure 195). To display
the toolbar, go to View > Toolbars on the Menu bar and select it.
2) Place the cursor at the starting point for the square, then click and drag the cursor until
the required size is drawn. As the square is drawn, the square appears with its bottom
right corner attached to the cursor.
3) To draw a square from its center, position the cursor on the drawing, press and hold down
the Alt key (macOS ⌥) while dragging the cursor. The square uses the start point as the
center of the square.
Ellipses (ovals)
1) Use one of the following methods to start drawing an ellipse:
– Click on Ellipse on the Drawing toolbar.
– Click the triangle ▼ on the right of Basic Shapes on the Drawing toolbar and select
Ellipse on the Basic Shapes sub-toolbar (Figure 194).
– Click on Ellipse in the Basic Shapes panel of the Shapes deck on the Sidebar.
– Select the type of ellipse on the Legacy Circles and Ovals toolbar (Figure 196). To
display the toolbar, go to View > Toolbars on the Menu bar and select it.
2) Place the cursor at the starting point for the ellipse, then click and drag the cursor until the
required size is drawn. As the ellipse is drawn, the ellipse appears with its bottom right
corner attached to the cursor.
3) To draw an ellipse from its center, position the cursor on the drawing, then press and hold
down the Alt key (macOS ⌥) while dragging the cursor. The ellipse uses the start point
as the center of the ellipse.
Circles
1) Use one of the following methods to start drawing a circle:
– Click on Ellipse on the Drawing toolbar, then hold down the Shift key while
dragging the cursor to draw a circle.
– Click the triangle ▼ on the right of Basic Shapes on the Drawing toolbar and select
Circle on the Basic Shapes sub-toolbar (Figure 194).
– Click on Circle in the Basic Shapes panel of the Shapes deck on the Sidebar.
– Select the type of circle on the Legacy Circles and Ovals toolbar (Figure 196). To
display the toolbar, go to View > Toolbars on the Menu bar and select it.
2) Place the cursor at the starting point for the circle, then click and drag the cursor until the
required size is drawn. As the circle is drawn, the circle appears with its bottom right
corner attached to the cursor.
3) To draw a circle from its center, position the cursor on the drawing, press and hold down
the Alt key (macOS ⌥) while dragging with the cursor. The circle uses the start point as
the center of the circle.
Tip
To quickly insert a line, rectangle, ellipse, or circle, press and hold down the Ctrl
key (macOS ⌘) and click on Line, Rectangle, Ellipse, or Circle icon and a
standard sized object is drawn automatically in the center of the Workspace. The
size, shape, and color are all standard values. These attributes can be changed
later. For more information, see the Draw Guide.
Curves
1) Use one of the following methods to start drawing a curve:
– Click the triangle ▼ on the right of Curves and Polygons on the Drawing toolbar and
select the type of curve on the Curves and Polygons sub-toolbar (Figure 199).
– Click on the type of curve required in the Curves and Polygons panel of the Shapes
deck on the Sidebar.
2) Click and hold the left mouse button to create the starting point of the curve, then drag
from the starting point to draw a line. Release the mouse button and continue to drag the
cursor to bend the line into a curve.
3) Double-click to set the end point of the curve and fix the curve on the drawing. A filled
curve automatically joins the last point to the first point, closing the curve and filling it with
the selected fill color. A curve without fill will not be closed at the end of drawing the curve.
Note
A single click fixes the curve to the drawing and allows drawing of straight lines
from the end of the curve. Each single click allows the drawing of another straight
line. Double-click to end drawing a curve with straight lines.
Polygons
1) Use one of the following methods to start drawing a polygon:
– Click the triangle ▼ on the right of Curves and Polygons on the Drawing toolbar and
select the type of polygon on the Curves and Polygons sub-toolbar (Figure 199).
– Click on the type of polygon required in the Curves and Polygons panel of the
Shapes deck on the Sidebar.
2) Click to create the starting point of the polygon, then drag from the starting point to draw a
line.
3) Release the hold and continue to drag the cursor to draw the next line for polygon, then
click again to mark the end point of the line and start drawing another line. Holding the
Shift key down while drawing lines restricts the angles used in the polygon to 45° or
90°.
Free-form lines
Drawing a free-form line is similar to drawing with a pencil on paper.
1) Use one of the following methods to start drawing a free-form line:
– Click the triangle ▼ on the right of Curves and Polygons on the Drawing toolbar and
select the type of free-form line on the Curves and Polygons sub-toolbar (Figure 199).
– Click on the type of free-form line required in the Curves and Polygons panel of the
Shapes deck on the Sidebar.
2) Click and drag the cursor to create the free-form line shape required.
3) Release the hold when satisfied with the free-form line and the drawing is completed. A
filled free-form line automatically joins the last point to the first point, closing the free-form
line and filling it with the selected fill.
Connectors
Connectors are lines or arrows whose ends automatically snap to a gluepoint of an object.
Connectors are especially useful in drawing organization charts, flow diagrams, and mind-maps.
When objects are moved or reordered, the connectors remain attached to a gluepoint. Figure 202
shows an example of using two objects and a connector. For a more detailed description of the
use of connectors, see the Draw Guide.
1) Use one of the following methods to select a connector:
– Click the triangle ▼ on the right of Connectors on the Drawing toolbar and select the
type of connector on the Connectors sub-toolbar (Figure 203).
– Click on the type of connector required in the Connectors panel of the Shapes deck
on the Sidebar.
2) Move the cursor over one of the objects to be connected. Small crosses (the gluepoints)
appear around the object edges. Click on the required gluepoint for the start of the
connector, then drag the cursor to drag the connector to another object.
3) When the cursor is over a gluepoint of the target object, release the mouse button and the
connector is drawn. The connector end point is attached to the gluepoint.
Geometric shapes
Geometric shapes are similar to basic shapes. They are provided in Draw as a starting point
when creating objects for a drawing. Geometric shapes are located on the Drawing toolbar and in
the Shapes deck on the Sidebar.
The tool icons on the Drawing toolbar always indicate the last geometric shape drawn. This
makes it easier to use the same tool again.
Access geometric shapes using one of the following methods:
Basic shapes
The Basic Shapes sub-toolbar (Figure 204) also includes rectangle and ellipse tools that are
identical to the ones displayed on the Drawing toolbar.
Symbol shapes
Flowchart
Callouts
3D objects
Note
Inserting and formatting vertical text and vertical text boxes is the same as
horizontal text and horizontal text boxes. A vertical text box expands vertically as
text is added into the box. For more information on vertical text, see the Draw
Guide.
Text boxes
1) Create a text box in the drawing using one of the following methods. The Status Bar
indicates Text Edit mode and the position of the cursor (Figure 212).
– Click at the approximate position for the text box and a single line text box is created
containing a flashing cursor. Start typing the text or paste copied text into the text
box. The width of a single line text box increases as text is added.
– Click at the approximate position for the text and drag the cursor to the approximate
width required for the text box creating a multi-line text box. Start typing the text, or
paste copied text into the text box. As the horizontal limit of the text box is reached,
the text automatically word wraps inside the text box and the text box expands
vertically as it fills.
Vertical text
By default, Draw is set for horizontal text only. To enable vertical text:
1) Go to Tools > Options > Language Settings > Languages (macOS LibreOffice >
Preferences > Language Settings > Languages).
2) Under Default Languages for Documents, select Asian and accept the default language
displayed.
3) Right-click in a blank area on the Drawing toolbar and select Visible Buttons in the
context menu.
4) Select Insert Vertical Text from the list of available tools to enable vertical text on the
Drawing toolbar.
5) Alternatively, go to View > Toolbars on the Menu bar and select the Text toolbar from the
drop-down list, then select Insert Vertical Text from the tools available on the Text
toolbar.
Creating lists
Unordered (bulleted) or ordered (numbered) lists can be created in text boxes and Draw objects.
For more information on creating and formatting lists, see the Draw Guide.
1) Switch on text mode and select all of the text required for a list, or type the required text.
2) Create a list using one of the following methods and default settings for lists:
Text columns
Text in a drawing can be formatted into columns inside text boxes and objects. However, columns
cannot be used on separate parts of text inside a text box or object. The whole of the text box or
object has to be used for columns. For more information on text columns, see the Draw Guide.
1) For text boxes — click the border of a text box to select it so that the selection handles
are displayed indicating that the text box is in edit mode.
2) For graphic objects — double-click on a graphic object to select it so that the selection
handles are displayed and the cursor flashes in the center of the object indicating that the
object is in text edit mode.
3) Open the options for text columns using one of the following methods:
– Right-click in the text box or graphic object and select Text Attributes in the context
menu to open the Text dialog, then click on the Text Columns tab to open the Text
Columns page,
– Click on Columns in the Properties deck on the Sidebar to open the Columns panel.
4) Set the number of columns required in the Number of columns box and the required
spacing between the columns in the Spacing box.
5) Type in the required text, or use copy and paste to enter the required text into the text box
or graphic object. Any text entered will be in column format.
6) If necessary, format the text to the drawing requirements.
7) Save the changes and deselect the text box, or graphic object, using one of the following
methods:
– For the Text dialog, click OK to save the changes and close the dialog, then click
outside the text box to deselect it.
– For the Columns panel in the Properties deck on the Sidebar, click outside the text
box or graphic object to deselect it and save the changes.
8) Click outside the text box, or graphic object, to deselect and save all the changes.
Note
Any text inside a text box, or graphic object automatically flows into column
format when the changes are saved.
Selection by framing
Several objects can be selected at the same time by clicking and dragging the cursor to draw a
selection rectangle (also known as a marquee) around the objects. Only objects that lie entirely
within this selection rectangle are selected. To select multiple objects by framing, Select on the
Drawing toolbar must be active.
Arranging objects
In a complex drawing, several objects may be stacked on top of one another. This stacking order
can be rearranged by moving an object forward, or backward, using one of the following
methods:
• Select an object, go to Shape > Arrange on the Menu bar, or right-click on the object and
select Arrange in the drop-down menu, then choose one of the following options:
– Bring to Front (Ctrl+Shift++) (macOS ⌘+Shift++)
– Bring Forward (Ctrl++) (macOS ⌘++)
– Send Backward (Ctrl+-) (macOS ⌘+–)
– Send to Back (Ctrl+Shift+-) (macOS ⌘+Shift+–)
– In Front of Object
– Behind Object
– Reverse — clicking on this option reverses the order of the selected objects.
• Select an object, then click on one of the Arrange tools, as above, on the Line and Filling
toolbar. When hovering the cursor over a tool, its function is indicated.
Using zoom
To help in the positioning and adjustment of objects, Draw has a zoom function that reduces or
enlarges the screen display of the current drawing. For example, zoom in to position objects on a
drawing with greater accuracy; zoom out to see the complete drawing. Zooming is controlled
using the Status bar, Zoom & View Layout dialog, or Zoom toolbar. For more information on using
zoom, see the Draw Guide.
Note
Press and hold the Shift key while resizing an object, the change in size is
carried out symmetrically with respect to the object width and height maintaining
the aspect ratio of the object. This Shift key behavior works on all selection
handles.
Rotation
1) Click on and hold a corner selection handle, then drag the cursor to rotate the object
around the rotation point. A ghost image of the object rotation appears and the current
angle of rotation is shown in the Status Bar (Figure 216).
Note
Press the Shift key while rotating or slanting an object and the movement is
restricted to 15°.
Slanting
1) Click on a selection handle at the top, bottom, left side, or right side of an object. The
cursor will change shape indicating the direction of movement.
2) Drag the selection handle to slant the object. A ghost image of the object being slanted
appears (Figure 217) and the current slant angle is shown in the Status Bar. The axis
used for slanting an object is fixed to the edge of the object directly opposite the selection
handle being used to slant the object.
3) When the object is at the desired slant angle, release the object.
Flipping objects
Select an object so that the selection handles are displayed and flip the object vertically or
horizontally using one of the following methods:
• Right-click on the object and select Flip > Vertically, or Horizontally, in the context
menu.
• Go to Shape > Flip > Vertically, or Horizontally, on the Menu bar.
• Click on Vertically, or Horizontally, tool on the Line and Filling toolbar.
• Use Flip Vertically, or Flip Horizontally, tool in the Position and Size section on the
Properties deck of the Sidebar.
However, the Flip tool on the Transformations toolbar (Figure 218) provides greater control over
the flipping process. Use the Flip tool to change the position and angle that the object flips over.
See the Draw Guide for more information.
Dynamic gradients
Transparency gradients can be controlled the same as color gradients and both types of gradient
can be used together. With a transparency gradient, the direction and degree of the object fill
color changes from opaque to transparent. In a color gradient, the fill changes from one color to
another, but the degree of transparency remains the same. An example of a dynamic gradient is
shown in Figure 219.
Two tools on the Transformations toolbar are used to dynamically control transparency and color
gradients — Interactive Transparency and Interactive Gradient. See the Draw Guide for more
information on how to create transparencies and gradients in an object.
Duplication
Duplication makes copies of an object while applying a set of changes such as Color or rotation
to the duplicates that are created. An example of duplication is shown in Figure 220. For more
information on duplication, see the Draw Guide.
Temporary grouping
A temporary grouping is when several objects are selected using one of the following methods:
• While holding down the Shift key, click on each object with the cursor to select it for the
temporary group.
• Click and drag the cursor to create a rectangle (also known as a marquee) around the
objects required for the temporary group.
Any changes to object parameters carried out are applied to all of the objects within the
temporary group. For example, rotating a temporary group of objects in its entirety.
To cancel a temporary grouping of objects, click outside of the selection handles displayed
around the objects.
Permanent grouping
A permanent grouping of objects can be created after selecting objects using one of the following
methods:
• Go to Shape > Group > Group on the Menu bar.
Ungrouping
To ungroup or break apart a permanent group of objects, use one of the following methods:
• Go to Shape > Group > Ungroup on the Menu bar.
• Right-click and select Ungroup in the context menu.
• Use the keyboard shortcut Ctrl+Alt+Shift+G (macOS ⌥+⌘+Shift+G).
Nesting groups
A group of groups, more commonly known as nested groups, can be created. When nested
groups are created, Draw retains the individual group hierarchy and remembers the order in
which groups were selected. That is, the last individual group selected will be on top of all the
other groups within a nested group. Ungrouping and entering a nested group work in the same
way as for individual groups.
Combining objects
Combining is a permanent merging of objects, creating a new object. The original objects are no
longer available as individual entities and cannot be edited as individual objects. Any editing of a
combined object affects all the objects that were used when combination was carried out. For
more information on combining objects, see the Draw Guide.
After selecting the objects for combining, use one of the following methods to create a new
object. An example of combining objects is shown in Figure 224 on page 304.
• Go to Shape > Combine on the Menu bar.
• Right-click on the objects and select Shapes > Combine in the context menu.
• Use the keyboard shortcut Ctrl+Shift+K (macOS ⌘+Shift+K).
Exporting
Draw saves images as drawings in the Open Document Format (odf). To save an image or the
entire Draw file in another format, go to File > Export on the Menu bar and select a format in the
drop-down list. The image formats that Draw can export in and save to are listed in Appendix B,
Open Source, Open Standards, OpenDocument.
Draw files can also be exported in HTML, XHTML, or PDF format. The HTML export uses a
conversion wizard that creates as many web pages as there are pages in a Draw document.
Optionally drawing pages can be displayed in frames with a navigator and an index page. For
more information about file formats, see Chapter 10, Working with File Formats, Security, and
Exporting.
Adding layers
1) Use one of the following methods to open the Insert Layer dialog (Figure 225):
– Go to Insert > Layer on the Menu bar.
– Right-click on the layer tabs at the bottom of the Workspace and select Insert Layer
in the context menu.
2) Enter a meaningful Name, Title, and Description for the new layer in the text boxes.
3) Select Visible if the layer is to be visible in a drawing. When Visible is not selected, the
layer is hidden and its name in the layer tab changes color to blue.
4) Select Printable if the layer is to be printed when a drawing is printed. Not printing is
useful if a draft layer is required for guides or annotations that are used in making a
drawing, but do not appear in the final output. The name of a layer is underlined in the
layer tab bar when the Printable option is turned off.
5) Select Locked to prevent any objects on this layer from deletion, editing, or moving. No
additional objects can be added to a locked layer. Locking a layer is useful, for example,
when a base plan is to be protected while adding a new layer with other details. The
name of a locked layer is written in Italics in the layer tab bar.
6) Click OK to create the new layer and close the Insert Layer dialog. A new layer
automatically becomes active when added to a drawing.
Note
Layers are added to the drawing in the order that they were inserted. The layer
order cannot be changed.
Modifying layers
1) To modify a layer, use one of the following methods to open the Modify Layers dialog,
which is similar in layout and options to the Insert Layers dialog.
– Right-click on the name tab of the layer and select Modify Layer in the context menu.
– Double-click on the layer tab.
– Go to Format > Layer on the Menu bar.
2) Make the required changes to the layer, then click OK to save the changes and close the
Modify Layers dialog.
Selecting colors
Colors are selected using a Color palette, the Area and Line panels on the Properties deck of
the Sidebar, and tools on the Line and Filling, and Drawing toolbars.
Color palette
The Color Palette allows quick selection of a color for an area, background, or lines of selected
objects in a drawing. To display the Color Palette (Figure 226), go to View > Color Bar on the
Menu bar. To close the Color Palette, go to View on the Menu bar and deselect Color Bar.
• Left-click on a color to change the area or background color of a selected object.
• Right-click on a color to change the color of lines in a selected object.
• Left-click on the box with the X at the bottom left of the Color Palette to select no color for
the area, or background of a selected object.
• Right-click on the box with the X at the bottom left of the Color Palette to select no color
for the lines of a selected object.
Sidebar color
In the Area and Line panels in the Properties deck on the Sidebar (Figure 227), the Color of an
area or line of a selected object can be changed.
1) Select an object in a drawing.
2) Click on Properties on the Sidebar. In the Properties deck, open the Area and/or Line
panels by clicking on the triangle ▼ on the panel title bar.
3) Change the color of an area in the Area panel as follows:
a) Select Color in the Fill drop-down list.
b) Click on the triangle ▼ next to the Fill Color box to open a drop-down list of available
color palettes.
c) Select the required color palette from the options available.
d) Click on the required color to change the area color.
4) Change the color of a line in the Line panel as follows:
a) Click on the triangle ▼ next to the Line Color box to open a drop-down list of available
color palettes.
b) Select the required color palette from the options available.
Chapter 8,
Getting Started with Base
Relational databases in LibreOffice
Introduction
A data source, or database is an organized collection of information that can be accessed or
managed by software. For example, a list of names and addresses could be turned into a
database that could help you create a mail merge letter, or a business stock list could be a data
source managed through LibreOffice.
When you manage a database in LibreOffice, you will do it through Base. This LibreOffice
module serves as a database front end that can create and store embedded databases or
connect to external databases. This chapter explains how Base can create databases and reads
what is contained in a database, and it also describes how the different parts of the module are
used.
Note
LibreOffice uses the terms “Data Source” and “Database” to refer to the same
thing, which could be a database such as MySQL or dBase, a spreadsheet or text
document holding data, or an address book.
A database consists of a number of fields that contain the individual pieces of data, which in turn
can be organized into tables. When creating a table, you also determine the characteristics of
each field within it. Forms are for data entry into the fields of one or more tables which have been
associated with the form. They can also be used for viewing fields from one or more tables
associated with the form. A query creates a new table from the existing tables based upon how
you create the query. A report organizes the information from the fields of a query or table into a
document according to your requirements.
Caution
Some features of the Base module, such as the HSQLDB database engine, and
the ability to create reports) need the Java Runtime Environment (JRE). The JRE
is not installed in Base by default. Please go to Tools > Options > LibreOffice >
Advanced to select a JRE from those installed on your computer.
If a JRE is not already installed, you will need to download and install it. The JRE
is available for Windows and Linux at https://www.java.com/ or some Linux
distributions can use the JRE available from the repository. However, macOS
requires the Oracle’s Java Development Kit (JDK), which includes the Java
Runtime Environment (JRE). You can find the macOS JDK at
https://www.oracle.com/java/technologies/downloads/.
Base can create both flat and relational databases, and it can create databases where fields
have relationships with each other.
For example: Consider a database that lists the books in a library. It will contain fields for the
names of the authors and a field that holds the book’s title. While there is an obvious relationship
between the authors and the books they have written, the library may contain more than one
book by the same author. These are one-to-many relationships: many authors are linked to more
than one book, so this database contains multiple one-to-many relationships.
But the library’s employment database will be different, because its fields contain the names of
the employees plus other fields that contain social security numbers and other personal data.
The relationship between the names and social security numbers is one-to-one: only one social
security number for each name.
Planning a database
In this chapter, we will show you how to plan a database. In our example, we will create a
database that contains automobile expenses.
The first step in creating a database is to define it by determining what fields are needed. In this
case, we will ask a series of questions about the data:
What are the user output requirements?
Information is needed on three broad areas: fuel usage, maintenance, and vacation.
What input data is required for the output?
Fuel purchases, maintenance expenses, and vacation expenses.
What fields fit the fuel purchases area?
Date purchased, odometer reading, fuel cost, fuel quantity, and payment method for it.
(Fuel economy need not be included, as it can be calculated using a query.)
What fields fit the maintenance area?
Date of service, odometer reading, type of service, cost of service, and next scheduled
service of this type (for example, for oil changes, list when the next oil change should be).
A field for notes was added to the list.
What fields fit the vacations area?
Date, odometer reading, fuel (including all the fields of the fuel table), food (including
meals and snacks), motel, total tolls, and miscellaneous. These purchases are made by
one of two bank cards or cash, so we will need a field to state which payment type was
used for each item.
What fields fit into the food category?
Breakfast, lunch, supper, and snacks seem to fit. Should all the snacks be listed
individually or list the total cost for snacks for the day? In this case, the snacks are divided
into two fields: number of snacks and total cost of snacks, and a payment type is also
needed for breakfast, lunch, supper, and total cost of snacks.
What are the fields that are common to more than one area?
Date appears in multiple areas, as does odometer reading and payment type.
How will these fields be used to get the required information?
While on vacation, the expenses for each day will be listed together. These date fields
suggest a relationship between the vacation table and the dates in the fuel and food
tables, so the date fields in these tables will be linked when the database is created.
These payment type will include two bank cards and cash. So a table will be created with
a field for the type of payment and use it in list boxes in the forms.
Tip
After the fields for the database tables have been listed, we will need a field for
the primary key, which is an identifier that is unique to each record. Some of the
tables already have a suitable field for the primary key but an additional field for
the primary key must be created for other fields (like payment type).
Note
To open and close the Data Sources window that contains the list of registered
databases Writer and Calc, select View > Data Sources or press
Ctrl+Shift+F4. If a database is not registered, they will not appear in this
window. and you cannot access it in Writer or Calc if you need to use data from it.
Save this new database with the name Automobile and the Automobile.odb – LibreOffice Base
window appears (Figure 231).
Caution
When you create a database, you should save your work regularly. This means
you should save the whole database as well.
For example, when you create your first table, you must save it before you can
close it. This makes it part of the database in memory. But only when you save
the database file that the table is written to disk.
Note
All database files in Open Document Format are stored with the *.odb extension.
Files in that format contain all elements of the database, including forms, reports,
tables, and the data itself. The same format can also store a connection to an
external database server instead of the local data, for example, to access a
MySQL or PostgreSQL database server in your network.
Tip
You can double-click on a field to transfer it from from the Available fields list the
Selected fields list or double-click a field in the Selected fields list to transfer it
back to the Available fields list.
• CollectionID: Since this field must be filled, change AutoValue from No to Yes.
• AlbumTitle:
– Entry required: If all of your music is in album format, set Entry required as Yes. If not,
set this property to No.
– Length: Do not change this property unless you have titles that exceed 100
characters counting the spaces.
• Artist: Set Entry Required to Yes unless you do not always use this field.
• Date Purchased: Field type: default setting. In this case, Entry required should be No
unless you want to add this information to all database entries.
• Format: Change the Entry Required setting from No to Yes.
• Notes: No changes are required.
• NumberofTracks: Change the Field type to Small Integer [ SMALLINT ], which allows
for 32768 tracks.
• Photo: Use the default settings.
Note
Since Base requires you to specify the maximum length of each field on creation,
make sure you make each field as large or maybe larger than necessary. By
default, Base uses the VARCHAR format for a text field, so it will only use the
number of characters necessary for the field even if it takes up less space than
than the limit. So when a field uses VARCHAR, a field that contains 20 characters
will only take up 20 characters in the database, even if the limit for the field is set
at 100. In contrast, a text field with the CHAR text format has a fixed length and
that field will be 100 characters long even if the actual length is 1 or 100.
Note
Each field has a Field type, which must be specified. Types include text, integer,
date, and decimal. If the field is going to have general information in it (for
example, a name or a description), use text. If the field will always contain a
number (for example, a price), the type should be decimal or another numerical
field. The wizard picks the right field type, so to get an idea of how this works, see
what the wizard has chosen for different fields.
Tip
Since up and down arrows are available on this page (not shown in Figure 235),
you can use these to reorder the list of fields. Also + and – buttons are available
and you can use these to remove fields from the list or to add new fields.
Note
A primary key field contains a unique number that can be used to identify a
specific entry in a database. In this case, CollectionID will contain a number that
is assigned automatically by Base to each record of this table.
Tip
The action buttons on this page allow you to move selected fields, or all fields, in
either direction. You can also double-click to move a field from one list to the
other.
5) Click the Save button on the Standard toolbar at the top of the LibreOffice Base window.
6) Double-click on the CD-Jazz table icon and visually verify the data before closing the
table
7) Right-click on the CD-Jazz table icon, select Delete and confirm deletion.
Note
While the field types and formatting are different in Design View, the process is
similar to the one used in the Table Wizard.
When we create the Automobile database, the first table we will generate is Fuel. Its fields will be
FuelID, Date, FuelCost, FuelQuantity, Odometer, and PaymentType.
1) Find the Tasks area of the LibreOffice Base window and click Create Table in Design
View to open LibreOffice’s Base: Table Design dialog.
2) Enter FuelID into the Field Name field then press Tab key to move to the Field Type
column. Select Integer [INTEGER] from its drop-down field.
Tip
You can select fields from the Field Type drop-down list by pressing the key for
the first letter of the choice. You can cycle through the choices for a given letter by
repeatedly pressing that key.
a) Change the Field Properties in the bottom section of the dialog for FuelID.
Change AutoValue from No to Yes.
b) Set FuelID as the primary key for the Automobile database.
Click in the Field Name cell directly below FuelID. The dialog automatically sets
FuelID as the primary key and places a key icon in front of FuelID (Figure 237).
Tip
When you assign certain integer field types (Integer and BigInt for example) to a
field, selecting Yes for AutoValue automatically makes that field the primary key.
Primary keys for any other field type must be selected by right-clicking the
rectangle before the field and selecting Primary Key in the context menu.
Note
The primary key serves as a unique ID for each record in a database. You can
use any name for this field. We have used FuelID for convenience, so we know to
what function it serves.
3) When you are creating the Date, FuelCost, FuelQuantity, Odometer, and PaymentType
fields, do the following:
a) Type the field name in the Field Name column.
b) Select the field type:
– For Date use Date[DATE]. (Press the D key to select it.)
– FuelCost, FuelQuantity, and Odometer use Number [NUMERIC]. (Press the N key
once to select it.)
– PaymentType uses Text [VARCHAR], the default setting.
c) FuelCost, FuelQuantity, and Odometer also need changes in the Field Properties
section (Figure 238).
– FuelCost: Change the Length to 5 and Decimal places to 2. Click Format Field
(Figure 238). This opens the Field Format dialog (Figure 239). Use Currency as the
Category and your currency as the Format.
– FuelQuantity: Change Length to 6 and Decimal places to 3. (Many fuel pumps
measure fuel to thousandths of a gallon in the USA.)
– Odometer: Change the Length to 10 and the Decimal places to 1.
d) Repeat steps a) through c) until you have entered all of the fields.
Tip
The primary key can contain more than one field. (Its foreign key1 will contain the
same number of fields.) If this were the case in Figure 242, the other fields of the
primary field for the Fuel table would be listed under Date. The corresponding
fields of the foreign key would be listed under Vacations. Detailed information
about this is in the Base Guide.
Tip
A list box is useful when a field contains a fixed number of options. It saves you
from having to type data by hand and having to double-check that the entered
data is correct, and ensures that invalid options are not entered.
1 A field in a table that stores values of the primary key of records in another table.
Note
To create a list box as in Figure 245, we first need to create a small, separate
table containing the name of the options. Then use the contents of the table to fill
the list box. See Modifying a form below
Tip
Using the four action buttons in the center of this page, you can move selected
fields, or all fields, in either direction. You can also double-click to move a field
from one list to the other. The up and down arrows on the right can be used to re-
order entries in the Fields in the form list.
Note
Relationships between two tables can be based upon more than one pair of
fields. For more information on this, consult the Base Guide.
Caution
When creating a relationship between fields from two tables, those fields have to
have the same field type. That is why we used the Date field from both tables:
both their field types are Date [ DATE ].
Whether a single pair of fields from two tables are chosen as the relationship, or
two or more pairs are chosen, certain requirements must be met for the form to
work.
– One of the fields from the main form must be the primary key for its table. (Date would
have to be used.)
– No field from the subform can be the primary key for its table. (FuelID cannot be
used.)
– Each pair of joined fields must have the same field type.
Step 5: Arrange controls
A form’s control consists of two parts: label and field. In this step, you determine where a
control’s label and field are placed relative to each other. From left to right, you can choose
Columnar – Labels Left, Columnar – Labels on Top, As Data Sheet, and In Blocks – Labels
Above.
1) In this example, we will arrange the main form by clicking the second icon (Columnar –
Labels on Top). The labels will be placed above the related field.
2) Next, we will arrange the subform by clicking the third icon (As Data Sheet). The labels
are column headings and the field entries are in spreadsheet format. Click Next.
Note
The following steps assume that the PaymentType table already contains three
single-field records. These might be Cash, Dan, and Kevin. If necessary, you
could use the Form Wizard to create a very simple form to input or edit these
values.
Tip
If the Form Navigator does not have the input focus, selecting a field highlights
both field components (for example, label and text). If this arises, then double-
clicking the required component will highlight it, and enable you to subsequently
move from one component to another with a single click.
4) Right-click the text box in the Form Navigator, right-click to bring up the context menu,
then select Replace with > List Box.
5) In the Properties dialog, the heading will become Properties: List Box and the General tab
is selected. Scroll down to the Dropdown property and change No to Yes.
6) Select the Data tab.
7) Go to Type of list contents. Change Valuelist to Sql.
8) The line below this becomes List content. Click the ellipsis (…) to the right of this property
to open the SQL Command – LibreOffice Base: Query Design window and the Add Table
or Query dialog.
9) The PaymentType table has the required entries. Click it, and then click the Add button.
10) Close the Add Table or Query dialog.
11) In the SQL Command – LibreOffice Base: Query Design window, double-click Type in the
table named PaymentType. This places Type in the Field row of the tabular area.
Tip
There are times, as in this example, when 8) through 12) produces the same SQL
code. When this happens, copy the code. Paste the code into the Type of list
contents property before doing 13). It is a nice shortcut.
b) Scroll to the Formatting property. Click the ellipsis (…) on the right. Select Currency
from the Category column. Uncheck the Negative numbers red and the Thousands
separator. Click OK.
c) Scroll to the Width property. Adjust the width if necessary.
d) Change the Alignment property if you do not want data to be to the left. Select Center
to put the data in the middle of the cell.
3) Click the FuelQuantity label.
a) Open the drop-down list for the Label property. Add a space between Fuel and
Quantity. Press Enter.
b) Scroll to the Formatting property and change to show three decimal places if needed.
c) Scroll to the Width property. Adjust the width if necessary.
d) Change the Alignment property if you do not want data to be to the left. Select Center
to put the data in the middle of the cell.
4) Click the Odometer label.
a) Scroll to the Formatting property. If you wish to show one decimal place, make the
change.
b) Scroll to the Width property. Adjust the width if necessary.
c) If you do not want data to be to the left, change the Alignment property and if you
want to put the data in the middle of the cell, select Center.
5) Click the PaymentType label.
a) Right-click this label, then add a list box in a context menu by selecting Replace with
> List Box.
b) Open the drop-down list for the Label property. Add a space between Payment and
Type. Press Enter.
c) On the Data tab, change the Type of list contents property to Sql.
d) Paste the SQL code SELECT "Type" FROM "PaymentType" into the List content
property. (This is a shortcut method – see the Tip on page 339 and the detailed
instructions above it if you want more details).
Step 6): Group the controls:
This is a suggested layout which looks reasonably well organized. Use this one or create one
that appeals to you. The controls may be wider or narrower than yours because of the content
that will be in them. Note that this layout has left space for the additional labels that will be added
later.
1) Three icons need to be activated on the Form Design toolbar: Display Grid, Snap to
Grid, and Helplines While Moving. If this toolbar is on the side of the form, click the
double arrow (») to open a sub toolbar showing them. If the toolbar is on the top or bottom
of the form, they are on the right end of it. If there is a double arrow at the end, click it to
reveal them. Make sure they are highlighted as in this figure.
Tip
You can also control the Display Grid, Snap to Grid, and Helplines While
Moving options using the View > Grid and Helplines menu.
2) Some of the controls need to be moved in pairs so the Form Navigator needs to remain
open. Close the Properties dialog now.
Note
When moving a control, do not use the PositionX and PositionY properties to
place the control, because this will place the control’s label and field on top of
each other. Those properties can move a label or field to a specific location, but
are not designed to move a control. Use the Position and Size icon on the Form
Design toolbar to move a control or group of selected controls.
The list in the Form Navigator reveals which controls needed to be grouped based upon their
names:
– lblMotel / fmtMotel with lblMPayment / txtMPayment;
– lblBreakfast / fmtBreakfast with lblBPayment / txtBPayment;
– lblLunch / fmtLunch with lblLPayment / txtLPayment;
– lblSupper / fmtSupper with lblSPayment / txtSPayment;
– lblSnackNo / txtSnackNo with lblSnCost / fmtSnCost and with lblSnPayment /
txtSnPayment (group these three controls together);
– lblMiscellaneous / fmtMiscellaneous with lblMiscPayment / txtMiscPayment.
That is six groups of controls; each one will be moved separately.
Tip
The Styles deck can be opened by selecting View > Styles or by pressing F11.
Also, you can quickly modify the appearance of all three headings by right-
clicking the Heading 2 style and selecting the Modify option in the context menu
would allow. See the Writer Guide for details.
Figure 260: Form Design toolbar with Activation Order icon circled
1) Select View > Toolbar > Form Design to open the Form Design toolbar.
2) Click the Activation Order icon (circled in Figure 260).
3) Rearrange the field order in the Tab Order dialog.
a) If you click the Automatic Sort button, Base will automatically generate a tab order.
b) You can use the Move Up and Move Down buttons to change the position of a
selected control in the list.
c) If necessary, drag a control from one position to another in the Controls list.
d) Define a tab order. If you like, you can put the fields in the same order as Figure 261.
e) Click OK.
4) Save and close the form.
5) Save the database.
Note
The Tab key is used to move between fields. However, there are some limitations
where other keys.
Since text fields do not have tab positions, they can not move from one position in
the field to another one. All spacing must be done by the space bar.
The Enter key can be used to move between non-text fields, but the function of
the Enter key in text fields depends upon whether the text field has a single line
property. If it does, pressing Enter will move the cursor to the next field. But if the
text field has been assigned a multi-line property, pressing Enter moved will only
move the cursor down one line. With this field, the Tab key has to be used to
move the cursor to the next field.
If there was no subform for fuel data, pressing the Tab key in the last field would
save all of the fields, clear them, and make the form ready to accept data for the
next record.
Tip
Each record is numbered and the Record box contains the number of the record
whose data is shown in the form.
If you need to go to a specific record, enter the record’s number into the record
box and type Enter to take you to that record.
Note
The Copy table operation copies only values and strings from the Calc
spreadsheet. It does not copy formulas.
Creating queries
If you need get specific information from a database, use a query. Their results are special tables
within the database. This document will demonstrate two different methods for building queries
by:
• Use the Query Wizard to generate a list of albums from a particular artist from the CD-
Collection table.
• The information we might want from the Fuel table includes what our fuel economy is. We
will do this using Design View. (Queries that require calculations are best created with
Design View.)
Tip
To change the order of the fields, select the field you want to move and click the
up or down arrow to the right of the Fields in the Query list.
Note
These conditions apply to numbers, letters (using alphabetical order), and dates.
1) Since we are only searching for one thing, we will use the default setting of Match all of
the following.
2) We are looking for a particular artist, so select CD-Collection.Artist in the Fields drop-
down and is equal to in the Condition drop-down.
3) Type the name of the artist in the Value box.
4) Click Next.
Note
Since we have a simple query, the Grouping and Grouping conditions are not
needed. Steps 5 and 6 of the wizard are skipped in our query.
Tip
Move the mouse pointer over the bottom edge of the Fuel table (Figure 267) and
drag the edge to make it longer and easier to see all of the fields in the table.
Creating reports
Reports retrieve information found in the database and arrange it in useful ways. They are similar
to queries except that they are designed to be read by people. Queries are only designed to
retrieve selected data from the database. Reports are generated from the database’s tables,
views, or queries.
All reports are based upon a single table, view, or query, so first you need to decide what fields
you want to use in the report. Before you use fields from different tables, you must first combine
these fields in a single query or view. Then you can use this information to create a report.
For example, a report on vacation expenses includes both fuel costs and meal costs. These
values are contained in fields of two different tables: Vacations and Fuel. Then this report will
allow you to create a query or view.
Caution
Dynamic reports update only the data that is changed or added to a table or
query. They do not show any modifications made to the table or query itself.
For example, after creating the report below, open the Fuel Economy query
created in the previous section. For the “End-Reading”.“Odometer” –
“Fuel”.“Odometer” column, change the number 1 to the number 3 (see Figure
275). The report will be identical before and after you make the change. But if you
add more data to the query and run the report again, it will contain the new data.
However, all data will be based upon “End-Reading”.“Odometer” –
“Fuel”.“Odometer” having the value 1. No data will be present in the report for
which “End-Reading”.“Odometer” – “Fuel”.“Odometer” has the value 3.
Note
If you access a spreadsheet with this method, you cannot change anything in the
spreadsheet using Base. You can only view the contents of the spreadsheet, run
queries, and create reports based upon the data already entered into the
spreadsheet.
All changes in a spreadsheet must be made in the spreadsheet itself with Calc.
After modifying the spreadsheet and saving it, the changes will be in the
database. When you create and save an additional sheet in your spreadsheet,
the database will have a new table the next time you access it.
Tip
Choose Tools > Mail Merge Wizard or click on the Mail Merge icon (circled in
Figure 289) in the Data Sources window to start the Mail Merge Wizard, which
steps you through creating a mail merge document. See Chapter 14 in the Writer
Guide.
Writer documents
When you need to insert a field from a table in the Data Sources window into a Writer document,
click on the field name (the gray square at the top of the field list) with the left mouse button held
down, drag the field onto the document. In a Writer document, it will appear as <FIELD> (where
FIELD is the name of the field you dragged).
For example, if you wish to enter the cost of meals and who paid for them on a certain date of a
vacation into the database:
1) Open the list of data sources (Ctrl+Shift+F4) and select the Vacations table in the
Automobile database.
2) Use this sentence: “On (date), our breakfast cost (amount) paid by (name), our lunch cost
(amount) paid by (name), and our supper cost (amount) paid by (name).” But only type
“On, our breakfast cost paid by, our lunch cost paid by, and our supper cost paid by.”
3) To replace (date), click the field name Date in the Data Sources window and drag it to the
right of the word On. Insert an extra space if necessary. The result: On <Date>. If you
have field shadings turned on (View > Field Shadings), <Date> has a gray background.
Otherwise it does not.
Calc spreadsheets
There are two ways to transfer data into a Calc spreadsheet:
Enter the data into the spreadsheet cells.
Create complete new records in the spreadsheet. While you can directly access the data inserted
into the spreadsheet cells, new records created in the spreadsheet are read-only.
Use the Data to Text icon to enter data directly to the spreadsheet cells as if you are making a
table in a Writer document. But there are certain differences.
The steps are straightforward.
1) Click the cell of the spreadsheet which you want to be the top left cell of your data,
including the column names.
Chapter 9,
Getting Started with Math
LibreOffice’s Formula (Equation) Editor
Introduction
Math is a formula editor included with LibreOffice used to create or edit formulas (equations) in a
symbolic form, within LibreOffice documents or as stand-alone objects. Sample formulas are
shown below:
df (x)
=ln(x)+ tan−1 (x 2) or NH 3+H 2 O ⇌NH+4 + OH −
dx
The Formula Editor in Math uses a markup language to represent formulas. This markup
language is designed to be easily read by users. For example, a divided by using markup
a
language produces the fraction when used in a formula.
b
Getting started
The Formula Editor creates a formula as a separate file that can become a formula library or can
be inserted directly into a document using LibreOffice Writer, Calc, Impress, or Draw.
Creating formulas
You can create a formula with one of the following methods:
• Go to the Elements panel, select a category in the drop-down list, then select a symbol.
• Right-click in the Formula Editor and select a category, then select a symbol in the
context menu.
• Enter markup language directly into the Formula Editor.
Note
Using the Elements panel or the context menus to create a formula provides a
convenient way to learn the markup language used by Math.
Tip
When using the Elements panel, you ought to select Extended tips in LibreOffice
Options. This will help you to identify the categories and symbols that need to be
used in the formula. Go to Tools > Options > LibreOffice > General on the
Menu bar and select Extended tips in the Help section.
Note
The Elements panel can either be a floating dialog, as shown in Figure 294, or
positioned to the right of the Formula Editor, as shown in Figure 295.
Tip
The Elements panel includes an Examples category, which provides example
formulas to use as a starting point for a formula or equation.
Context menu
The Formula Editor also provides a context menu which allows users to access categories and
symbols while they are creating formulas. To open the context menu, right-click in the Formula
Editor. Then select a category and select the markup example for use in the sub-context menu.
An example is shown in Figure 296.
Note
The Elements panel and the context menu only contain the commands that are
most commonly used in formulas. If a symbol or a command is not listed in the
Elements panel and context menu, you must insert it manually with the markup
language. For a complete list of commands and symbols available in Math, see
Appendix A, Commands Reference, in the Math Guide.
Markup language
Markup language is entered directly into the Formula Editor. For example, typing 5 times 4 into
the Formula Editor creates the simple formula 5×4 . For experienced markup language users, it
can be the quickest way to enter a formula. Table 10 shows some examples of using markup
language to enter commands. For a full list of commands that can be used in the Formula Editor,
see Appendix A, Commands Reference, in the Math Guide.
Table 10: Example commands using markup language
Display Command Display Command
a=b a = b √a sqrt {a}
a
2 a^2 an a_n
Greek characters
Using markup language
Greek characters are commonly used in formulas, but they cannot be entered into a formula with
the Elements panel or the context menu. When entering Greek characters into a formula, use the
English names of Greek characters in the markup language See Appendix A, Commands
Reference, in the Math Guide for a list of Greek characters that can be entered using markup
language.
Symbols dialog
Greek characters can also be entered into a formula using the Symbols dialog.
1) Make sure the cursor is in the correct position in the Formula Editor.
2) Go to Tools > Symbols on the Menu bar, or click the Symbols icon in the Tools toolbar,
to open the Symbols dialog (Figure 297).
3) Select Greek in the Symbol set drop-down list. For italic characters, select iGreek in the
drop-down list.
4) Double-click the desired Greek character to insert it or select it and click Insert. When
selected, the name of the character is shown below the symbol list.
5) Click Close after entering Greek characters into the formula.
Formula examples
Example 1
The simple formula 5×4 can be created using LibreOffice Math by performing the following
steps:
1) Make sure the cursor is flashing in the Formula Editor, then select the category
Unary/Binary Operators and symbol Multiplication using one of the following methods:
2) Go to the Elements panel, select Unary/Binary Operators in the drop-down list, and then
select the Multiplication icon .
Tip
To move forward from one placeholder to the next placeholder in a formula, press
the F4 key. To move backward from one placeholder to the previous placeholder
in a formula, use the key combination Shift+F4.
Note
If necessary, to prevent a formula in a document from updating automatically. Go
to View on the Menu bar and deselect AutoUpdate display. To then manually
update a formula, press the F9 key or select View > Update on the Menu bar.
Example 2
To create the formula π ≃ 3.14159 where the value of pi is rounded to 5 decimal places,
without knowing markup associated with the Is Similar Or Equal symbol ≃ , follow these
steps:
1) Make sure the cursor is flashing in the Formula Editor.
2) Enter %pi in the Formula Editor to enter the Greek character for pi (π).
3) Select the category Relations and symbol Is Similar Or Equal using one of the following
methods:
– In the Elements panel, select Relations in the drop-down list and then select the Is
Similar Or Equal icon .
– Right-click in the Formula Editor and select Relations > a simeq b in the context
menu.
4) Delete the first placeholder <?> before the word simeq in the Formula Editor.
5) Select the second placeholder <?> after the word simeq in the Formula Editor and replace
it with the characters 3.14159. The formula π ≃ 3.14159 now appears in the
document.
Editing formulas
If you need to edit a formula, the approach differs depending on whether the formula is in Math or
another LibreOffice component.
Note
If a formula element cannot be selected using the cursor, click on the Formula
Cursor icon in the Tools toolbar to activate the formula cursor.
3) Select the formula element to be changed with one of the following methods:
– Click on the formula element in the Preview window, position the cursor at the
beginning of the formula element in the Formula Editor, then select the formula
element in the Formula Editor.
– Double-click on the formula element in the Preview window to select the formula
element in the Formula Editor.
– Position the cursor in the Formula Editor at the formula element to be edited, then
select that formula element.
– Double-click directly on the formula element in the Formula Editor to select it.
4) Make changes to the selected formula element.
5) Go to View > Update on the Menu bar, or press the F9 key, or click on the Update icon
on the Tools toolbar to update the formula in the Preview window or in the document.
6) In Math, save changes to the formula after editing.
7) In Writer, Calc, Impress, or Draw, click anywhere in the document away from the formula
to leave editing mode, then save the document to save changes to the formula.
Formula layout
This section discusses how to lay out complex formulas in Math or in a LibreOffice document.
Using braces
Since LibreOffice Math knows nothing about order of operations within a formula, braces (curly
brackets) are used to define the order of operations. The following examples show how braces
can be used in a formula.
Example 1
2
2 over x + 1 gives the result +1
x
In this example, Math recognizes that the 2 before and the x after the over command
belongs to the fraction, and has represented them accordingly. If x +1 rather than x
is going to be the denominator, they must be bracketed together using braces.
2
Inserting braces into 2 over {x + 1} gives the result where x +1 is now the
x +1
denominator.
matrix { a # b ## c # d }
a b
c d
In matrices, rows are separated by two hashes (##) and entries within each row are separated by
one hash (#).
Normally, when brackets are within a matrix, the brackets do not scale as the matrix increases in
size. The example below shows a formula where the parentheses do not scale to the size of the
resulting matrix.
a b
( matrix { a # b ## c # d } ) ( )
c d
To overcome this problem, Math gives you scalable brackets that grow in size to match the size
of the matrix. Use the commands left( and right) to create scalable brackets around a matrix.
The following example shows how to create a matrix with scalable parentheses.
left( matrix { 1 # 2 # 3 ## 4 # `
# 6 } right) ( 14 2 3
6 )
Tip
To make all brackets to be scalable, go to Format > Spacing on the Menu bar to
open the Spacing dialog. Click on Category, select Brackets in the drop-down
list, and then select the option Scale all brackets.
Unpaired brackets
When using brackets in a formula, Math expects that for every opening bracket there is a closing
one. If there is no closing bracket, Math will place an inverted question mark next to where the
closing bracket should be placed. For example, lbrace a; b will result in ¿ because the right
bracket rbrace is missing.
This inverted question mark disappears when all the brackets are paired. The previous example
could be fixed to lbrace a; b rbrace, resulting in {a ; b}. However, there are cases where an
unpaired bracket is necessary (see below).
Scalable brackets
To create unpaired scalable brackets or braces in a formula, the markup commands left, right,
and none can be used.
Example
The following formula uses the stack command to create a two-line formula and adds a
bracket only to the right side of the stack.
Recognizing functions
In a basic installation of Math, the software outputs functions in normal characters and variables
in italic characters. However, if Math fails to recognize a function, the markup command func
before a function can force Math to recognize any following text as a function and uses normal
characters.
For a full list of functions within Math, see Appendix A, Commands Reference, in the Math Guide.
Tip
Use the F3 key to navigate to the next formula error or the key combination
Shift+F3 to move to the previous error.
x = 3 newline y = 1
x=3
y=1
Math cannot create multiple line formulas when a line ends with an equals sign or continue the
formula on a new line without completing the term on the right side of the equals sign. If a
multiple line formula needs to have an equals sign at the end of a line without a term after the
equals sign, then use either empty quotes “” or empty braces {} or the space characters grave `
or tilde ˜.
By default, a multiple line formula is center aligned. For more information on alignment using the
equals sign, see “Customization” on page 406.
Writing derivatives
When writing derivatives, use the over command to identify fractions to Math. The over
command combined with the character d for a total derivative or the partial command for a
partial derivative to achieve the effect of a derivative. Braces {} are used in each side of the
elements to surround them and make the derivative, as shown by the following examples.
Examples
Below are a few examples of using Math to write derivatives.
Markup Language Resulting Formula
df
{df} over {dx}
dx
∂f
{partial f} over {partial y}
∂y
2
{partial^2 f} over {partial t^2}
∂ f
2
∂t
Note
To write function names with primes, as is normal in school notation, first add the
symbols to the catalog. See “Catalog customization” on page 406 for more
information.
Note
The Special Characters dialog used by other LibreOffice components is not
available in Math. For regular use of special characters in Math, adding the
characters to the Math Catalog is recommended; see “Catalog customization” on
page 406 for more information.
Text in formulas
To include text in a formula, enclose any text in double-quotes, for example: x " for " x >= 0 in
markup language will create the formula x for x≥0 . All characters, except double quotes, can
be used in text.
However, if you need double quotes in formula text, create the text with double quotes in
LibreOffice Writer, then copy and paste the text into the Formula Editor, as shown in Figure 298.
Note
The empty braces each side of the equals sign are necessary because the equals
sign is a binary operator and requires an expression on each side. Spaces, or ` or
~ characters each side of the equals sign can be used, but braces are
recommended as they are easier to see within the markup language.
The spacing on each side of the equals sign can be reduced by changing the inter-column
spacing of the matrix. See “Adjusting formula spacing” on page 394 for more information.
Note
Only formulas inserted after the change in font settings will use the new default
settings. Previously inserted formulas would have to be updated individually to
match the same font settings as the new default settings.
Tip
The extension “Formatting of all Math formulas” allows users to change the font
name and font size for all or only selected formulas in a document. For more
information, go to this URL:
https://extensions.libreoffice.org/en/extensions/show/formatting-of-all-math-
formulas
Formula fonts
Change current formula fonts
To change the fonts used for the current formula in Math or another LibreOffice component:
1) Click in the markup language in the Formula Editor.
2) Go to Format > Fonts on the Menu bar or click on the Fonts button on the sidebar to
open the Fonts dialog (Figure 301).
Note
When a new font is selected for a formula, the old font remains in the list
alongside the new one and can be selected again.
Note
Variables should be written in italics, so make sure that the Italic option is
selected for the desired font. For all other elements, use the basic form of a font.
The style can be easily altered in the formula itself by using the commands
italic or bold to set these characteristics and nitalic or nbold to unset them.
Note
Only formulas inserted after the change in default spacing will use the new default
settings. Formulas that were inserted before the change will need to be updated
to match the same spacing as the new default settings.
Note
It is not possible to align formulas on a particular character and formula alignment
does not apply to text elements. Text elements are always aligned left.
Note
Independent of using formula alignment given below, it is possible to align
formulas using the commands alignl, alignc and alignr. These commands also
work for text elements.
Note
Regardless of the alignment option selected in the Alignment dialog, it is possible
to align sections of a formula using the commands alignl, alignc and alignr.
These commands can align formulas in matrices and work for text elements.
Note
Only formulas inserted after the change in default alignment will use the new
default settings. Previously inserted formulas would have to be updated
individually to match the same alignment as the new default settings.
Named colors
For information on the named colors available in Math, see Appendix A, Commands Reference,
in the Math Guide. These colors are listed in the Attributes section of the Elements panel (Figure
294 on page 378).
RGB values
To use custom colors defined by RGB (Red, Green and Blue) values ranging from 0 to 255, use
themarkup command color rgb R G B , where R, G, and B correspond to the Red, Green, and
Blue values of the desired color.
Example
In this example, the term “decision variable” uses the color defined by the RGB values
160, 82, 45.
"Let " x_ij " be a " color rgb 160 82 45 "decision variable " "in the problem
under consideration"
Math will create the following output:
Let x ij be a decision variable in the problem under consideration
Hex values
The color command now supports HTML colors as defined by a hex number. Use the color hex
000000 markup command, where 00000 is the corresponding hex number. For example, the
command color hex FF0000 decision creates the output decision .
Using Math
1) Create a file folder to contain the formula library.
2) In LibreOffice, go to File > New > Formula on the Menu bar, or click on Math Formula in
the Start Center to open Math and create a formula using the Formula Editor. See
“Formulas as separate documents or files” on page 377 for more information.
3) Go to File > Save As on the Menu bar or use the keyboard shortcut Ctrl+Shift+S to
open a Save As dialog.
4) Navigate to the formula library folder created in step 1.
5) Name the formula in the File name box.
6) Select in the File type drop-down list either ODF Formula (.odf) or MathML 2.0 (.mml) as
the file type for the formula.
7) Click Save to save the formula and close the Save As dialog.
Formulas in Writer
When a formula is inserted into a LibreOffice Writer document, the software opens the formula in
a frame and treats the formula as an OLE object. To edit it, double-click on an inserted formula
and you will open the formula in LibreOffice Math’s Formula Editor.
In LibreOffice Writer, the following options are available to change each individual formula within
a document. The chapters on styles in the Writer Guide have information on how to change the
default frame style settings for OLE objects.
Tip
To insert the cross-reference number without parentheses, select Numbering
instead of Reference in the Insert reference to section.
Note
To use square parentheses instead of round ones, or to have the cross-reference
number be separated from the formula by tabs instead of using a table, refer to
the Writer Guide.
Anchoring formulas
A formula is treated as an object within Writer and once inserted, its default anchoring is To
character. To change the anchoring of a formula object:
1) Right-click on the selected formula object and select Anchor in the context menu.
2) Select a new anchoring option in the context sub-menu. The anchoring positions available
are To Page, To Paragraph, To Character, or As Character.
Alternatively:
1) Right-click on the selected formula object and select Properties in the context menu, or
go to Format > Frame and Object > Properties on the Menu bar, to open the Object
dialog (Figure 305).
2) On the Type tab, select an anchoring position from the Anchor section in the upper right.
3) Click OK to save changes and close the Object dialog.
Note
When making changes to the options available for frame styles in Writer,
anchoring options are not available in the Object dialog. For more information on
how to modify frame styles, please refer to the Writer Guide.
Vertical alignment
When you are adjusting the vertical alignment of formulas in Writer, the default setting for vertical
alignment for formula objects is the text base line. If necessary, the default can be changed by
modifying the Formula frame style--see the chapters on styles in the Writer Guide for more
information.
To change the vertical alignment position of an individual formula object in Writer (assuming that
the As character anchoring option is selected):
1) Right-click on the selected formula object and select Properties in the context menu, or
go to Format > Frame and Object > Properties to open the Object dialog (Figure 305).
2) Make sure the Type tab is selected and select a new alignment position in the drop-down
list in the Position section. The vertical alignment options available are Top, Bottom,
Center, or From bottom.
3) If necessary, type in the text box a plus or minus value for vertical alignment. This option
is only available if From bottom vertical alignment has been selected.
4) Select the type of text alignment in the drop-down list in the Position section. The text
alignment options available are Base line, Character, and Row.
5) Click OK to save changes and close the Object dialog.
Note
If the Position section in the Object dialog is grayed out and not available, then
go to Tools > Options > LibreOffice Writer > Formatting Aids and uncheck the
option Math baseline alignment. This setting is stored with the document and
applies to all formulas within it. Any new documents created will also use this
setting for Math baseline alignment.
Text mode
When you place large formulas within a line of text, the formula’s elements are often higher than
the text height. Therefore, to make large formulas easier to read, you should always insert large
formulas into a separate paragraph of their own so that the formula is separated from nearby
text.
However, if it is necessary to place a large formula within a line of text, double-click on the
formula to open the Formula Editor and then go to Format > Text Mode on the Menu bar. The
Formula Editor will try to shrink the formula to fit the text height. The numerators and
denominators of fractions will be shrunk, and the limits of integrals and sums are placed beside
the integral/sum sign, as shown in the following example.
Example
A formula in a separate paragraph:
5
∑ i2
i=2
Note
When a formula is inserted into a Writer document, the size of its surrounding
frame cannot be changed. The frame size for a formula object depends on the
setting of the formula font size. See “Formula font size” on page 391 for more
information.
Backgrounds
1) In the document, select the formula for the background change.
2) Right-click on the formula and select Properties in the context menu, or go to Format >
Frame and Object > Properties to open the Object dialog.
3) Click on the Area tab and use the buttons at the top to select the desired type of fill for the
formula (Figure 307).
4) Select the options for the formula background. The options change depending on the type
of fill selected.
5) Click OK to save changes and close the Object dialog.
Tip
If an inserted formula in a Calc spreadsheet appears out of scale, fix it by right-
clicking the formula object and then selecting the Original Size option in the
context menu.
Formulas in charts
A chart in a Calc spreadsheet is itself an OLE object, therefore, the Formula Editor cannot be
used to create and insert a formula directly into a chart. However, both the Chart and Math
objects can be created separately and later be copied and pasted into the Chart object:
1) Create the chart using LibreOffice Calc. For a complete reference on how to create
charts, see Chapter 3 in the Calc Guide.
Chemical formulas
The primary purpose of Math is to create mathematical formulas, but it can also be used to write
chemical formulas. However, in chemical formulas, the chemical symbols are normally written in
uppercase using non-italic characters.
To create chemical formulas using Math, change the font used for variables to a non-italic font.
For more information on how to change fonts in a formula, see “Formula fonts” on page 392.
For reversible reactions in chemical formulas, there is no symbol for a double arrow in Math. With
access to a font with correct symbols for use in chemical formulas, these symbols can be added
to the Catalog. See “Catalog customization” on page 406 for more information.
Customization
This section describes how to customize LibreOffice Math formula creation in LibreOffice
documents. Additional information on customizing LibreOffice can be found in Chapter 13,
Customizing LibreOffice.
Catalog customization
For regular use of a symbol that is not available in Math, add it to the Symbols dialog (Figure
309) by using the Edit Symbols dialog (Figure 310).
In this dialog, symbols can be added to a symbol set, symbol sets can be edited, symbol
notations can be modified, new symbol sets can be defined, names can be assigned to symbols,
and existing symbol sets modified.
For details of the fields in the Edit Symbols dialog, please refer to the Math Guide.
Adding symbols
1) Go to Tools > Symbols on the Menu bar or click on the Symbols icon on the Tools
toolbar to open the Symbols dialog.
2) Click the Edit button to open the Edit Symbols dialog.
3) Select a font in the Font drop-down list.
4) Scroll down and select a symbol character to be added in the preview box. The small right
preview box displays the new symbol.
Customization | 361
5) In the Symbol box, locate the symbol that will be added.
6) In the Symbol set box, select a symbol set in the drop-down list to add the new symbol to,
or type a new name to create a new symbol set for the new symbol.
7) If required, select a font style in the Style drop-down list – Standard, Italic, Bold, or
Bold, Italic.
8) Click Add, then click OK to close the Edit Symbols dialog. The new symbol and, if
created, new symbol set are now available for use.
Note
After a new symbol is added to the catalog, it can be added to a new formula by
typing a percentage sign (%) followed by the new name into the markup
language. Remember that symbol names are case sensitive, for example, %prime
is a different symbol to %Prime.
Note
By default, only those user-defined symbols in the document are stored with it
and they are only available in that document. If necessary, you can embed all
user-defined symbols, so that when the document is transferred to another
computer it can be edited by another person. Go to Tools > Options >
LibreOffice Math > Settings on the Menu bar and uncheck Embed only used
symbols (smaller file size) in the Miscellaneous Options section.
Editing symbols
Modifying symbol names
To change the name of a symbol:
1) In the Edit Symbols dialog (Figure 310), select the symbol name to be changed in the Old
symbol drop-down list. The symbol appears in the left preview pane at the bottom of the
Edit Symbols dialog (Figure 310).
Customization | 363
2) Type a new name for the symbol in the Symbol text box, or select a new name in the
Symbol drop-down list. The new symbol name appears above the right preview pane at
the bottom of the Edit Symbols dialog.
3) Click Modify and the symbol name is changed.
4) Click OK to close the Edit Symbols dialog.
Moving symbols
To move a symbol from one symbol set to another:
1) In the Edit Symbols dialog (Figure 310), in the Old symbol set drop-down list, select the
symbol set where the symbol to be moved is located.
2) Select the symbol name to be moved in the Old symbol drop-down list. The symbol
appears in the left preview pane at the bottom of the Edit Symbols dialog (Figure 310).
3) In the Symbol set drop-down list, select the desired symbol set to move the symbol to.
The new symbol set name appears below the right preview pane at the bottom of the Edit
Symbols dialog.
4) Click Modify and the symbol is moved to the new symbol set.
5) Click OK to close the Edit Symbols dialog.
Deleting symbols
To delete a symbol from a symbol set:
1) In the Edit Symbols dialog (Figure 310), in the Old symbol set drop-down list, select the
symbol set from which the symbol should be deleted.
2) Select the symbol name to be deleted in the Old symbol drop-down list. The symbol
appears in the left preview pane at the bottom of the Edit Symbols dialog (Figure 310).
3) Click Delete and the symbol is deleted from the symbol set without any confirmation.
4) Click OK to close the Edit Symbols dialog.
Note
The only way to delete a symbol set is by deleting all of the symbols in that set.
When the last symbol is deleted from a set, the set is also deleted.
Formula spacing
If you need to modify a formula’s spacing, the grave accent (`) inserts an additional small space
and the tilde (~) inserts an additional large space into formulas. However, in the basic installation
of LibreOffice, they are ignored when they occur at the end of a formula. If you are employing text
in a formula, it may be necessary to include spacing at the end of formulas as well. This
customization is only required when working with a Math document and is not required when
inserting a formula into another LibreOffice component.
To add spacing at the end of formula in Math, go to Tools > Options > LibreOffice Math >
Settings on the Menu bar and uncheck Ignore ~ and ` at the end of the line in the
Miscellaneous Options section.
Note
To customize LibreOffice Math settings, open LibreOffice Math and then navigate
to Tools > Options > LibreOffice Math > Settings.
Extensions
For frequent formula creation and editing, you can customize LibreOffice by adding extensions
that are designed to help create formulas. Extensions are easily installed using the Extension
Manager. For more information on how to install extensions, see Chapter 13, Customizing
LibreOffice.
A commonly used extension is Formatting of All Math Formulas. It allows all Math formulas to
be formatted in a Writer, Calc, Draw, or Impress document. With it the font names and font sizes
of all formulas can be changed in a document. For more information on this extension, go to
https://extensions.libreoffice.org/en/extensions/show/formatting-of-all-math-formulas.
Note
If internet browsers do not fully support the MathML format, they may not display
the formulas correctly.
If working on a Math document, go to File > Save as on the Menu bar or use the keyboard
combination Ctrl+Shift+S to open the Save as dialog. Select MathML in the list of available
file formats in File type to save the formula as MathML.
If you are working in another LibreOffice component, right-click on the formula object and select
Save Copy as in the context menu to open the Save as dialog. Select MathML in the list of
available file formats in File type to save the formula object as MathML.
MathML formulas can be imported into Math by using Tools > Import MathML from Clipboard
on the Menu bar.
Chapter 10
Working with File Formats,
Security, and Exporting
File formats
LibreOffice can open a wide variety of file formats as shown below in addition to the Open
Document Format (ODF), including Portable Document Format (PDF).
Most file formats are automatically detected by LibreOffice and can be opened without explicitly
selecting the document format in the file picker.
Text documents
Writer can read Open Document text formats (.odt, .ott, .oth, .odm, and .fodt), and the following
text formats (including various legacy formats):
Microsoft Word 6.0/95/97/2000/XP/Mac) (.doc and .dot)
Microsoft Word 2003 XML (.xml)
Microsoft Word 2007/2010 XML (.docx, .docm, .dotx, .dotm)
Microsoft WinWord 5 (.doc)
Microsoft Works (.wps)
Abiword Document (.abw, .zabw)
MacWrite Document (.mw, .mcw)
Text CSV (.csv and .txt)
DocBook (.xml)
T602 Document (.602, .txt)
Apple Pages (.pages)
HTML Document (.htm, .html)
WordPerfect Document (.wpd)
Lotus WordPro (.lwp)
ClarisWorks/Appleworks Document (.cwk)
Rich Text Format (.rtf)
StarWriter formats (.sdw, .sgl, .vor)
Unified Office Format text (.uot, .uof)
Hangul WP 97 (.hwp)
eBook (.pdb)
OpenOffice.org 1.x (.sxw, .stw, and .sxg)
When opening .htm or .html files used for web pages, LibreOffice customizes Writer for working
with these files.
Spreadsheets
Calc can open Open Document spreadsheet formats (.ods, .ots, and .fods) as well as the
following spreadsheet formats (including various legacy formats):
Microsoft Excel 97/2000/XP (.xls, .xlw, and .xlt)
Microsoft Excel 4.x–5.0/95 (.xls, .xlw, and .xlt)
Microsoft Excel 97-2003 (.xml)
Microsoft Excel 2007-365 (.xlsx, .xlsm, .xltx, .xltm)
Microsoft Excel 2007-2010 binary (.xlsb)
Lotus 1-2-3 (.wk1, .wks, and .123)
Data Interchange Format (.dif)
Rich Text Format (.rtf)
Text CSV (.csv and .txt)
StarCalc (.sdc and .vor)
OpenOffice.org 1.x (.sxc and .stc)
dBASE (.dbf)
SYLK (.slk)
Unified Office Format spreadsheet (.uos, .uof)
Presentations
Impress can open the various Open Document presentation formats (.odp, .odg, .otp, and .fopd)
as well as the following presentation formats:
Microsoft PowerPoint 97/2000/XP (.ppt and .pot)
Microsoft PowerPoint 2007-365 (.pptx, .pptm, .potx, .potm)
StarDraw and StarImpress (.sda, .sdd, .sdp, and .vor)
OpenOffice.org 1.x (.sxi and .sti)
Unified Office Format presentation (.uop, .uof)
CGM – Computer Graphics Metafile (.cgm)
Portable Document Format (.pdf)
Apple Keynote 5 (.key)
Graphics
Draw can use the Open Document graphic file formats (.odg and .otg) and PDF files as well as
the following graphic formats:
Adobe Photoshop (*.psd)
AutoCAD Interchange Format (*.dxf)
Corel Draw (*.cdr)
Corel Presentation Exchange (*.cmx)
Microsoft Publisher 98-2010 (*.pub)
Microsoft Visio 2000-2013 (*.vdx; *.vsd; *.vsdm; *.vsdx)
WordPerfect Graphics (*.wpg)
OpenOffice.org 1.x (.sxd and .std)
Bitmap (*.bmp)
Joint Photographic Experts Group (*.jpeg, *.jpg)
Picture Exchange (*.pcx)
Sun Raster (*.ras)
Truevision TGA (*.tga, *.icb, *.vda, *.vst)
Drawing Exchange Format, or Drawing Interchange Format (*.dxf)
eMule Resource Files (*.met)
Portable Gray Map (*.pgm)
Open Office, or Star Office Draw (*.sda)
Tag Image File Format (*.tif, *.tiff)
Windows Metafile (*.wmf)
Enhanced Windows Metafile (*.emf)
Portable Bitmap Image (*.pbm)
Portable Network Graphics (*.png)
StarOffice Presentation (*.sdd)
Encapsulated Postscript (*.eps)
Kodak Photo CD (*.pcd)
Portable Pixmap (*.ppm)
Scalable Vector Graphics (*.svg)
X Window System or X BitMap (*.xbm)
Graphics Interchange Format (*.gif)
Macintosh Picture Image (*.pct)
Photoshop Document (*.psd)
StarView Metafile (*.svm(
X Windows System (*.xpm)
Tip
If the document needs to be shared and it is not going to be modified, the
preferred option is to convert the document to PDF. LibreOffice has an easy
method to convert documents to PDF.
Text documents
In addition to the ODF text formats (.odt, .ott, and .fodt), Writer can save files in the following
formats:
Office Open XML Text (.docx)
Microsoft Word 2007–365 (.docx, .dotx)
Microsoft Word 97–2003 (.doc)
Microsoft Word 2003 XML (.xml)
Rich Text Format (.rtf)
Text (.txt)
Text Encoded (.txt)
Unified Office Format text (.uot, .uof)
HTML Document (.html and .htm)
DocBook (.xml)
Notes
Since LibreOffice provides encryption support within the Microsoft Word filter,
password protected Microsoft Word documents can be saved.
While the .rtf format is often used to transfer text files between applications, there
is a loss of formatting and images. Thus, users should employ other formats.
Spreadsheets
Calc can save in the ODF spreadsheet formats (.ods, .ots, and .fods) as well as the following
formats:
Office Open XML Spreadsheet (.xlsx)
Data Interchange Format (.dif)
Microsoft Excel 2007–365 XML (.xlsx)
dBase (.dbf)
Microsoft Excel 97–2003 (.xls and .xlw)
Presentations
Impress can save in the ODF presentation formats (.odp, .otp, .fodp, and .odg), as well as the
following formats. Impress can also export to Draw-compatible graphic formats.
Microsoft PowerPoint 2007–365 (.pptx, .potm)
Microsoft PowerPoint 2007–365 AutoPlay (.ppsx)
Microsoft PowerPoint 97–2003 (.ppt)
Microsoft PowerPoint 97–2003 Template (.pot)
Microsoft PowerPoint 97–2003 AutoPlay (.pps)
Office Open XML Presentation (.pptx, .potm, .ppsx)
Unified Office Format presentation (.uop)
Drawings
Draw can save in the ODF Drawing formats (.odg, .otg, and .fodg) and it can also export to the
graphics formats BMP, EMF, EPS, GIF, JPEG, PNG, SVG, TIFF, and WMF.
Writer/Web documents
Writer/Web can save to the following formats:
HTML document (.html and .htm), as HTML 4.0 Transitional
Text and Text Encoded (LibreOffice Writer/Web) (.txt)
Exporting files
LibreOffice uses the term “export” for file operations where there is a change of file type. Unlike
Save As, exporting the file produces a document while keeping the current file format of the
actual document. If the file type cannot be found in File > Save As on the Menu bar, check File >
Export on the Menu bar (not available in Math) for additional file types.
If the PDF file format is needed, LibreOffice can export Writer, Calc, Impress, and Draw,
documents in that format. Writer can also export in EPUB. Also, LibreOffice can export files in
HTML and XHTML formats. Draw and Impress can also export in several image and graphic
formats.
Note
If you use the Export command, LibreOffice will create a copy of the file as a new
file using the selected format. The original file will remain open in LibreOffice.
Note
By default, a file in PDF format is not protected against contents tampering, or
editing. Contents of a PDF file can be edited by specialized software tools,
including LibreOffice Draw.
Note
Encapsulated PostScript (EPS) images with embedded previews are exported
only as previews. EPS images without embedded previews are exported as
empty placeholders.
Watermark
Add a centered, vertical, light green watermark text to the page background. The
watermark is not part of the source document.
Sign with watermark
Insert the required text for the watermark signature. When this option is selected, a
watermark signature appears on the PDF pages.
General
Sets general PDF export options.
Hybrid PDF (embed ODF file)
Use this setting to export the document with a hybrid file format: PDF and ODF. In PDF
viewers it behaves like a normal PDF file, but remains fully editable in LibreOffice.
Archive (PDF/A, ISO 19005)
Converts to the PDF/A-1b, PDF/A-2b, or PDF/A-3b format. All fonts used in the source
document are embedded in the generated PDF file, and PDF tags are created. The
primary purpose is to create an electronic document whose appearance is independent
of device and application, making it suitable for long term preservation.
PDF/A-2b is recommended for most users, because it allows for layers and
transparency with shapes and images. It also compresses better (JPEG 2000) than
PDF/A-1b, usually producing smaller files. PDF/A-3b is identical to PDF/A-2b, but also
accepts embedding of other file formats.
Universal Accessibility (PDF/UA)
Creates a universal, accessible PDF file that follows the requirements of PDF/UA (ISO
14289) specifications.
Tagged PDF (add document structure)
Tagged PDFs contain information about the structure of document contents. This can
help to display the document on devices with different screens and using screen reader
applications. Some tags that are exported are table of contents, hyperlinks, and
controls. This option can increase file sizes significantly.
Note
The document permission restrictions set by a password are observed only by
PDF readers compliant with the version 1.5 of the PDF format. For older PDF
readers, these restrictions may have no effect.
Notes
If the key store password has already been entered in the Select Certificate
dialog box, the key store may already be unlocked and not require the password
again. But to be on the safe side, enter the password.
When using a smart card, enter the PIN here. Some smart card software prompts
you to enter the PIN again before signing.
Tip
Other ways to export to EPUB from Writer (.odt) files include Calibre, an open
source e-book manager that runs on Windows, macOS, and Linux. Calibre
provides many e-book conversion facilities (including PDF to EPUB) and allows
editing of the conversion. See https://calibre-ebook.com/ for more information.
Text documents
Note
The use of styles in the text document is strongly recommended when saving, or
exporting to HTML, or XHTML format.
Saving a text document as HTML is limited by the HTML 4.0 Transitional
specification. Text documents in office suites normally use a richer set of
resources that do not appear in HTML, for example page formatting. Do not
expect the same layout when saving a file in HTML format.
Saving as HTML
A text document can be saved in HTML format so that it can be viewed in a web browser. To
generate a separate HTML page, you can associate a page break with a specific heading
paragraph style each time that style appears in the document. The Writer module automatically
creates a page containing hyperlinks to each of these pages.
When you save a text document in HTML format, any graphics in the document are saved into
the HTML document as embedded data streams. For graphics, JPEG, or SVG formats are saved
as HTML and all other graphic formats are saved as PNG.
LibreOffice generates the image files and the HTML file necessary to create an HTML page in a
browser. The number of files generated by the format conversion depends on the number of
images and objects in the original text document. Refer to Table 11 for the file types created and
file content when saving HTML format.
Table 11: File types created saving in HTML format
File Contents
The text contents, page layout, text attributes, meta
Myfile.html
tags, and styles.
Myfile_html_[random number].gif GIF images of visible contents of OLE objects.
Myfile_html_[random number].png, Images inserted in the text document as PNG, BMP, or
jpg, or bmp JPEG keep their original format.
Export as XHTML
If you want LibreOffice to export a text document as a XHTML file, LibreOffice generates an
XHTML file for each text document. Image files are also embedded in the XHTML file.
LibreOffice-generated XHTML files have better layout rendering, but fail to render objects other
than images.
1) If necessary, create a new folder as a location for the HTML file and images.
2) Go to File > Export on the Menu bar to open the Export dialog (Figure 311 on page 423).
3) Navigate to the location of the new folder in the Export dialog.
4) Enter a file name for the HTML file in the File name: text box.
5) In File type:, select XHTML (Extensible Hypertext Markup Language) as the file type.
6) Click on Export to save the file as XHTML and close the Export dialog.
Notes
Writer does not replace multiple spaces in the original document with the HTML
code for non-breaking spaces. To create extra spaces in a HTML file or web
page, insert non-breaking spaces in LibreOffice. To enter non-breaking spaces,
use the keyboard shortcut Ctrl+Spacebar (macOS ⌘+Shift+Spacebar).
The Tab character is not rendered when LibreOffice exports to XHTML. Instead,
use borderless tables to position contents instead of the Tab character in a line.
You will have to change the bullet and number lists that insert a Tab character
between the bullet or number and the text—instead, create a list style where the
Tab character is replaced by a space.
Objects that are different from usual image formats are not rendered in
LibreOffice XHTML output. This includes drawings, spreadsheets, charts, and
OLE objects in general. To render an OLE object in XHTML, replace the
document’s OLE object with an image of the OLE object.
Spreadsheets
Calc can save spreadsheet files as HTML documents. If the file contains more than one sheet,
the additional sheets follow each other in the HTML file. Links to each sheet are placed at the top
of the HTML document. To do this task, perform the following steps:
1) If necessary, create a new folder as a location for the HTML file.
2) Open the Save As dialog by selecting File > Save As on the Menu bar.
3) Navigate to the required location in the Save As dialog.
4) Enter a file name for the HTML file in the File name: text box.
5) Select HTML Document (Calc) (.html) in the File type: field.
6) Click on Save to save the file as HTML and close the Save As dialog.
7) If necessary, click on Use HTML Document (Calc) Format in the Confirmation dialog
that opens confirming the file is saved as HTML.
Notes
When you save Impress presentations in HTML format, the new HTML file does
not retain any animation or any slide transitions that have been created in the
Impress presentation.
Click on Create on the HTML Export dialog at any stage in the following
procedure to create the HTML file. If a web page design has not been previously
created, the option Existing design is not available on the Assign Design page of
the HTML Export dialog.
Depending on the size of a presentation, or drawing and the number of graphics it
contains, the HTML export function will create several HTML, JPG, and GIF files.
You should create a folder to hold all the files needed for the web version of a
presentation, or drawing. Saving to the desktop and not to a specific folder, the
HTML and graphics files are placed onto the desktop, which could create
difficulties in locating the files.
HTML options
Assign Design
Refer to Figure 320. This page allows you to create a new design, select an existing
design, or delete an existing design. If a design is deleted, only the design information is
deleted in the Export dialog. An export file will not be deleted by this action.
New design
Creates a new design using the pages of the Export dialog.
Display modes
By default, Writer/Web opens an HTML file in Normal view (Figure 326). To change Writer/Web
to Web view, go to View > Web on the Menu bar (Figure 327). If necessary, Normal or Web view
are used to add to an HTML document, then edit and format the contents of the HTML document.
The contents in an HTML document are rendered as if displayed in a browser.
Notes
HTML markup language has fewer formatting options than a ODF text document.
Writer/Web does not provide all formatting features for HTML documents and
some formatting dialogs have fewer options available. For example, a HTML
paragraph has no tab settings.
HTML markup content generated by Writer/Web is limited to the elements used to
produce a displayable document in a web browser. It does not contain other
components of a website such as external cascading style sheets (CSS), external
JavaScript, or other script languages. When you manually insert links to any
external components into the web page, you must do it in HTML Source display
mode.
Writer/Web options
Go to Tools > Options > LibreOffice Writer/Web (macOS LibreOffice > Preferences >
LibreOffice Writer/Web) on the Menu bar to open the Options LibreOffice Writer/Web dialog
(Figure 329), and then you can define the basic settings for LibreOffice documents in HTML
format. For more information on the options available for Writer/Web, go to the LibreOffice Help
website.
Click on a tab in the dialog to access the available options. The tabbed pages are as follows:
View
Defines the default settings for displaying objects in text documents and also the default
settings for the window elements.
Emailing documents
LibreOffice has multiple ways to send documents as email attachments in one of three formats —
Open Document Format (LibreOffice default format); Microsoft Office format; Portable Document
Format.
1) Go to File > Send on the Menu bar and use one of the following options:
– Email Document — The default email program is opened and the document is
attached to the email message.
– Email as OpenDocument text — The default email program is opened and the
document is attached to the email message.
– Email as Microsoft Word — LibreOffice creates a file in Microsoft Word format,
opens the default email program, and the document is attached to the email
message.
– Email as PDF — First, the PDF Options dialog opens. Next, select the required
settings required and click OK. LibreOffice will open the default email program with
the PDF file attached to the email message.
Note
The above procedure is for sending text documents as an attachment to an email.
When sending spreadsheets, presentations, or drawings, the email options
change to reflect the type of document being attached to an email message.
Digital signatures
To sign a file digitally, a personal key, also known as a certificate, is required. This personal key is
stored on the computer being used as a combination of a private key, which must be kept secret,
and a public key. These keys are added to a drawing when a digital signature is applied. A
certificate is obtained from a certification authority, which may be a private company or a
government institution.
When a digital signature is applied to a document, a checksum is computed from the document
content, plus the personal key being used. The checksum and public key are stored together with
the document.
When the document is opened on another computer with a recent version of LibreOffice, the
program computes the checksum again and compares it with the stored checksum. If both
checksums are the same, the program opens the original, unchanged document.
In addition, the program can display the public key information from the certificate. This
information can then be compared with the public key that is published on the web site of the
certificate authority. Whenever a document is changed, this change breaks the digital signature.
For a more information on digital signatures, see “About Digital Signatures” and “Applying Digital
Signatures” on the LibreOffice Help website.
Notes
A signed document displays a Digital Signature icon in the Status Bar.
Double-click on this Digital Signature icon to view the certificate. More than one
digital signature can be added to a document.
Changing an existing description invalidates a digital signature. However, multiple
digital signatures from the same author are allowed, because each digital
signature can have a different description.
Signature line
Graphic boxes, that includes a signature line, can also be added to a document. This allows the
user to optionally sign a document with their signature. This option is only available for Writer and
Calc documents.
Add a graphic signature box to a Writer, or Calc document as follows:
1) Go to Insert > Signature Line on the Menu bar to open the Signature Line dialog
(Figure 334).
2) Enter the necessary details and select the required options.
3) Click OK to close the Signature Line dialog and a graphic box with a signature line is
inserted into the document. An example is shown in Figure 335.
Document properties
To open a document’s Properties dialog (Figure 337), go to File > Properties on the Menu bar.
The tabbed pages in the Properties dialog provides information about the document and allows
the document’s properties to be changed.
Note
After printing, a document must be saved to preserve the Last printed data. No
warning message is displayed if an unsaved document is closed.
Description
Contains optional editable descriptive information about the document, which may be exported
as metadata to other file formats.
Title
Enter a title for the document.
Subject
Enter a subject for the document. A subject can be used to group documents with similar
contents.
Keywords
Enter the words that required to index the content of the document. Keywords must be
separated by commas. A keyword can contain white space characters, or semicolons.
Comments
Enter comments to help identify the document.
Tip
Title, Subject and Keywords are exported to PDF files as PDF Document
Properties. Entered values are exported and appear in the corresponding fields in
the PDF Document Properties Description.
Custom Properties
Allows custom information fields to be added to a document. In a new document, this page may
be blank. If the new document is based on a template, this page may contain custom properties.
Properties
Enter the Name, Type and Value for each custom property required. The custom
properties are exported as metadata to other file formats.
Add
Click to add a new row to the custom property list.
Security
Sets the password options for the current document.
Open file read-only
Select to allow this document to be opened in read-only mode only.
Record changes
Select to enable recording changes. This is the same as Edit > Track Changes >
Record on the Menu bar.
Tip
To protect the recording state with a password, select Protect and enter a
password. Other users of this document can apply changes, but cannot disable
change recording without knowing the password.
Protect/Unprotect
Protects the change recording state with a password. If change recording is protected for
the current document, the button is named Unprotect. Click Unprotect and type the
correct password to disable the protection.
Font
When Embed fonts in the document is selected, any fonts used in the document will be
embedded into the document when it is saved. This may be useful if you are creating a PDF and
want to control how it will look on other computer systems.
Only embed the fonts that are used in your documents. If fonts have been defined for the
document (for example, in the template), but have not been used, select this option to not embed
them. You can choose which types of fonts are embedded: Latin, Asian, Complex.
Font Embedding
Select this option to embed document fonts into the document file and allow portability
between different computer systems. The document with embedded fonts has a larger
size and the fonts are used on the target computer for better rendering of the document
layout.
Consider embedding fonts when a document use rare, or custom fonts not generally
available in other computers.
Note
Font licenses may restrict embedding fonts in documents. Font files contain flags
that indicate if and how they can be embedded within a document file. LibreOffice
parses these flags and determines if and how it may be embedded in a document
file. When opening a document containing embedded fonts, LibreOffice looks at
these flags to determine if and how a document can be viewed or edited.
Statistics
Displays statistics for the current file, for example number of pages, words, and characters.
Tip
The Intellectual Properties category modifies the layout of a document with a
watermark, fields in the header and footer and an information bar on top of the
document area. Each item inserted in the document is controlled by the
classification configuration file.
National Security
Selecting this category assigns the national security policy type to the document. The
selected category is saved together with the document as BAILS metadata in the file
properties and no modifications are carried in the document layout or the user interface.
Export Control
Selects this category assigns the export control policy type to the document. The selected
category is saved together with the document as BAILS metadata in the file properties
and no modifications are carried in the document layout or the user interface.
Note
Refer to the corporate data security policy and information security officers for
support in document classification.
Pasting contents
Pasting contents in documents with different levels of classification prevents a breach in the
security policy, contents with high classification level pasted to documents with lower
classification level are not allowed. LibreOffice displays a warning message wherever it detects
that the contents of the clipboard have higher security classification than the target document.
Redaction
LibreOffice documents can be redacted to remove, or hide, any sensitive information allowing
selective disclosure of information in a document while keeping other parts of the document
secret. When a LibreOffice document is redacted, it is exported as a new PDF file with all the
redacted portions removed and replaced by redaction blocks of pixels preventing any attempt to
restore or copy the original contents. A redacted document is exported in PDF format for
publication, or sharing.
A copy of any documents redacted in LibreOffice Writer, Calc, or Impress are automatically
transferred to LibreOffice Draw where the redaction is carried out.
Redaction tools
The tools available on the Redaction toolbar (Figure 339) are as follows:
Rectangle Redaction
Used to mark the content for redaction by drawing transparent rectangles covering the
content. Use the handles to resize the redaction rectangle.
Freeform Redaction
Allows the user to mark the content for redaction by drawing free-form lines, or polygons
covering the content.
Redacted Export (lack)
Converts the semi-transparent redaction shape to opaque black and exports as pixels in
the PDF file.
Redacted Export (White)
Converts the semi-transparent redaction shapes to opaque white shapes and exports as
pixels in the PDF file.
Export Preview PDF
Makes a copy of the presentation as a PDF file to preview the redaction areas before
making a redacted PDF file of the presentation.
Redaction | 407
Documents, spreadsheets, or presentations
A copy of a document, spreadsheet, or presentation is automatically transferred to LibreOffice
Draw where the redaction is carried out.
1) Open the document to be redacted in LibreOffice Writer, Calc or Impress, then go to
Tools > Redact on the Menu bar and the following happens:
– The document is copied, prepared and transferred to LibreOffice Draw as an untitled
file.
– LibreOffice Draw opens with the untitled document displayed.
– The Redaction toolbar automatically opens. If the Redaction toolbar is not displayed,
go to View > Toolbars on the Menu bar in LibreOffice Draw and select Redaction.
2) Go to Tools > Redact on the Menu bar and click on Rectangle Redaction or Freeform
Redaction in the Redaction toolbar.
3) Draw the required shapes to redact the sensitive areas in the document. The redaction
shape is gray allowing the sensitive areas in the document to be visible before they are
redacted.
4) If necessary, click on Export Preview PDF to create a preview copy of the PDF file to
review the redaction areas before the redaction is finalized.
5) If necessary, delete the PDF copy after reviewing the redaction areas in the file.
6) Click on Redacted Export (White), or Redacted Export (Black) in the Redaction toolbar
to export the presentation file as a redacted PDF file.
7) Navigate to the folder in the file browser window that opens where the redact PDF file is
going to be saved and enter a name for the file.
8) Click on Save to create the redacted PDF file. The gray redaction shapes are converted
to white, or black shapes and the document is exported as a PDF
Drawings
Open a drawing file in Draw, then use Steps 2) thru 8) in “Documents, spreadsheets, or
presentations” on page 459 to create a redacted PDF copy of the drawing file.
Note
When a redacted document is exported as a new PDF file, any redacted areas
are removed from the new document and replaced by redacted blocks of pixels.
These blocks of pixels prevent any attempt to restore, or copying the original
contents that have been redacted.
Automatic redaction
When LibreOffice conducts automatic redaction, it allows the user to define words and patterns
that are automatically marked for redaction. Automatic redaction is useful for documents that
have multiple occurrences of names and other personal information (for example credit cards,
phone numbers, and so on). Manually redacting this type information in a document would
require significant effort, but automatic redaction makes redaction of a document easier and
more efficient.
Creating targets
Targets are rules and patterns used by automatic redaction to find words and information in a
document that are to be marked for automatic redaction.
1) Open a document and use Tools > Auto-Redact on the Menu bar to open the Automatic
Redaction dialog (Figure 340).
2) Click on Add Target to open the Add Target dialog (Figure 341).
3) Enter a target name in the Name text box.
4) Select a target type from the available options in the Type drop-down list.
– Text — automatic redaction looks for all occurrences of the specified text and marks
them for redaction.
– Regular expression — define a regular expression for searching in a document. All
matches are marked for redaction.
– Predefined — select predefined regular expressions for automatic redaction, such as
credit card numbers, email addresses and so on.
5) Enter the content in the Content text box.
6) If necessary, select the options Match case and Whole words only to help define which
targets are auto-redacted.
Redaction | 409
7) Click OK to close the Add Target dialog and the target is added to the Redaction Targets
list in the Automatic Redaction dialog.
8) Repeat Steps 2 thru 7 above until all targets required have been added to the document.
9) Click OK to close the Automatic Redaction dialog. This opens the document as a drawing
in LibreOffice Draw with all targets automatically redacted using Rectangle Redaction.
10) Print the document, or export the document as a PDF file.
Exporting targets
1) Open a document where targets for automatic redaction have been added.
2) Go to Tools > Auto-Redact on the Menu bar to open the Automatic Redaction dialog.
3) Select the targets for export in the Redaction Targets list.
4) Click on Save Targets to open the Save Targets dialog and navigate to the location
where the JSON file is going to be saved.
5) Enter a file name for the JSON file in the File name text box.
6) Click on Save to save the JSON file and close the Save Targets dialog.
7) Click OK to close the Automatic Redaction dialog.
Importing targets
1) Open a document where targets for automatic redaction are going to be used.
2) Go to Tools > Auto-Redact on the Menu bar to open the Automatic Redaction dialog.
3) Click on Load Targets to open the Load Targets dialog and navigate to the location of the
JSON file.
4) Select the required file and click on Open to import the targets into the document and
close the Load Targets dialog.
5) Click OK to close the Automatic Redaction dialog. This opens the document as a drawing
in LibreOffice Draw with all targets automatically redacted using Rectangle Redaction.
6) Print the document, or export the document as a PDF file.
Note
The automatic redaction targets are saved in a document. The targets are
available after the document is saved and closed.
Password protection
LibreOffice provides two levels of password protection:
Adding passwords
1) Go to File > Save As on the Menu bar to open the Save as dialog (Figure 342).
2) Navigate to the folder where the file is going to be saved.
3) If necessary, enter a file name in the File name text box and select the file type from the
available options in the File type drop-down list.
4) Select the Save with password option, then click on Save to open the Set Password
dialog (Figure 343).
5) In File Encryption Password, enter a password to open the document and then enter
the same password as confirmation. Passwords are case sensitive.
6) Click on Options to open File Sharing Password.
7) Select Open file read-only to prevent any editing being carried out on the document.
8) To allow editing of the document, enter a password in Enter password to allow editing
and repeat the password as confirmation.
9) Click OK and the Set Password dialog closes and the file is saved with password
protection.
Notes
If the passwords match, the document is saved password protected. If either the
passwords do not match, an error message is displayed.
LibreOffice uses a very strong encryption mechanism that makes it almost
impossible to recover the contents of a document if the password is lost or
forgotten.
Changing passwords
When a document is password protected, the password can be changed while the document is
open.
1) Go to File > Properties > General on the Menu bar to open the Properties dialog.
2) Click on Change Password to open the Set Password dialog.
3) Enter a new password to open the file and to allow editing of the document.
4) Click OK to close the Set Password dialog.
5) Click OK again to close the Properties dialog.
OpenPGP encryption
LibreOffice can encrypt documents confidentially using OpenPGP. The document is encrypted
using a symmetric encryption algorithm, which requires a symmetric key. Each symmetric key is
used only once and is also called a session key. The document and its session key are sent to
the recipient. The session key must be sent to the recipients so they know how to decrypt the
document. To protect the document during transmission, it is encrypted with the public key
belonging to the recipient. Only the private key belonging to the recipient can decrypt the session
key. For more information on using OpenPGP encryption, go to the LibreOffice Help website.
Note
Keep this option selected to allow decryption of documents that have been
encrypted for other people.
3) Go to File > Save As on the Menu bar to open the Save as dialog.
4) Navigate to the required location for the file, then enter a file name and file type in the
Save as dialog.
5) Select Encrypt with GPG key option and click on Save to open the Select X.509
Certificate dialog.
6) Select the public key for the recipient. Multiple keys can be selected.
7) Click Encrypt to close the dialog and save the file encrypted with the selected public
keys.
Chapter 11,
Getting Started with Macros
Using the Macro Recorder … and Beyond
Introduction
A macro is a set of commands or keystrokes that are stored for later use. For example, a simple
macro allows you to enter your address into an open document and a macro can automate both
simple and complex tasks. Macros are very useful when you have to repeat the same task in the
same way.
The simplest way to create a macro is to record a series of actions with LibreOffice’s user
interface via the open source LibreOffice Basic scripting language (an implementation of the well-
known BASIC programming language). These macros can be edited and enhanced after
recording with the built-in LibreOffice Basic Integrated Development Environment (IDE).
The most powerful macros in LibreOffice can be created with one of the four supported scripting
languages (LibreOffice Basic, Python, JavaScript, and BeanShell). This chapter provides an
overview of LibreOffice’s macro facilities with an emphasis on its default macro scripting
language, LibreOffice Basic. Though some introductory examples are included for the BeanShell,
JavaScript, and Python scripting languages, an in-depth discussion on using these languages for
scripting is beyond the scope of this chapter.
Sub HelloMacro
Print "Hello"
End Sub
Sub Main
End Sub
Tip
If you prefer, you can remove the Sub Main … End Sub code from the Module and
leave only the HelloMacro subroutine.
12) (Optional) To check if the macro is written as expected by the LibreOffice Basic
programming language, click the Compile icon on the Macro toolbar.
13) Double-click the HelloMacro subroutine in the Object Catalog window under
TestLibrary > Module 1 and click the Run icon on the Macro toolbar, or press the F5 key,
to run the HelloMacro subroutine in the module. A small dialog will open with the word
“Hello” displayed (see below).
Recording a macro
When you record a macro in LibreOffice, you are actually using programming language to record
the steps needed to perform a certain task. For example, if you have to repeatedly enter the
same information into a document, you can create a macro that automatically enters this piece of
information without having to copy it every time you need it.
Note
Sometimes, it might be better to create an AutoText that can repeatedly enter
information into a document. See Chapter 2, Working with Text: Basics, in the
Writer Guide for more information.
First enable macro recording in LibreOffice by going to Tools > Options > LibreOffice >
Advanced and selecting the option Enable macro recording under Optional Features. By
default, this feature is turned off in LibreOffice.
1) Go to Tools > Macros > Record Macro to start recording a macro. A small dialog with a
Stop Recording button is displayed indicating that LibreOffice is recording a macro.
2) Type the desired text you want to be entered when this macro is run. As an example, type
your name.
3) Click Stop Recording on the small dialog. This will cause Basic Macros dialog to open
(similar to Figure 344 on page 470, but with different action buttons).
4) Open the library container My Macros.
5) Find the library named Standard in My Macros. Note that every library container has a
library named Standard.
Note
Whenever you create a new module in LibreOffice, a subroutine named Main is
automatically added to the module.
Running a macro
1) Go to Tools > Macros > Run Macro to open the Macro Selector dialog (Figure 350).
2) For example, select your newly created macro EnterMyName and click Run.
3) Alternatively, go to Tools > Macros > Organize Macros > Basic to open the Basic
Macros dialog (Figure 344), select your macro and click Run.
Figure 350: Use the Macro Selector dialog to select and run an existing macro
Tip
As a shortcut, you can use the single quote character (') to start a comment.
LibreOffice Basic is not case-sensitive for keywords, so REM, Rem, and rem can all start a
comment. If you use symbolic constants defined by the Application Programming Interface (API),
it is safer to assume that the names are case-sensitive. It is worth noting that symbolic constants
are an advanced topic that is not covered by this user guide and they are not required when
using the macro recorder in LibreOffice.
Note
Sometimes the word service is used. A service is supplied by an object when a
macro commands it via an object’s method.
args1(0).Name = "Text"
args1(0).Value = "Your name"
Gives the property the name “Text” and the value “Your name”, which is the text that is
inserted when the macro is run.
dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1())
The dispatch helper sends a dispatch to the document frame (stored in the variable
document) with the command .uno:InsertText. The next two arguments, frame name and
search flags, are beyond the scope of this book. The last argument is the array of
property values to be used while executing the command InsertText.
In other words, this line of code executes the UNO command .uno:InsertText passing
the value “Your Name” as the “Text” parameter.
end sub
The last line of the code ends the subroutine.
Creating a macro
When creating a macro, it is important to ask two questions before recording:
1) Can the task be written as a simple set of commands?
2) Can the steps be arranged so that the macro’s final command leaves the cursor ready for
the next command? Or does it allow the user to return to entering text or data into the
target document?
rem (3) Press Ctrl+Right Arrow to move the cursor to the start of “specifies”.
dispatcher.executeDispatch(document, ".uno:GoToNextWord", "", 0, Array())
rem (4) Press Backspace twice to remove the tab and the space.
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem -------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem (5) Press Tab to add the tab without the space after the constant name.
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "Text"
args4(0).Value = CHR$(9)
rem (6) ... and then press Shift+S to add an upper case S.
dim args6(0) as new com.sun.star.beans.PropertyValue
args6(0).Name = "Text"
args6(0).Value = "S"
rem (7) Press Ctrl+Right Arrow twice to move the cursor to the number.
dispatcher.executeDispatch(document, ".uno:GoToNextWord", "", 0, Array())
rem -------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:GoToNextWord", "", 0, Array())
rem (9) Press Ctrl+C to copy the selected text to the clipboard.
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
rem (10) Press End to move the cursor to the end of the line.
dispatcher.executeDispatch(document, ".uno:GoToEndOfLine", "", 0, Array())
rem (11) Press Backspace twice to remove the two trailing spaces.
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem -------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem (13) Press Ctrl+V to paste the selected number to the start of the line.
dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array())
rem (15) Press Tab to insert a tab between the number and the name.
dim args17(0) as new com.sun.star.beans.PropertyValue
args17(0).Name = "Text"
args17(0).Value = CHR$(9)
Other options
When the macro recorder is not able to solve a specific problem, normally the next steo is to
write actual code using the LibreOffice objects. Unfortunately, there is a steep learning curve for
these LibreOffice objects. It is usually best to start with simple examples and then increase the
scope of macros as you learn more. Learning to read generated macros is a good place to start.
Macro organization
In LibreOffice, macros are grouped in modules, modules are grouped in libraries, and libraries
are grouped in library containers. A library is usually used as a major grouping for either an entire
category of macros, or for an entire application. Modules usually split functionality, such as user
interaction and calculations. Individual macros are subroutines and functions. Figure 355 shows
an example of the hierarchical structure of macro libraries in LibreOffice.
Caution
While LibreOffice allows you to import libraries into a library container, it will not
allow you to overwrite the library named Standard. Therefore, if you store your
macros in the Standard library, you cannot import them into another library
container.
Just as it makes good sense to give your libraries meaningful names, you should use meaningful
names for your modules. By default, LibreOffice uses names such as Module1, Module2, and so
on.
As you create your macros, you must decide where to store them. Macros stored in the
application library container named My Macros are globally available to all documents and
storing a macro in a document is useful if the document will be shared and you want the macro to
be included with the document.
Exporting macros
If you want to export macro libraries so that they can be reused and shared with other people,
use the LibreOffice Basic Macro Organizer. To export a macro library:
1) Go to Tools > Macros > Organize Macros > Basic and the click the Organizer button.
2) Click the Libraries tab and choose which library you want to export.
3) Click Export and then select Export as BASIC Library (note that you cannot export the
Standard library).
4) Choose where you want to save the library and click Save.
When a library is exported, LibreOffice creates a folder containing all files related to the library.
Figure 356 shows an example of how a library named TestLibrary with a single module called
Module1 would be exported.
Importing macros
The LibreOffice Basic Macro Organizer dialog allows you to import macro libraries into your
document as well as creating, deleting, and renaming libraries, modules, and dialogs.
1) On the Libraries tab, select the library container to use and then click Import to import
macro libraries.
2) Navigate to the directory containing the library to import (Figure 357). Normally you can
choose between dialog.xlb and script.xlb. It does not matter which of these two files
you select; both will allow your macro to be imported. Macros can be stored in libraries
inside LibreOffice documents. To import libraries contained in a document, select a
document rather than a directory on disk.
Tip
On Linux, LibreOffice-specific files are stored in the user’s home directory inside
the .config folder. Directories and files with names beginning with a dot may be
hidden and not shown in a normal file selection dialog. When using LibreOffice
dialogs, rather than the operating system’s specific dialogs, type the name of the
desired directory in the Name field.
Events
Whenever LibreOffice detects a user action, we call it an event. For example, opening a
document, changing status of modified, or moving the mouse cursor are all events. LibreOffice
allows events to trigger the execution of a macro; the macro is then called an event handler. Full
coverage of event handlers is well beyond the scope of this chapter, but a little knowledge can
accomplish much.
Caution
Be careful when you configure an event handler. For example, if you write an
event handler that is called every time that a document is modified but make a
mistake so the event is not properly handled, problems can occur. One possible
result is that your event handler will force you to kill LibreOffice.
1) Go to Tools > Customize to open the Customize dialog and select the Events tab (Figure
359). The events in the Customize dialog are related to the entire application and specific
documents.
2) In the Save In drop-down, select LibreOffice, or a specific document from the menu to
save your event.
3) A common use is to assign the Open Document event to call a specific macro. The macro
then performs certain setup tasks for the document. Select the desired event and click
Macro to open the Macro Selector dialog (similar to Figure 350 on page 474 but with
different action buttons).
4) Select the desired macro and click OK to assign the macro to the event. The Events tab
will show that the event has been assigned to a macro.
Many objects in a document can be set to call macros when events occur. The most common
use is to add a control, such as a button, into a document. Even double-clicking on a graphic
opens a dialog with a Macros tab that allows you to assign a macro to an event.
Using extensions
An extension is code that can be installed into LibreOffice to add new functionality. Extensions
can be written in almost any programming language and may be simple or sophisticated.
Extensions can be grouped into types, for example:
• Calc add-ins, which provide new functionality for Calc, including new functions that act
like normal built-in functions.
• New components and functionality, which normally include some level of User Interface
(UI) integration such as new menus or toolbars.
• Chart add-ins with new chart types.
• Linguistic components such as spelling checkers.
• Document templates and images.
Although individual extensions can be found in several places, there is currently an extension
repository at: https://extensions.libreoffice.org/ and some documentation at
https://libreplanet.org/wiki/Group:OpenOfficeExtensions/List.
For more about obtaining and installing extensions, see Chapter 13, Customizing LibreOffice.
Tip
To learn more about the ScriptForge library, visit LibreOffice’s online Help at
https://help.libreoffice.org/7.4/en-US/text/sbasic/shared/03/lib_ScriptForge.html?
DbPAR=BASIC. Each of the 26 supported services have been extensively
documented and examples are provided for both Basic and Python programming
languages.
Tip
If you want to learn more about the LibreOffice API as well as UNO objects, refer
to the official API documentation at https://api.libreoffice.org/
def HelloWorld():
doc = XSCRIPTCONTEXT.getDocument()
cell = doc.Sheets[0]['A1']
cell.setString('Hello World from Python')
return
Tip
The Alternative Python Script Organizer (APSO) extension makes it easier to edit
and organize Python scripts, especially when they are embedded in a document.
Using APSO you can configure your preferred source code editor, start the
integrated Python shell and debug Python scripts. Visit
https://gitlab.com/jmzambon/apso to download APSO and learn more about how
to use it.
BeanShell macros
BeanShell is a Java-like scripting language that was first released in 1999.
When you select Tools > Macros > Organize Macros > BeanShell, LibreOffice displays the
BeanShell Macros dialog (Figure 366).
controller = model.getCurrentController();
sheet = view.getActiveSheet();
textCursor = cellText.createTextCursor();
return 0;
JavaScript macros
JavaScript is a high-level scripting language that was first released in 1995.
When you select Tools > Macros > Organize Macros > JavaScript, LibreOffice displays the
JavaScript Macros dialog (Figure 368).
documentRef = XSCRIPTCONTEXT.getDocument();
spreadsheetInterface = UnoRuntime.queryInterface(XSpreadsheetDocument, documentRef);
allSheets = UnoRuntime.queryInterface(XIndexAccess,
spreadsheetInterface.getSheets());
theSheet = allSheets.getByIndex(0);
Cells = UnoRuntime.queryInterface(XCellRange,theSheet);
cellA1 = Cells.getCellByPosition(0,0);
theCell = UnoRuntime.queryInterface(XCell,cellA1);
theCell.setFormula("Hello World from JavaScript");
Included material
Many excellent macros are included with LibreOffice. Use Tools > Macros > Organize Macros >
Basic to open the LibreOffice Basic Macros dialog. Expand the Tools library in the LibreOffice
library container. Inspect the Debug module; some good examples include WritedbgInfo
(document) and printdbgInfo (sheet).
Chapter 12,
Configuring LibreOffice
Choosing options to suit the way of working
Introduction
This chapter describes some of the setup options found in Tools > Options (macOS LibreOffice
> Preferences) on the Menu bar. Additional options, and more details about the options in this
user guide, are covered in LibreOffice Help.
Tip
Many options are intended for power users and programmers. If understanding is
difficult on what an option does, it is usually best to leave the option on its default
setting unless instructions in this user guide recommend changing the setting.
LibreOffice options
This section covers some of the options and settings that apply to all the components of
LibreOffice. For information on options or settings that are not discussed in this section, see the
LibreOffice Help.
To open the Options LibreOffice dialog for LibreOffice (Figure 370), go to Tools > Options
(macOS LibreOffice > Preferences) on the Menu bar. The list in the left-hand box of the Options
LibreOffice dialog varies depending on which LibreOffice module is open. The figures in this
chapter show this list in the left-hand box as it appears when a Writer document is open. Click
the chevron > next to LibreOffice to select a category from the drop-down list and display the
relevant page on the right-hand side of the dialog.
Notes
If a version of LibreOffice being used is not US English, some field labels may be
different from those shown in the following figures.
User data
On the User Data page of the Options LibreOffice dialog (Figure 370), the details of a LibreOffice
user can be entered and stored. These user details are used for several things within LibreOffice;
for example created by or last edited by for document properties, author of comments or
changes, sender address in mailing lists, and so on.
It is necessary to make sure that the correct user information appears here. Fill in the necessary
information if these details are blank, or amend and/or delete any existing information not
required.
If user data is not going to be used for document’s properties, deselect the option Apply user
data in Properties dialog for the LibreOffice file that is open. Go to File > Properties on the Menu
bar to open the Properties dialog for a file.
In Cryptography on the User Data page, set the preferred public keys for OpenPGP encryption
and digital signature. These keys are pre-selected in the text boxes for OpenPGP signing key
and OpenPGP encryption key when a document is digitally signed or encrypted (for more
information, see Chapter 10, Working with File Formats, Security, and Exporting).
General
The options available on the Options LibreOffice dialog — General page (Figure 371) are
described as follows.
Help
Extended tips
When Extended tips is active, a brief description of the function of an icon, menu
command, or a field on a dialog appears when the cursor is held over the item.
Warn if local help is not installed
Deselect this option to disable a warning when selecting Help, if offline help is not
installed.
Show “Tip of the Day” dialog on start-up
Deselect to disable the Tip of the Day dialog.
Open/Save Dialogs
Use LibreOffice dialogs
Select this option to use the Open and Save dialogs supplied with LibreOffice. Deselect
to use the standard Open and Save dialogs of the computer operating system. This
guide uses the LibreOffice Open and Save dialogs in illustrations.
Document Status
Printing sets “document modified” status
If this option is selected, the next time the document is closed after printing, the print
date is recorded in the document properties as a change. There will be prompt to save
the document again, even if any other changes have not been made.
View
The options available in the View page of the Options LibreOffice dialog (Figure 372) affect how
the document window looks and behaves. Set these options to suit user personal preferences.
Some options vary with the computer operating system.
Icon style
Choose the icon style for use in toolbars and dialogs. The Automatic option uses an icon
set compatible with the operating system and choice of desktop. Several icon sets are
available; for example Breeze, Breeze Dark, Colibre, Elementary, Karasa Jaga, Sifr, Sifr
Dark, Sakapura, and so on. Other icon sets can be added using extensions (for more
information, see Chapter 13, Customizing LibreOffice). Use the Extensions Manager to
display installed extensions and locate extensions for installation into LibreOffice.
Icon size
Toolbar, Notebookbar, Sidebar
Choose the display size of toolbar icons: Automatic, Small, Large, Extra Large
(toolbars only). The Automatic icon size option uses the setting for the computer
operating system. The Toolbar, Notebookbar and Sidebar can have different settings.
Visibility
Menu icons, Shortcuts
Select the visibility mode (Automatic, Hide, Show) to hide or show icons as well as text
on the Menu bar and in shortcut items.
Mouse
Positioning
Specifies if and how the cursor is positioned in newly opened dialogs (Default button,
Dialog center, No automatic positioning).
Middle button
Defines the function of the middle mouse button (if available)
No function
Automatic scrolling — dragging while pressing the middle mouse button shifts the view.
Paste clipboard — pressing the middle mouse button inserts the contents of the
Selection clipboard at the cursor position.
Graphics Output
Use hardware acceleration
Directly accesses hardware features of the graphical display adapter to improve the
screen display.
Use anti-aliasing
Enables and disables anti-aliasing, which makes the display of most graphical objects
look smoother and with fewer artifacts.
Tip
Use Ctrl+Shift+R (macOS ⌘+Shift+R) to restore or refresh the view of the
current document after changing the anti-aliasing settings to see the effect.
Print
After installing a printer on a computer, the general printing options for LibreOffice can be
selected to suit the most common printing method that is going to be used in the Print page of the
Options LibreOffice dialog (Figure 373).
Settings for
Specifies whether the print settings apply to direct printing or to printing to a file.
Defaults
PDF as standard print job format
Linux and macOS only — select this option to change the internal print job format from
Postscript format to a PDF format. Using PDF format has a number of advantages over
Postscript. For more information, see the following link:
https://www.linuxfoundation.org/collaborate/workgroups/openprinting/
pdf_as_standard_print_job_format.
Convert colors to grayscale
Specifies that all colors in a document are printed only as greyscale.
Include transparent objects
If selected, the reduction in print quality for bitmaps also applies to the transparent
areas of objects.
Reduce bitmaps
Specifies that bitmaps are printed with reduced quality. The resolution can only be
reduced and not increased.
Resolution
Specifies the maximum print quality in DPI. The resolution can only be reduced and not
increased.
High print quality
High print quality corresponds to a resolution of 300dpi.
Normal print quality
Normal print quality corresponds to a resolution of 200dpi.
Reduce transparency
If selected, transparent objects are printed like normal, non-transparent objects,
depending on your selection in the following two option buttons.
Automatically
Specifies that the transparency is only printed if the transparent area covers less than a
quarter of the entire page.
No transparency
When selected, a transparency does not print.
Note
Transparencies cannot be sent directly to a printer. Transparencies must be
visible to be calculated as bitmaps and sent to the printer. Depending on bitmap
size and the print resolution, a large amount of data may result.
Warnings
Defines which warnings appear before printing begins.
Paper size
Select this option if a certain paper size is required for printing the current document. If
the paper size used in the document is not provided by the current printer, an error
message opens.
Paper orientation
Select this option if a certain paper orientation is required for printing the current
document. If the format used by the current document is not available from the printer,
an error message opens.
Transparency
Select this option if a warning is required if transparent objects are contained in the
document. When printing a document with transparencies, a dialog opens to enable
selection if the transparency is to be printed.
Reduce gradient
If selected, gradients are printed with reduced quality.
Gradient stripes
Specifies the maximum number of gradient stripes for printing.
Intermediate color
Specifies that gradients are only printed in a single intermediate color.
Paths
On Paths page in the Options LibreOffice dialog (Figure 374), the location of files associated
with, or used by, LibreOffice can be changed to suit the working situation. For example, there
may be a requirement to store documents by default somewhere other than in My Documents.
Tip
Use the entries on the Paths page of the Options LibreOffice dialog to compile a
list of files, such as those containing AutoText, that are required to create a back
up or copy to another computer.
Fonts
The Fonts page on the Options LibreOffice dialog (Figure 375) allows the definition of any
replacements for any fonts that might appear in documents. If a document is received from
another source it may contain fonts that that are not installed on the computer system being
used. LibreOffice can substitute any fonts it cannot locate using the fonts listed on the Fonts
page when required. However, this font replacement does not change the font specified in the
document.
Replacement table
Lists the original font and the font that replaces it. Select Always to replace both the
screen font and the printer font, even if the original font is installed on a computer system.
Select Screen only to replace the screen font only and never replace the font for printing.
See Table 15 below for more information
Apply replacement table
Enables the font replacement settings that have been defined.
Font
Enter, or select, the name of the font that for replacement.
Replace with
Enter or select the name of the replacement font.
Apply
Clicking on the icon applies the selected font replacement.
Delete
Clicking on the icon deletes the selected font replacement.
Font settings for HTML, Basic and SQL Sources
Select the font and font size for the display of HTML and Basic source code.
Fonts
Select the font for the display of HTML and Basic source code. Select Automatic to
detect a suitable font automatically.
Non-proportional fonts only
Mark this check box to display only non-proportional fonts in the Fonts list box.
Security
On the Security page of the Options LibreOffice dialog (Figure 376), the security options for
saving documents and for opening documents that contain macros can be selected.
Security Options and Warnings
Click on Options to open the Security and Warning Options dialog giving access to
options for restricting what information can be changed or seen in a document. For more
information on Security Options and Warnings, see the LibreOffice Help:
https://help.libreoffice.org/7.4/en-GB/text/shared/optionen/securityoptionsdialog.html.
Security Warnings
Warns if a restricted document contains any recorded changes, versions, hidden
information, or notes when saving, sending, signing, printing, or creating PDF files.
Security Options
Provides options for removing personal information, password protection, how
hyperlinks are opened, and to block any links from documents that are not trusted.
Passwords for Web Connections
Enter a master password to enable easy access to websites that require a user name and
password.
Persistently save web passwords for web connections
LibreOffice will securely store all passwords used to access files from web servers.
Protected by a master password
Retrieve passwords from a password list after entering the master password.
Macro Security
Click on Macro Security to open the Macro Security dialog where the security level for
executing macros and specified trusted sources can be adjusted.
Personalization
On the Personalization page of the Options LibreOffice dialog (Figure 377), the overall
appearance of LibreOffice can be changed using themes.
• Select Default look, do not use Themes and LibreOffice uses the default in all modules.
• Select Preinstalled Theme, then click on a theme thumbnail and click Apply. After a
brief pause the appearance of LibreOffice refreshes and reflects the selected theme.
Application colors
On the Application Colors page of the Options LibreOffice dialog (Figure 378), the overall
appearance of LibreOffice can be changed by setting the colors used for the LibreOffice user
interface. Current settings of a color scheme being used can be saved and reloaded reloaded at
a later time.
Changing colors can make using LibreOffice easier, for example when writing, editing, creating
page layouts and page margins, inserting page breaks or graphics, and so on. Also, users may
prefer different colors from those used as LibreOffice defaults.
Notes
Some user interface elements cannot be hidden.
To enhance cursor visibility, set the Application background to between 40% and
60% grey. If the Application background is set to Automatic, 40% grey is used.
Accessibility
On the Accessibility page of the Options LibreOffice dialog (Figure 379), select accessibility
options including, for example, whether to allow animated graphics or text, some options for high
contrast display, and a way to change the font for the LibreOffice user interface.
Miscellaneous options
Sets the accessibility options for LibreOffice.
Support assistive technology tools (program restart required)
Windows only — allows use of assistive tools, such as external screen readers, Braille
devices, or speech recognition input devices. The Java Runtime Environment (JRE)
must be installed on a computer before enabling assistive support.
Use text selection cursor in read-only text document
Displays cursor in read-only documents.
Allow animated images
Previews animated graphics, such as GIF images, in LibreOffice.
Allow animated text
Previews animated text, such as blinking and scrolling, in LibreOffice.
Options for High Contrast Appearance
High-contrast is an operating system setting that changes the system color scheme to
improve readability. Users decide how LibreOffice uses the high-contrast settings of the
operating system.
Cell borders and shadows are always shown in text color when high-contrast mode is
active. The cell background color is ignored then.
Advanced
On the Advanced page of the Options LibreOffice dialog (Figure 380), the support options are
specified for Java applications in LibreOffice, including which Java Runtime Environment (JRE)
to use. It also specifies whether to use experimental (unstable) features such as macro
recording.
Notes
Users of Windows have a suitable Java Runtime Environment (JRE) already
installed on their machines. Linux users may need to get a JRE from the
distribution software repository if it is not already installed. Users of macOS need
to install Oracle Java Development Kit (JDK), not just JRE. To get the required
JDK, select the macOS option at
https://www.oracle.com/java/technologies/downloads/.
Some options cannot be reset once edited. Either undo the changes manually, or
click Cancel and reopen the Options LibreOffice dialog.
Make sure to install a JRE that is compatible with the LibreOffice architecture
being used. That is 64-bit JRE for 64-bit LibreOffice and 32-bit JRE for 32-bit
LibreOffice.
Note
The Expert Configuration dialog lets a user access, edit, and save configuration
preferences that can make the user profile of LibreOffice unstable, inconsistent,
or even unusable. If there is no knowledge what an option does, it is best to leave
the option at its default setting.
Online update
On the Online Update page of the Options LibreOffice dialog (Figure 381), options are specified
for the automatic notification and downloading of online updates to LibreOffice.
Online Update Options
Check for updates automatically
Mark to check for online updates periodically, then select the time interval how often
LibreOffice checks for online updates. LibreOffice will check Every day, Every week, or
Every month, as soon as a working Internet connection is detected. Also, click on
Check Now to immediately check for an update.
Connecting to the Internet by a proxy server, set the proxy in Tools > Options >
Internet > Proxy (macOS LibreOffice > Preferences > Internet > Proxy).
Download Destination
Displays the selected folder to store the downloaded files.
Download updates automatically
Enable the automatic download of updates to the specified folder.
Change
Click to select the destination folder for downloaded files.
User Agent
Select this option to send information about the LibreOffice version, operating system and
basic hardware. This information is used to optimize the download.
OpenCL
OpenCL™ is an open, royalty-free standard for cross-platform, parallel programming of modern
processors found in personal computers, servers and hand-held/embedded devices. OpenCL
(Open Computing Language) greatly improves speed and responsiveness for a wide spectrum of
applications in numerous market categories from gaming and entertainment to scientific and
medical software. For more information on OpenCL, visit https://www.khronos.org/opencl/.
General
On the General page of the Options Load/Save dialog (Figure 382), the default settings for
saving documents and default file formats can be selected.
Load
Load user-specific settings with the document
A LibreOffice document contains settings that are read from a computer system. When
saving a document, these settings are saved with it. Select this option so that when a
document loads, it ignores the stored settings in favor of the settings on the computer.
If this option is not selected, the following user-specific settings still apply:
Settings in File > Print > Options.
Spacing options for paragraphs before text tables.
Information about automatic updating for links, field functions, and charts.
Information about working with Asian character formats.
The data source linked to the document and its view are always loaded with the
document, whether or not this option is selected.
Load printer settings with the document
If enabled, the printer settings are loaded with the document. This can cause a
document to be printed on a distant printer (perhaps in an office setting). To prevent
this happening, manually change the printer in the Print dialog. If disabled, the default
printer will be used to print the document. The current printer settings are stored with
the document whether or not this option is selected.
Save
Save AutoRecovery information every __ minutes
Select AutoRecovery and the time period for how often the information used by the
AutoRecovery process is saved. AutoRecovery saves information required to restore all
open documents if LibreOffice crashes. Setting this option makes recovering a
document after a system crash easier.
Edit document properties before saving
Specifies that the Properties dialog opens when a file is saved for the first time and
every time that Save As is selected.
Always create backup copy
Saves the previous version of a document as a backup copy whenever a document is
saved. Every time LibreOffice creates a backup copy, the previous backup copy is
replaced. A backup copy uses the extension BAK.
To change the location of the backup copy, go to Tools > Options > LibreOffice >
Paths (macOS LibreOffice > Preferences > LibreOffice > Paths) and then enter a
new path for the backup file.
VBA properties
On the VBA Properties page of the Options Load/Save dialog (Figure 383), the general
properties for loading and saving Microsoft Office documents with VBA (Visual Basic for
Applications) code are specified.
Microsoft Word
Select the settings for Microsoft Word documents.
Load Basic code
Loads and saves the Basic code from a Microsoft document as a special LibreOffice
Basic module with the document. When saving the document in OpenDocument
format, the Basic code is saved as well. When saving in another format, the Basic code
from the LibreOffice Basic IDE is not saved.
Executable code
If selected, the Visual Basic for Applications (VBA) code is loaded ready to be
executed. If not selected, the VBA code is commented out so it can be inspected, but
not run.
Note
After loading the VBA code, LibreOffice inserts the statement Option VBASupport
1 in every Basic module to enable a limited support for VBA statements, functions
and objects.
Microsoft Office
On the Microsoft Office page of the Options Load/Save dialog (Figure 384), the settings for
importing and exporting Microsoft Office and other documents are specified.
Embedded Objects
Embedded Objects specify how Microsoft Office objects, or other OLE objects, are
imported and exported. These settings are valid when no Microsoft, or other OLE, server
exists (for example, in UNIX), or when there is no LibreOffice OLE server ready for editing
the OLE objects.
If an OLE server is active for the embedded object, then the OLE server is used to handle
the object.
If no OLE server is active for MathType objects, then embedded MathType objects are
converted to LibreOffice Math objects. For this conversion, the embedded MathType
objects must not exceed the MathType 3.1 specifications.
Tip
The compatibility filter in the Character Highlighting Color dialog provides the
Microsoft Office highlighting colors. Use those colors and choose Highlighting if
both color fidelity and ease of editing is required for Microsoft Office users.
Lock files
Select Lock files to generate a Microsoft Office lock file in addition to the LibreOffice lock
file. Lock files signal to applications that a resource or file should not be used until the
lock is released. LibreOffice can read lock files generated by Microsoft Office.
HTML compatibility
On the HTML compatibility page of the Options Load/Save dialog (Figure 385), define the
settings for HTML pages.
Font sizes
Use Size 1 to Size 7 to define the respective font sizes for the HTML <font size=1> to
<font size=7> tags.
Import
Defines the settings for importing HTML documents.
Note
Some options cannot be reset once edited. Either undo the changes manually, or
click Cancel and reopen the Options dialog.
Language settings
Go to Tools > Options > Language Settings (macOS LibreOffice > Preferences > Language
Settings) on the Menu bar to open dialogs where the properties for languages, writing aids,
language tools can be defined.
Note
Searching in Japanese and Asian Layout pages are only visible if the Asian
language support option in the Languages page is activated. Complex Text
Layout page is only visible if the CTL support is activated.
Languages
On the Languages page of the Options Language Settings dialog (Figure 386), define the default
languages and locale settings for documents.
Language of
User interface
Select the language used for the user interface, for example menus, dialogs, and help
files. There must be at least one additional language pack installed, or a multi-language
version of LibreOffice installed.
The Default entry selects the language of the user interface used by the computer
operating system. If this language is not available in the LibreOffice installation, the
language of the LibreOffice installation is the default language.
Formats
Locale setting
Specifies the locale setting of the country setting. This influences settings for
numbering, currency and units of measure.
The Default entry selects the locale used by the operating system. A change in this field
is immediately applicable.
Default currency
Specifies the default currency used by the currency format and the currency fields. If
the locale setting is changed, the default currency changes automatically.
The Default entry applies to the currency format that is assigned by the selected locale
setting. A change in Default currency will change all open documents. Also, dialogs and
icons that use the currency format also changes.
Note
The spell check for the selected language only functions when the corresponding
language module is installed. A language entry has a check mark in front of it if
spell checking is activated for the selected language.
Note
Some options cannot be reset once edited. Either undo the changes manually, or
click Cancel and reopen the Options dialog.
Writing Aids
On the Writing Aids page of the Options Language Settings dialog (Figure 387) the properties of
spelling, thesaurus and hyphenation can be specified.
Available Language Modules
Lists the installed language modules in LibreOffice. A language module can contain one,
two or three sub-modules: spelling, hyphenation and thesaurus. Each sub-module is
available in one or more languages. Selecting a module name activates all available
sub-modules simultaneously. Deselecting a module name, deactivates all available
sub-modules simultaneously. To activate or deactivate individual sub-modules, click on
Edit to open the Edit Modules dialog.
Note
The configuration allows two folders: one folder where a user has write
permissions, and one folder without write permissions. A user can only edit and
delete the user dictionaries that are located in the writeable path. Other
dictionaries can be read only.
Edit
To edit a language module, click on Edit to open the Edit Modules dialog. Select, or
deselect, each sub-module as required.
User-defined dictionaries
Lists the available user dictionaries. Select the user dictionaries required for spelling and
hyphenation.
New
Opens the New Dictionary dialog where the details of a new user-defined dictionary are
added and the language specified. Click on Help for more information on the options
available for the New Dictionary dialog.
Edit
Opens the Edit Custom Dictionary dialog allowing adding new entries and editing
existing entries in a custom dictionary. When a custom dictionary is edited, a check is
made on the status of the file. If the file is write-protected, it cannot be changed. New
and Delete are deactivated. Click on Help for more information on the options available
for the Edit Custom Dictionary dialog.
Note
Some options cannot be reset once edited. Either undo the changes manually, or
click Cancel and reopen the Options dialog.
Searching in Japanese
Defines the search options for Japanese. These commands can only be accessed after support
for Asian languages is enabled. Go to Tools > Options > Language Settings > Languages
(macOS LibreOffice > Preferences > Language Settings > Languages) on the Menu bar to
enable these options.
On the Searching in Japanese page of the Options Language Settings dialog (Figure 388) the
search properties for Japanese can be specified.
Asian layout
Defines the typographic default settings for Asian text after support for Asian languages has been
enabled. To enable these options, go to Tools > Options > Language Settings > Languages
(macOS LibreOffice > Preferences > Language Settings > Languages) on the Menu bar.
On the Asian Layout page of the Options Language Settings dialog (Figure 389), the properties
for Asian Layout can be specified.
Kerning
Defines the default settings for kerning between individual characters.
Western text only
Specifies that kerning is only applied to Western text.
Western text and Asian punctuation
Specifies that kerning is applied to both Western text and Asian punctuation.
Character spacing
Defines the default settings for character spacing in Asian texts, cells, and drawing
objects.
No compression
Specifies that no compression occurs.
Compress only punctuation
Specifies that only the punctuation is compressed.
Compress punctuation and Japanese Kana
Specifies that punctuation and Japanese Kana are compressed.
First and last characters
Defines the default settings for first and last characters.
Language
Specifies the language where first and last characters are defined.
Figure 392: Options Language Settings dialog — English Sentence Checking page
Internet options
In the Options Internet dialog (Figure 394) the following Internet settings are located on separate
dialog pages, depending on the computer operating system.
• Proxy page — enter the proxy settings for use with LibreOffice.
• Email page — enter the email program to be used when sending documents as email
attachments — Linux and macOS only. On a Windows operating system, the default
email program is used.
• MediaWiki page — A MediaWiki publisher is included with Windows and Linux. A Java
Runtime Environment (JRE) is required for this feature to work.
AutoCorrect functions
The AutoCorrect functions in LibreOffice automatically detect and replace common symbols,
spelling mistakes, and grammar mistakes. Occasionally, AutoCorrect changes something that
should have been kept. If unexplained changes appear in a document, the AutoCorrect settings
are often the cause. For more information on AutoCorrect, refer to the relevant user guides for
each module.
Chapter 13,
Customizing LibreOffice
Introduction
This chapter describes some common customization that can be carried out, as follows:
• Menus, toolbars, keyboard shortcuts, and the tabbed interface in LibreOffice can be
customized.
• New menus and toolbars, assign macros to events can be added.
• Different user interface variants can be selected and used.
Customizations can also be carried out by adding extensions that can be installed from the
LibreOffice website or from other providers. For more information, see “Adding extensions” on
page 554.
Note
Customized menus and toolbars can be saved in a template. The customized
menus and toolbars are created in a document and the document is then saved
as a template. For more information, see Chapter 4, Working with Styles,
Templates, and Hyperlinks.
Menu customization
Menus and commands on the Menu bar or context menus can be added, rearranged, removed,
or other changes made. To customize menus, go to Tools > Customize on the Menu bar and
select the Menus page (Figure 396), or the Context Menus page, from the context menu. The
Context Menus page is similar to the Menus page.
Adding commands
1) Go to Tools > Customize on the Menu bar to open the Customize dialog.
2) Click on Menus to open the Menus page (Figure 396). In the Scope drop-down list,
LibreOffice Writer appears as the selected module.
3) In Target, select the menu for customization from the drop-down list. This drop-down list
also includes the submenus available in the selected menu.
4) In Assigned Commands, check that the required command is not already listed for the
selected menu. This may require scrolling through the list of commands.
5) If necessary, enter a command name in the Search text box to locate the command in the
Available Commands list.
6) If necessary, select a command category from the Category drop-down list. By default,
All commands is displayed as the category.
7) Select the required command in the Available Commands list. This may require scrolling
through the list of commands.
8) Click on the right arrow to add the required command to the Assigned Commands list.
9) If necessary, click on the up arrow, or down arrow, to move the command into its correct
position in the Assigned Commands list.
Removing commands
1) Go to Tools > Customize on the Menu bar to open the Customize dialog.
Note
When assigning a character as a keyboard shortcut, make sure the character
used is NOT already assigned to another menu command.
Note
When customizing or creating toolbars in LibreOffice, make sure that there is a
LibreOffice module open, for example Writer, and at least one document open. If
there is no LibreOffice module, or document, open, then toolbar customization or
creation cannot be carried out.
Note
If a listed document is selected in the Scope drop-down list, then any
customization to a toolbar is only available for that selected document.
3) In the Target drop-down list, select the toolbar for customization. The tools on the
selected toolbar are displayed in the Assigned Commands list.
4) Select a tool in the Available Commands list. By default, all available tools are displayed
in the Available Commands list.
5) Alternatively, and to reduce the number of tools listed in Available Commands, use one
of the following methods:
– Enter a search term in the Search box
– Select a category in the Category drop-down list.
6) Select the required tool and click on the right arrow to add the selected tool at the bottom
of the Assigned Commands list for the toolbar.
7) Use the up and down arrows in Assigned Commands to position the tool in its required
position on the selected toolbar.
8) If necessary, insert a separator bar above the newly inserted tool as follows:
a) Select the newly inserted tool in the Available Commands list.
b) Click on Insert and select Insert Separator from the drop-down list.
9) If necessary, to remove a separator bar, right-click on the separator bar and select
Remove from the drop-down list.
10) If necessary, rename the newly inserted tool as follows:
a) Select the newly inserted tool in the Available Commands list.
b) Click on Modify and select Rename from the drop-down list.
c) Enter a new name for the tool in the Rename Menu dialog that opens.
d) Click OK to rename the tool and close the dialog.
11) Click OK to save the changes to the toolbar and close the Customize dialog.
Removing tools
1) Open the Customize dialog and click on Toolbars to open the Toolbars page.
2) In the Scope drop-down list, the LibreOffice module that is open appears as the selected
module.
3) In the Target drop-down list, select the toolbar that has the tool that is going to be
removed.
4) Select the tool for removal in the Assigned Commands list.
Keyboard shortcuts
Using keyboard shortcuts
A great deal of LibreOffice functionality can be done without using a mouse or other pointing
device, but by using keyboard shortcuts. For example, the keyboard shortcut Ctrl+O (macOS
⌘+O) is displayed next to the Open command in the File menu on the Menu bar. To use this
keyboard shortcut, press and hold down the Ctrl (macOS ⌘) key and then press the O key to
open the Open dialog. Release both keys after the Open dialog opens and displays. For more
information on keyboard shortcuts, see Appendix A, Keyboard Shortcuts.
Note
Some of the keyboard shortcuts available may be assigned as functions or
commands for use by the computer system. These keyboard shortcuts assigned
to the computer system should not used as a custom keyboard shortcut within
LibreOffice. It is possible to change keyboard shortcuts already assigned to the
computer system, but is definitely NOT recommended. Changing the keyboard
shortcuts used by the computer system may create problems in the operation of a
computer system.
Assigning macros
Macros can be assigned to events in LibreOffice. The assigned macro automatically runs each
time the associated event occurs. For example, an event could be when a document is opened, a
key is pressed, or the cursor is moved. To associate a macro with an event, the Events page in
the Customize dialog is used. For more information on assigning events to macros, see
Chapter 11, Getting Started with Macros.
Adding extensions
An extension is a program that can be installed into LibreOffice to increase the functionality of
LibreOffice. For example, templates, dictionaries, clip-art galleries, macros, and dialog libraries
can be added to LibreOffice as extensions.
Several extensions are installed when LibreOffice is installed onto a computer. More extensions
can be downloaded free of charge from the official extension repository located at
https://extensions.libreoffice.org/.
Extensions can also be downloaded from other sources. Some of these extensions are free of
charge; other extensions are available for a fee. Check the descriptions to see what licenses and
fees apply to extensions from other sources.
Installing extensions
Installing an extension that is listed in the official extension repository is as follows:
1) Go to Tools > Extensions on the Menu bar to open the Extensions dialog (Figure 404).
Updating extensions
It is necessary to check for updates to extensions on a regular basis. Checking for extension
updates is as follows:
1) Go to Tools > Extensions on the Menu bar to open the Extensions dialog.
2) Click on Check for Updates to open the Extension Update dialog.
3) Select any extension that is listed in Available extension updates and click on Install to
update the extension.
4) Close the Extension Update and Extensions dialogs.
5) If necessary, restart LibreOffice for the extension update to become effective.
Removing extensions
To remove and completely uninstall an extension no longer required is as follows:
1) Go to Tools > Extensions on the Menu bar to open the Extensions dialog.
2) Select the extension for removal in the Extensions dialog.
3) Click on Remove and confirm the removal of the extension.
4) Close the Extensions dialog.
Disabling extensions
To disable an extension without removing the extension from LibreOffice is as follows:
1) Go to Tools > Extensions on the Menu bar to open the Extensions dialog.
2) Select the extension being disabled in the Extensions dialog.
3) Click on Disable. The Disable button changes to Enable.
4) When necessary, click on Enable and the extension can be used again in LibreOffice.
5) Close the Extensions dialog.
Note
If Remove and Disable are grayed out in the Extensions dialog, the extension
cannot be removed or disabled. For example, when an extension is part of the
LibreOffice installation, it must not be removed or disabled.
Note
The color notations are linked and changing the value in one notification set
automatically changes the values in the other notification sets.
Adding fonts
LibreOffice supports PostScript (.pfb), TrueType (.ttf), and OpenType (.otf) font file formats.
Other font formats are available and may be supported by the computer operating system.
However, these font formats may be limited in character selection and quality.
Administration privileges are required to install additional fonts. After installation onto a computer
operating system, any additional fonts are available for use by all modules in LibreOffice.
In addition to proprietary fonts from sources like Adobe, hundreds of free license fonts are
available. Most free license fonts are available at no cost and can be used, shared, and edited.
Many of these fonts are clones, or close variations of classic fonts, but several fonts are original
fonts.
Many Linux distributions include some free license fonts in their package repositories. There are
several places where free license fonts are available, for example, The League of Movable Type
(https://www.theleagueofmoveabletype.com), Open Font Library (https://fontlibrary.org).
Appendix A,
Keyboard Shortcuts
Introduction
LibreOffice can be used without requiring a pointing device, such as a mouse or trackball, by
using the keyboard shortcuts that are available in Draw. Tasks as varied and complex as docking
and un-docking toolbars and windows, or changing the size or position of objects can all be
accomplished with using keyboard shortcuts. Although LibreOffice has an extensive set of
keyboard shortcuts, each LibreOffice module has keyboard shortcuts that are specific to that
module.
This appendix lists some of the more common keyboard shortcuts that apply to multiple
components of LibreOffice. For shortcuts specific to Writer, Calc, Impress, Draw, Math, or Base,
refer to the relevant user guide for each module, or search the LibreOffice Help.
To assist a user with identifying keyboard shortcuts, shortcuts are indicated by text next to menu
items and in tooltips for some tools on toolbars. In Writer, for example, some commonly used
keyboard shortcuts, for example, are as follows:
• File > Open on the Menu bar includes text indicating that Ctrl+O (macOS ⌘+O) is a
keyboard shortcut.
• Align Left tool in the Formatting toolbar has a tooltip indicating that Ctrl+L
(macOS ⌘+L) is a keyboard shortcut.
A list of the available keyboard shortcuts in LibreOffice can be found on the Keyboard page of the
Customize dialog. Go to Tools > Customize on the Menu bar and click on Keyboard to open the
Keyboard page. Examples of keyboard shortcuts for Linux/Windows see Figure 408 and for
macOS see Figure 409.
Note
Some keyboard shortcuts listed may not be available if the computer operating
system uses the same shortcuts as LibreOffice for other tasks. To resolve any
conflicts, assign different keys to these shortcuts by reconfiguring either
LibreOffice (see Chapter 13, Customizing LibreOffice), or the computer operating
system (see operating system documentation or help).
Note
Actual keys available on a macOS keyboard depend on the type of keyboard
being used. For example, a macOS laptop keyboard does not have a Delete
key, but a macOS keyboard with a numeric keypad does have a Delete key.
Keyboard shortcuts
Note
In computers using macOS, some keyboard shortcuts are not available and these
unavailable keyboard shortcuts are indicated in the following tables with a blank
cell.
Note
If a tool on a toolbar has an editable text field, for example Load URL or Line
Width, the Tab or Shift+Tab keys are then used to move the selection right or
left onto the next tool on the toolbar.
Navigation
Navigate through a document using keyboard shortcuts as shown in Table 22.
Table 22: Keyboard shortcuts for navigation
Windows
macOS Effect
Linux
Left Arrow Left Arrow Moves the cursor one character to the left.
Shift+Left Shift+Left Moves the cursor one character to the left
Arrow Arrow and selects the character.
Ctrl+Left Arrow ⌥+Left Arrow Moves the cursor to the beginning of the
previous word.
Right Arrow Right Arrow Moves the cursor one character to the right.
Shift+Right Shift+Right Moves the cursor one character to the right
Arrow Arrow and selects the character.
Ctrl+Right Moves the cursor to the beginning of the
⌥+Right Arrow
Arrow next word.
Gallery
The keyboard shortcuts for the Gallery on the Sidebar in LibreOffice are shown in Table 27.
Table 27: Keyboard shortcuts for the Gallery
Windows
macOS Effect
Linux
Opens the Enter Title dialog. Only themes added to
Ctrl+R LibreOffice can be renamed. Themes installed with
LibreOffice cannot be renamed.
Deletes themes that have been added to LibreOffice.
Ctrl+D ⌘+D
Themes installed with LibreOffice cannot be deleted.
Insert Inserts a new theme into the Gallery and opens the
Insert of New Theme dialog.
Ctrl+Shift+ ⌘+Shift+ Inserts the selected object as a linked object into the
Insert Insert current document.
Ctrl+I Ctrl+I Inserts a copy of the selected object into the current
document.
Ctrl+P Ctrl+P
Spacebar Spacebar Switches between a view of a list of object previews
and a selected object.
Enter Enter
Controlling macros
Keyboard shortcuts for controlling macros in LibreOffice are shown in Table 29. For more
information on macros, see Chapter 11, Getting Started with Macros.
Table 29: Keyboard shortcuts for controlling macros
Windows
macOS Effect
Linux
Runs a macro field. The multiplication sign is only
Ctrl+* ⌘+*
available on a numeric keypad.
Shift+Ctrl+
⌘+Ctrl+Q Stops a running macro.
Q
Note
Unicode hexadecimal numbers in the range U+0000 to U+0020 are not converted
into characters using the keyboard shortcut Ctrl+Alt+X (mac OS ⌘+⌥+X).
What is OpenDocument?
OpenDocument (ODF) is an XML-based file format for office documents (text documents,
spreadsheets, drawings, presentations, and more), developed at OASIS (https://www.oasis-
open.org/), an independent, international standards group. OpenDocument version 1.2 was
adopted by the International Standards Organization and named ISO/IEC 26300:2015 standard.
In December 2019, ODF 1.3 was approved as a committee specification.
Unlike other file formats, ODF (ISO/IEC 26300:2015) is an open standard. It is publicly available,
royalty-free, and without legal or other restrictions; therefore ODF files are not tied to a specific
office suite and anybody can build a program that interprets these files. For this reason ODF is
quickly becoming the preferred file format for government agencies, schools and other
companies who prefer not to be too dependent on any one software supplier.
LibreOffice 7.6 saves documents in ODF 1.3 Extended by default. LibreOffice can also open and
save in earlier versions of the ODF standard, as well as many other file formats, as summarized
below.
For a full list of file formats that LibreOffice can read and write, see this Help page:
https://help.libreoffice.org/latest/en-US/text/shared/guide/convertfilters.html