Front page w. wrong page nbr.; page style changes unprompted

Discuss the word processor
Post Reply
User avatar
CannedMan
Posts: 225
Joined: Wed Aug 04, 2010 12:06 am

Front page w. wrong page nbr.; page style changes unprompted

Post by CannedMan »

For some inexplicable reason, the first page of my document i page number 5. There is nothing hidden residing in front of the first word, and the page style used is (NO) ‘Første side’ (‘First Page’ or ‘Front Page’). The first word of the file is styled with H1, which has nothing checked for page changes.

Additionally, the following pages (with their own style), containing the index, changes page style from page two of the index; so page one of the index (document page 3, by the document numbered page 7) has the index page style I created, whilst page two of the index (doc p. 4, doc. n. p. 8) has the style Standard.

I am guessing these errors are connected. What could cause this, and how can I fix it?
Apache OpenOffice 4.1.5 / LibreOffice 7.0.0.3 on Windows 10 (x64)
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Front page w. wrong page nbr.; page style changes unprom

Post by RoryOF »

Place cursor in front of the Page Number field on the first page; right click and select Fields. It may help to turn on /View /Field names and also to highlight the field name to show the Fields entry in the popup menu. Verify that the Offset value on the Edit Fields window is set to 0.

All the page numbers you detail are offset by 5, so the problem is almost certain;y on the first page.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Front page w. wrong page nbr.; page style changes unprom

Post by John_Ha »

You may find this explanation helps your understanding.

It's all about Page Breaks.

Page Numbers follow on sequentially from the previous page and there is nothing stored in the diocument about what the page number is - it is calculated by how far away from the start it is.

If you want to change or set a Page number you must insert a Page Break and set the new page number. The Page Number you set is stored as an atttribute of "the first paragraph on the page following the page break where the change in number is made". It can be seen and changed by placing the cursor in the first paragraph on the page following a page break and going Format > Paragraph > Text Flow .... The next and subsequent pages do not have a value here as the page numbering follows automatically in sequence.

The Page Style following a Page Break can be exactly the same Page Style as the page before the Page Break or can be a different Page Style.

If you want to change a header, chage header text, change a footer, change footer text, change the page number, hide page number etc, you must insert a Page Break and you must select a Page Style which makes the change you want.

It is very useful to make Page Breaks visible by Tools > Options (Preferences on Mac) > OpenOffice > Appearance > scroll to Text document > tick Section boundaries > choose a colour for Page and column breaks. Page Breaks now show on the screen as a thin coloured line and identify all page breaks. This is the default setting on later installations where the Page Break appears as a thin blue line.

Page Styles (and hence changed headers and footers); Page Breaks and Page Number are an attribute of the first paragraph on the page following a change even if the paragraph is empty or is a Heading (or is a table at the very top). Note that Heading means a Heading 1 or a Heading 2 etc, and not a Page header as in header/footer.

Set View > Non printing characters ..., to ON to see the paragraph break.

When you Insert > Manual Break > Page Break..., the small pop-up window allows you to choose the Page Style for the first (and hence subsequent) page(s) following the break; and also the option to change the Page Number for the frst (and hence subsequent) page(s) following the break.

You can also manually insert and delete Page Breaks, manually choose the Page Style (and hence change headers and footers), and manually change the Page Number, by placing the cursor in the first paragraph on a page and going Format > Paragraph > Text Flow > Breaks ... (or in the table, and going Table > Properties > Text Flow...) where all these options can be changed.

You can also delete Page Breaks by Backspace, or by deleting highlighted text which includes the Page Break.

Debug page style changes / changed page numbering / changed header problems by placing the cursor in the first paragraph following a page break and going Format > Paragraph > Text Flow > Breaks .... What is the document telling Writer to do following the break? If you see nothing there to cause the change, the document has become corrupted and (much!) more diagnosis is required.

A word of caution. You can go Format > Page ..., and edit the format of the page in which the cursor is currently located. However, you are actually editing that page's Page Style, so all other pages which use that same Page Style will also have their formats changed.

Another word of caution. Do not manually change the page number by editing any paragraph, not even the first paragraph on a page. You must only edit the first paragraph following a page break. If you edit a paragraph which does not follow a page break to change page number your document will go horribly wrong.

You can get more information on Page Styles, Page Breaks and Page Numbering in Chapter 4 - Formatting Pages of the Writer Manual.

See the Writer Tutorials where you will find [Example] Document structure and numbering and [Tutorial] Page numbering
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
keme
Volunteer
Posts: 3704
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Front page w. wrong page nbr.; page style changes unprom

Post by keme »

CannedMan wrote:For some inexplicable reason, the first page of my document i page number 5. [...] The first word of the file is styled with H1, which has nothing checked for page changes.
The paragraph can still have additional formatting to change the pagination, overriding the settings in the style. Did you check that initial paragraph with Format - Paragraph, or did you only look at the settings in the paragraph style?
CannedMan wrote:Additionally, the following pages (with their own style), containing the index, changes page style from page two of the index; so page one of the index (document page 3, by the document numbered page 7) has the index page style I created, whilst page two of the index (doc p. 4, doc. n. p. 8) has the style Standard.
I suspect that you may have based that custom index page style on the "first page" style, which by default selects "Standard" style for the next page.

See the setting for Next style in the Organiser tab of your index page style. If you want all pages for the initial index/ToC to use the same style, the next style field should contain exactly the same as the Name field above it.
CannedMan wrote:I am guessing these errors are connected. What could cause this, and how can I fix it?
In addition to what I said above and what others have suggested, this might also be caused by editing your file in, or using content with formatting from, Microsoft Word. It is hard to say whether this is the case, and how it may have happened, without having the file at hand and some info on document context.

The differences in styles handling between Word and Writer often makes a mess of even simple and short documents if the file go back and forth between the two applications. A telltale sign that this has happened is the existence of "Convert x" styles in the document.
User avatar
CannedMan
Posts: 225
Joined: Wed Aug 04, 2010 12:06 am

Re: Front page w. wrong page nbr.; page style changes unprom

Post by CannedMan »

I will look into all these good suggestions shortly, in see if any of them help. In the meantime, for sake of clarity, I was not referring to pagination number (I hadn’t applied that yet), but to the document-reported page number in the bottom left corner.
Wrong page numbering as displayed in the bottom left corner of OpenOffice Writer
Wrong page numbering as displayed in the bottom left corner of OpenOffice Writer
Wrong page numbering.png (4.97 KiB) Viewed 1299 times
I will reply to all duely once I’ve tried your suggestions.
Apache OpenOffice 4.1.5 / LibreOffice 7.0.0.3 on Windows 10 (x64)
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Front page w. wrong page nbr.; page style changes unprom

Post by RoryOF »

This is another case where a sample file (not a screenshot) would help. The text content can be anonymised if necessary.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply