Section Page Numbering X of Y - Is this possible?

Hi All,
After spending hours trying to find this today I ask here.

My document simply has four parts.
Each part has a various number of pages.
Each part should have the same header.

I’d like the page numbering to show in the format
Page X of Y

X should reset to 1 for each part. (This I can get to work, mostly)
Y is the count of the pages in that part

Y is the issue. I’ve no idea what its called in libreoffice.
In word its just simply ‘sectionpages’.

Is this a thing that can be done or does it require some workaround.
Can anyone help? link to a site or video or ?

Thanks in advance

Edit: Other info.
OS: Ubuntu
LO: 7.5.9.2
This is an .odt document

@Darole you didn’t mention OS name, LO version and save format. This would greatly help to answer your question.

Also, how did you “implement” your parts? Which Writer feature did you use to do this? In principle, a part is defined by a separate page style (it is possible to make do with a single page style if your parts differ only in header/footer if this contents can be “computed” from headings of fields).

Resetting page to 1 at start of a part is requested in manual page break Insert>More Breaks>Manual Break where you force the next page style (even if it is the same as previous) and change the page number.

Getting the highest page number of the current part is tricky as there is no built-in variable for it. The simplest implementation is to define a reference as the very last “object” in the part (just preceding the final paragraph mark) and to insert a cross-reference to it in the header/footer.

The only trouble is the reference must be given a unique name, which practically implies a separate page style per part.

Of course, this “implementation” is only valid if your document is saved .odt. It won’t persist is you save .doc(x) because 1) there is no page style in DOCX (every page will be converted under its own page “object”, cancelling the definition of “part”), 2) the cross-reference mechanism is different in ODF and DOCX.

Answer the question about your “environment”. Eventually attach a reduced version of your document so that we can evaluate your skill in Writer formatting and patch it to fit your specification.

EDIT:
Thanks for providing the info about your computer but are you sure you have LO 7.8.9.2 ??? Official release in the 7 series stopped at 7.6.7.2 before switching to a new numbering scheme with 24.2. I am presently at 24.8.4.2. You are probably not at latest Ubuntu.

It would be easier to discuss based on your document. Please attach it. If you consider it is private, attach it to a private email: click on the icon left of my name; this will pop up a dialog with a Message button.

1 Like

Use the Chapters instead of the Sections (Sections are different things in the MS Word and the LO Writer)
Then you will able to use the page numbers (restarted in every “level 1 chapters”), and the Chapter number in the footer as fields:

Page 5 of the Chapter 2

Sorry,
its:
7.5.9.2

Just updated to latest. 24

That ‘message button’ doesnt appear for me. However, Ive attached the doc here.
I’ve also attached a pdf that’s marked up show it should look.
Each part is used by different people. Hence the need of Page X/Y so that they know they have the correct number of pages for their bit.

Thanks

000_Template - Blank - Chords & Lyrics.pdf (116.7 KB)
000_Template - Blank - Chords & Lyrics.odt (16.4 KB)

Be aware that each page 1 is defined as a right page. So your 5 page sample file will grow to 7 pages, 2 of the pages are blank.
For the two intro pages I formatted the pages as you wished; I altered for each of the other remaining pages extra page styles, starting each page count with 1. If there are more than one pages for the main text you have to insert fields as shown in part 1 / intro. There is a litte explanation in the sample file.
.
000_Template - Blank - Chords & Lyrics Grantler.odt (17.4 KB)

Hi Grantler,
I’ll have a look at this.
Thanks.

There is a lack of styles to help you work with the contents. I have rebuilt the document in Writer to remove some of the Word styles. I am not sure whether some of the words are meant to be headings or just emphasis so you will have to fix those.
.
Using @ajlittoz method, I added a typographical decoration at the end of each part of the document, it has a space at each end so you can easily replace the decoration with a word like End or just delete the decor itself, but not the bookmark, at the end of editing. It is bookmarked and that bookmark provides the count of pages for that part. You will need to update the field though using Tools > Update > Update All
000_Template - Blank - Chords & Lyrics115973EA-1.odt (22.7 KB)

That looks ace !
Thank you.

I need to understand how it works now

I created 4 page styles, all the same but with different names so I could reset the page number and have a different field in each footer.
.

The typographical decoration and the space each side is bookmarked with a name referring to its function, e.g. End of Lyrics.
.
If you click between the decor and the space, then press Ctrl+F2 (Insert - Field - More fields), select the cross reference tab and click on bookmarks you will see I have cross referenced the number of the page in which it is located. This gives us coincides with the number of pages in that part of the document.
.
You can see the styles I used if you open the styles pane and, at the bottom, select Applied Styles. Check paragraph style character styles and Page styles

1 Like

@EarnestAl

Sussed it now :slight_smile:
Thank you so much for this.
I’ve even sorted the headers so that they are all tied to the very first page header, using bookmarks.
I guess it comes down to sooooo many years of using word and learning its “intricacies” that getting out of that mindset just takes a little time.

I must admit that now I’m a little embarrassed that Ive been using LO for >8yrs at home but never really ‘studied it’ as its always just worked.
(My home is all Linux but work supplies me a windows laptop that’s IT controlled and LO isn’t allowed :frowning: )

How do I mark this as solved ?

Mark the checkbox below the correct answer.