5

I have a LibreOffice Writer document with 6 pages. At page 5 I want to restart numbering at 1 and have total page count reset as if the document started there.

  1. Page 1
  2. Page 2
  3. Page 3
  4. Page 4
  5. Page 1 of 2
  6. Page 2 of 2

How can I get this working?

2 Answers 2

5

I am going to assume that 1) You want this numbering to appear in a header or footer, 2) that you definitely want the "of new page count total" to appear (i.e. of 2-- would have been a lot easier if you didn't need that) and 3) that you don't have the header or footer already created--if you do, start from "Explanation as to why the following steps are necessary:" (or delete your current one and start from Step 1.)

O.k. So, with the 6 pages already created.

(If you want the numbering to appear in the footer, just replace the word header with footer in the instructions below).

Steps:

  1. Go to page 1 and then on the Menu at the top choose Insert > Header > Default Style

    We have now just created a header for each and every single page.

  2. Click on the header portion of the page and type (without quotes): "Page" and a space

  3. Go to Menu and choose Insert > Fields > Page Number. It should now say Page 1. Optionally: Click on an area outside of the header and scroll through the document, to see the other pages.

Explanation as to why the following steps are necessary:

If you simply wanted Page 5 to say Page 1 and you also had no intention of adding additional text to appear on only Page 5 and onwards (because text added there at this stage will appear on all the pages, including the previous ones), you simply had to follow the short instructions at this link: To Start With a Defined Page Number

However, since you have content that will appear on page 5 and onwards and not on the previous pages, which is the "of [total number of pages]", your document needs another header. However, new headers can only be added to new page styles and so therefore we must first create a new page style.

  1. It doesn't matter what page you are on right now. To create a new page style, Press F11 on your keyboard or the menu bar and go to Format > Styles and Formatting.

  2. Underneath the words Styles and Formatting, there are multiple buttons. Hover your mouse over to the second to last one on the group on the left / the one that has a paper icon and says Page Styles. Click on it.

  3. To keep things simple we are going to create a new page style with the same style / format as the existing pages so that we won't have to make much changes.

    Click on the last icon on the right / the one that includes the downwards pointing arrow. In the sub-menu select "New Style from Selection" and type a name, for example: "New Page Style for New Header" and click OK. Close the box as the new style doesn't instantly appear. You may optionally open the Styles and Formatting panel to see the style by pressing F11. If you do this, just stare at the options, do not double click on anything, and close the box.

  4. Go to Page 4 / click anywhere on Page 4.

  5. On the menu bar go to Insert > Manual Break and on the window that appears, 1) Select Page Break, 2) below the word "Style", select the new page style you created, in this example, the one named "New Page Style for New Header", 3) Check the checkbox that's to the left of the words "Change page number" and in the box below that, ensure that it says "1". Now you may finally click OK.

    If you click on page 4 and look at the Status bar at the bottom, you will see that it says "Default Style", and if you click on page 5 or 6, you will see that it says "New Page Style for New Header".

  6. In the header portion for page 5, after the words Page 1, type "of " (that's of followed by a space).

    Now, in LibreOffice Writer, there is no way for it to re-start the total number of pages count for a new page style. So, you will have to let it know how to do the count by inserting a formula.

  7. So, with your cursor still in the header portion after the of and the space, on the menu bar go to Insert > Fields > Other and choose the Variables tab. Under the "Type" section, click on "Insert Formula".

    You are now going to insert a formula that means the following: take the total number of pages and subtract from that the last page before the new page count was applied, which in this case is page 4.

  8. So, in the "Formula" box at the bottom center, enter: Page - 4 and click "Insert" and now click Close to close that box.

That's it. Finally! If you add any more pages after page 6, the "of 2" portion will update correctly. So, with 7 pages, it will say "of 3", and so on. Note: As I add new pages, I see that the number after "of" is not updating correctly for the last page created. It is one number behind. To correct this, simply go the header and either a) delete the space between "of and the number" and then add it back or b) add a space after the number after of and if you want then delete it. The number will automatically and correctly be updated. As I said, for some reason this happens with the last page. So, if you were to add 3 more pages, it would look like this: Page 3 of 3, Page 4 of 4, Page 5 of 4. Just do what I mentioned and it will be fixed. This is on LibreOffice Version 4.3.5.2

If you don't want to use the formula route, you may follow the instructions given here.

Credit to these other pages:

https://stackoverflow.com/questions/17150031/how-do-i-add-different-headers-to-different-pages:
That's pretty much what I said above, but shorter instructions and I had trouble getting it to work with the order it mentioned, especially if one already had a header created. I also think it would have been problematic if you wanted to add a third header on Page 7 for example with those instructions since the Default style was being applied to the subsequent pages.

http://ask.libreoffice.org/en/question/11524/how-do-i-change-the-page-count-in-writer/:
Formula idea, though wrong variable. That page also pointed me to the bookmarking idea, which is the non-formula route I mentioned above.

https://help.libreoffice.org/Writer/Formula:
Variables for formulas, which is where I got the correct variable.

About Headers and Footers

Creating a Page Style Based on the Current Page - LibreOffice Help

1
  • "2) that you definitely want the "of new page count total" to appear (i.e. of 2-- would have been a lot easier if you didn't need that) and 3) that you don't have the header or footer already created--if you do, start from "Explanation as to why the following steps are necessary:" (or delete your current one and start from Step 1.)" is very confusing to me. What does this refer to: "of new page count total"? And what does 2-- refer to? Jun 6, 2019 at 18:20
0

"Note: As I add new pages, I see that the number after "of" is not updating correctly ..."  
In Version: 4.4.6.3, none of the formula based page counts update, when a page is created or deleted. Putting in a space then deleting works, but even easier is to save and reload (or save and close).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .