LibreOffice Page Numbering

“A whole article on page numbering?” someone asked when I said I was doing this article. “Isn’t that kind of basic?”

The answer is that, at the simplest level, it is. However, add different numbering styles, restarting numbering, or automating numbering, and the apparently basic topic quickly becomes more complicated. Set up a master document, and still another dimension is added. What at first seems like a straightforward task has far more options than many users imagine.

Moreover, in LibreOffice (or OpenOffice.org, for that matter), generally, you’ll want to put page numbers in headers or footers, so they are separate from the rest of the text on a page and easy to read. Setting up a header or foot is not difficult, but it does add another step or two to the apparently basic task of adding a page number.

Basic page numbering

The simplest scenario for page numbering is a file in which all the pages have the same layout and the page numbering is continuous. Here’s the basic procedure:

  • Select Insert -> Header or Insert -> Footer, depending on where you want to place the page number. The header or footer appears as a separate text frame on the page.
  • Place the cursor in the header or footer. Then select Insert -> Fields -> Page Number. The page number appears as an Arabic numeral with a gray background to indicate that it is a field (this background doesn’t print, as you can see by going to File -> Page Preview)

Align the page number. Select either Format -> Alignment -> Left, Right, or Center. You might also want to put a period or forward slash after the page numbering field, or a number sign (#) before it.

Now, every header or footer in the document will look the same. However, you have no option to arrange page numbering in a different format. For that, you have to use page styles (see below)

If you want to indicate a page number within a range of pages, at the second step, select Insert -> Fields -> Page Number, add “of” after the page number field, and, perhaps, “page” before. Then select Insert -> Fields -> Page Count. The resulting numbering will be something like “2 of 5” or “page 3 of 8.”

And if you don’t want Arabic numerals? Go to Insert -> Fields -> Other -> Document -> Page instead. There, you’ll find every page numbering format you can imagine, and probably some you can’t.

You also have the option of offsetting the numbering with a plus or minus sign followed by a numeral. For example, entering “-2” in the offset field will mean that the first two pages aren’t numbered, and the third page is number one. This is a format you often seen when the copyright page and other unnumbered front matter are included in a book.

Restarting page numbers and using different numbering formats

In some cases, you might want to restart page numbering. For example, the introduction might be numbered separately from the body of a novel. Similarly, In technical writing, each chapter is sometimes numbered separately, or the appendices are numbered separately from the rest of the text.

To restart page numbers:

  • Add a header and page number as described above. If you look at the status bar a the bottom of the editing window, you will see that page are formated with the Default style.
  • Create a page style to mark the first page on which page number changes. Select Format -> Styles and Formatting -> Page Styles, and create a page style formatted to your liking. Be sure to turn on a header or footer on the appropriate tab. Call the new page style something like Chapter First Page so you can easily identify it. 

  • If you want to use a different format for page numbering, go to the Page tab for the new page style. In the Layout Settings pane of the tab, select the Format field to choose the page numbering format. If you leave out this step, the new page style will use Arabic numerals for page numbering
  • Position the cursor at the bottom of the last page before the one on which you want numbering to restart.
  • Select Insert -> Manual Break -> Page Break. Specify the name of the new style that you created.

  • Click the Change Page Number box. Then select the number at which you want page numbering to restart and click the OK button. The manual break appears as a thin, solid line at the top of the page that uses the new page style.
  • Place the cursor in the header or footer of the page that uses the new page style, and select Insert -> Fields -> Page Number. If the new page style uses a different numbering system from the rest of the document, select Insert -> Fields -> Other -> Document -> Page -> As Page Style instead

With a little ingenuity, you can automate this process by defining a paragraph style that is always the first one used after a page break. Title or Heading 1 are often useful paragraph styles for this purpose.

To automate renumbering:

  • Select Format -> Styles and Formatting -> Paragraph Styles. Either select the style to use for the purpose or make a new one, and format to your liking.
  • Go the Text Flow tab for the paragraph style. Go the Breaks pane on the tab and select Insert, Type -> Page, and Position -> Before. This selection enables the With Page Style box, which you can now check.

  • Specify the style and the page number to restart the numbering at. Then click the Apply button at the bottom of the dialog window

Whether you are manually or automatically adding page breaks, once they are inserted, each page style functions separately from the others with a different page numbering format, or, perhaps, a different position for the page number.

Page Numbering and Master Documents

A Master Documents is a collection of files grouped as a single document, each of which can be opened separately. They are less common than they used to be, because, thanks to the amount of RAM in modern computers, most people no longer need Master Documents to allow them to work on large documents without slowing down their systems.

However, that only means that LibreOffice can handle larger documents than before, so Master Documents are still useful for the handful of users who want to work with documents that are hundreds of pages long.

If you do use Master Documents, you can add page numbering to the entire Master Document, just as outlined above. However, when you open a file in the Master Document, what you see is the page numbering that has been applied to that file — and nothing else.

This is not an error, as you might think at first. It is simply the result of two different views of the file: first as part of the Master Document, then as a stand-alone file. The only time that you will not see a difference in page numbering is when you use the same automation tricks with page styles in Master Documents as in separate files.

Numbering and page styles

Page numbering is an example of how style-oriented LibreOffice is. On simple documents, you can apply basic page numbers simply and quickly. However, if you want any advanced features other than an offset count, then understanding page styles becomes a necessity.

In addition to the features mentioned above, you should pay particular attention to the Next Style field on the Organizer tab of each page style. This field can apply styles automatically.

For example, you can set the First Page style so that it is followed by the Left Page style, which is followed by the Right Page style, which is followed by the Left Page style. If you have different layouts for page numbering for each style, then setting up the Next Style field properly will greatly ease advanced numbering for you.

Many people for many uses will not need anything except basic page numbering. However, it’s reassuring to know that the power and efficiency is there if you ever need it.

BY BRUCE BYFIELD

13 thoughts on “LibreOffice Page Numbering

  1. Michael Woods

    Dear Bruce
    Thanks very much for your article. I have been trying to figure out how to get a page number into the top of a page seemingly for years.
    I am no fan of Microsoft Word and have tried Openoffice several times but given up on the complexity of doing simple things.
    You have restored my faith! If you have other articles about Openoffice or Libreoffice I would love to know about them. I find the help files not very helpful.
    Thanks again for your efforts.
    Mike Woods
    Taipei
    Taiwan

  2. Eva

    Hey! I’ve got another problem. My Libre Office doesn’t show page numbers but text “Page Numbers.” To make matters worse, it shows this text instead of numbers in any document, even this which shows proper page numbers on different computers. I must have messed up something in my Libre cuz it was working few hours ago! Please write to my mail.

  3. Brendan

    I want to put page numbers in the footer and start with any number so that the rest follow. How do I do that?

  4. Andrew Thompson

    Where are the “show header on first page” and “odd / even” page check-boxes? I’ve tried every drop down menu selection looking for it – this has been the standard for over 20 years, no? Obviously, I don’t want a page number on my first page, but if I change the setting in right-click -> “page” it affects all pages. That would be “document” scope – not “page” scope. Ugh!!! Thanks in Advance,

  5. John Lambert

    Hello,
    I have a separate problem. I have no problems inserting page numbers in my LibreOffice manuscript, but when I close the file then open it again, the page numbers have disappeared and the top margin has shifted. Could someone explain to me how to get page numbers to remain in the doc when I close it? Or: can someone tell me where I might best post this question?
    Thank you very much,
    John

  6. teo

    Hello, i have a problem. When i try to insert page numbers i select insert-fields-page number and the problem is: in the first page the number that inserts is ‘2’ and the second page has not any number. futhermore, the 3rd page has number ‘4’ the 4rth has nothing, the 5th has number ‘6” etc. how can i solve this?

  7. Eric Cantrel

    This is why I have to reinstall Office 2003 now (no ‘ribbon’ junk) and no one uses these products – because they make simple things take an hour which should take all of 2 second.

    “Show header on first page” – check or uncheck
    “Odd Even Header” – Select and Check or Uncheck

    No “insert breaks” or other garbage – I want it off the 1st page, regardless of how I change that page (and bye, bye break) later.

    End Of Story. Good-Bye Libre Office. My headache feels better already.

  8. Jen Christopherson

    Okay, so I have written a book. I “thought” I had the page number thing down. However, I tried to set it up where the first pages are roman numerals and the actual book is regular numbers. I have managed to have chapter one numbered separately from the rest of the document and the front pages are included in the numbers of the document starting at the second chapter. All I can say is: HELP!!!! PLEASE, HELP ME! I am on a deadline and have to have this done asap! Thank you in advance.

  9. Jason-The-Simple

    I frequently print forms. Usually I get the form up;
    then go to print command and ask it for say 20 copies.

    My boss wants each form printed to have a unique, sequential number…

    Word perfect (which I used to use) makes it easy. Is there any way to get Libre to perform this function.

  10. Kent Smith

    I’ve just spent two days trying to make “restart page numbers” work, and have given up. This is hardly the first annoyance I’ve run into with LibreOffice/OpenOffice, but it IS the final straw.

    I’ve used Linux for a long time, but for anyone in a similar situation, it turns out it really is possible to install Microsoft Word in Linux and say goodbye to these terribly designed free apps. (Of course some Linux apps are excellent, but that’s another story.)

    You start by installing a copy of VirtualBox OSE (or Oracle VM VirtualBox if you want a paid platform), and then VBoxGuestAdditions (comes with VirtualBox). This gives you a window of any size in which you can load a legal copy of Windows, and then fire up Microsoft Word in it. Whatever you load in the window works flawlessly, recognizes your printers, internet, &c.

    The only issue that I’ve found is discovering, from inside a Linux program, where Windows is storing my documents. It takes a bit of nosing around. Of course, from inside Windows you have a normal C:\ prompt and a set of folders. The C:\ prompt and folders are also in the Linux directories, somewhere — you just have to locate them if you want to use them in a Linux app.

    In any case, life’s too short for all this nonsense.

    Kent

  11. john

    thanks alot. even with your help, getting these fucking numbers in there was a real chore..

Leave a Reply

Your email address will not be published. Required fields are marked *