LibreOffice: Custom page numbering for appendices
Creating custom page numbering, e.g. A1, A2, ..., B1, B2, ... isn't supported out of the box in LibreOffice Writer. This article shows how to achieve custom page numbering on pages showing up in the index, too.
The problem
You have to format the page numbering for a distinct part of your document and LibreOffice doesn't offer this format by default. The custom page numbering should show up in a index.
The idea
We will use outline numbering combined with one of the heading paragraph styles to create the prefixes 'A', 'B',
etc. Since the outline numbering is prepended to the heading we will introduce the new character style Invisible
to hide it. The hidden outline numbering (the 'A', 'B', ...) is still available to be inserted by a field
reference which could be applied after the heading content (Appendix A, Appendix B, ...). This field reference
could be also used to prepend the numerical page numbering on the page. As final step we have to tweak the index
by inserting the outline numbering into the index format for the modified heading level.
Prepare a paragraph style for the heading
LibreOffice offers a bunch of heading styles (Heading1..10) which will usually never be used all together. To
create our customized heading for appendices we choose Heading 6
. As this heading should be
displayed with the
same font size as Heading 1, we have to copy all those properties to Heading 6. As additional setting we have to
change the indention of the heading to reflect that it will be prepended with an outline numbering which will be
hidden in one of the following steps.
Create character style to hide outline numbering
As said before a new character style is required to hide the outline numbering for Heading 6. Create a new
character style and name it Invisible
. Choose a monospaced font and set the foreground color to
white.
This new character style will be used in the next step.
Adjust outline numbering
Open Tools | Outline Numbering
and choose Level 6
on the left side. Adjust all settings
as displayed in the image
below.
Add a new page for a appendix to your document
Add a new page to your document. Use a new page style to avoid changing the rest of your document. Add a new
heading to the page and type Appendix
and apply the paragraph style Heading 6
. The
heading will be numbered with
'A' which will be invisible since style Invisible
is applied. Add a new field reference by using
CTRL + F2 or
clicking Insert | Fields | other...
and choose Document tab | Chapter | Chapter
number
. The image below shows the result
with the outline numbering displayed in light gray color and field names for demonstration purpose. If the
indention doesn't fit right, adjust the setting for paragraph style Heading 6 as described above.
Use the same steps to insert a field to display the outline numbering and a field for the numeric page numbering into the footer (or any other place). The image below shows the field names.
Adjust the index
To display the custom page numbering in the index, we have to change the entry settings in the index properties.
Navigate to the index and right click on it and choose Edit Index/Table
. Change the assignments as
shown in the
image.
Edit index - Choose styles to use
To create a customized entry go to the Entries
tab and change the Structure and
Formatting
section as shown below.
That's it. Hope it works for you.