Page number offset is not saved with document

LO 7.5.2 under Win 10

I write my document using individual files as chapters. I finally figured out how to force the autonumbering to behave. But page numbering has me buffaloed.

I have a page number field in the footer. I can use edit field to create an offset to the page number, so chapter 2 can start as page 7 and chapter 3 can start on page 11.

Except the offsets are not saved with the document. So when I save and then reload the document, now chapter two start s on page 4 ( I don’t know why that number ) and chapter 3 starts on page 7.

I would like to tell a chapter that ‘you start on page x’, have it autonumber the pages thereafter, and not change, even if I edit the chapter.

Any help?

You guys are a great resource.

-----Paul-----

Please upload ODF type sample files here.

Help says explicitly not to use offset for page numbering. It doesn’t work the way you think it does and you won’t see page numbers that you expect to.

At the beginning of your document click Insert - More Breaks - Manual Break and in the dialogue box select a page style, tick the box Change page number and enter a starting page number.

It might be better to use a Master document, but only if you have been applying styles rigorously.

Page offsets are indeed saved in the document but you don’t use them according to their specification. Contrary to what you think an offset doesn’t change the page number. It causes a reference to another page and retrieves the number of this page. But if the page does not exist, i.e. you’re close to the ends of the document, the number doesn’t exist too and the offset will return “void”.


To clarify, the standard 0-offset references current+0 page and the field returns the current page number. An offset of -1 references the previous page, but if you’re at the first page there is no preceding page and you get “void”.

However this does not explain why the displayed page numbers change from one session to the other. Do you save your documents as .odt or .doc(x)? So, attach a sample file as requested by @Zizi64.

The solution to your problem is in fact to insert a special page break with Insert>More Breaks>Manual Break which allows you to specifiy the starting page number after the break. Alternatively (and better) since your chapter heading is styled Heading 1 (isn’t it?), incorporate this systematic page break in Text Flow properties of this style.

1 Like

A. I’m an old guy who still considers WordPerfect 5.1 for DOS the ultimate wordprocessor. And I have never adapted to (or adopted) styles. Which causes lots of problems for me in this universe of styles in control.

B. Thanks for the answer. The Insert >More Breaks >Manual Break does indeed work. Except that it creates a blank page at the beginning of each chapter. I can deal with that when printing or making PDF but is there a more sophisticated way around it?

C. I have applied the Heading 1 style to my chapter heading. I changed the font size, which worked. And I found the Text Flow heading with the page number change. Except it doesn’t seem to actually change the page number. I changed the page to 2 but the page number remains 6. Obviously I am missing something but I have no idea what.

Thanks for your help.

-----Paul-----

Then you have some data before your heading, perhaps empty paragraphs to vertically space said heading?
You can tell by enabling View>Formatting Marks which will “decorate” your document with various non printing marks. This is part of what WP shows as formatting code.

Writer is designed so that your document contains only semantically significant text. An empty “spacing” paragraph is not significant text; it is a poor substitute for a formatting directive. Writer has a complex formatting model compared with early predecessors: formatting directives are ancillary attributes of text properties called styles. A style groups attributes relative to one “significance”. Thus you don’t style for formatting. You style for significance and formatting is only a consequence of this significance. This requires a radical change of mind but once you have switched, formatting and layout become a treat.

Back to your blank page issue. make sure there is absolutely no text between the start of your chapter file and the heading. If not delete these empty paragraphs. If you don’t like styles and don’t know yet how to master them, do the following:

  1. put the cursor at the very beginning of your heading
  2. Format>Paragraph, Text Flow tab
  3. tick Breaks Insert
  4. tick Page Number and desired page number
  5. OK

In case your empty paragraphs were there to shift your heading downwards, this is how to do it without creating a blank page (these are additional steps to those above):

  1. put the cursor in your heading
  2. Format>Paragraph, Indents & Spacing tab
  3. in Spacing adjust Above paragraph distance
  4. OK

For your item C. I can’t guess without seeing a sample file from yours. So, please, attach one to a comment.

I really do appreciate your efforts to help this reactionary old reprobate get his files formattted. Who knows, I might even learn something in the process.

I always run with the formatting marks turned on. It helps with my keeping track of what I have done. It’s at least a little piece of ‘reveal codes’. And I couldn’t see any empty formatting above my heading. (Well, there is an empty header (as in header/footer). But your instructions 1, 2, 3, 4 seem to have worked just fine.

The attached file is the one where I tried to set the Heading 1 style to do the same thing, modify styles seems to show that it took my command to set it to page 2, but it still shows page 6.

BTW, I am not unalterably opposed to working with styles. I can (vaguely) see that creating a new document and having a plan of how to use styles could work out well. But more often than not, I am working with old documents, often text cut and paste from PDFs or scanned OCR. Trying to impose styles on a preexisting document seems beyond me.

Once again, thanks again.

-----Paul-----

010-SECTION ONE - ORGANIZATION_EBC_Personnel_Handbook 20230506.odt (31.2 KB)

You have added direct formatting to your Heading 1 paragraph as suggested in my comment above. You did it correctly except you explicitly requested page number 6, not 2. You change the page number there and you’ll be fine.

I take the opportunity of your last question to draw your attention on a common newbie mistake on headings, here your Heading 1 you probably restyled from LO-normal as are your level-2 headings.

As a consequence, Heading 1 kept the list numbering you manually applied to your headings. Now, Heading 1 has two numberings: one from Tools>Chapter Numbering which is not yet activated but present nevertheless and one from your manual formatting. This will cause a conflict sooner or later. So, remove your manual numbering.

While you’re at it, remove also the manual numbering from your level-2 headings and style them Heading 2. Once this is done, go to Tools>Chapter Numbering and customise to your liking.

List numbering from the toolbar is a courtesy one-size-fits-all feature but when you use it for lists and chapters, you end up in an unmanageable situation because you need in fact two independent sequences, which is not possible without considerable pain and erroneous result with the implicit toolbar list numbering.

And last, the “standard” style for discourse (without any other specific semantic significance) is Text Body. This is simpler than creating a custom LO-normal. You just customise an existing built-in style.

I remember WordPerfect 5.1 for DOS. At the time, some people would say that the WordPerfect Corporation marketing was better than their word processor. I admit that it had one feature that defeats LibreOffice and probably all modern word processor software: the macro language. It was simple, and any moderately smart person could develop simple macros to automate some boring office chores. Like, if you write a manuscript of a book to be published, you’d tag the entire text; headings would start with codes like [h1], plain text would get [t], all because the formatting capabilities of WP were almost nonexistent, and for a reason, it was intended for office use, and there weren’t any printers at that time that allows decent formatting. But publishers could do better than that. Rather boring to enter those codes, so you’d make macros for that and bind them to keystrokes. Try to do that in LibreOffice. :sob:

Styles are a tool to help the user keep their formatting consistent, and to speed up formatting enormously. In your uploaded document, you probably had to select each heading and change the font. If you use Heading 2 for the 1.1, 1.2 etc. headings, all you’d have to do is change the font in the Heading 2 paragraph style, then with the cursor in each heading, press Ctrl+2 to apply that style, and they’re all correctly and consistently formatted. If you later want to change the size, all you have to do is change the size in the paragraph style and it will be automatically applied for all headings.
See edited file below.

SECTION ONE ORGANIZATION.odt (30,4 KB)

1 Like

Just to emphasize what others have already explained:

What you apply to your text directly is “more important” (takes precedence) over the rules that come from styles. So first, at some point, you modified the paragraph’s direct properties, and defined the page number. Later, you changed the definition of the style that the paragraph uses; and while that is the correct approach, by itself it doesn’t undo that previous direct formatting.

Aaaand, I’m back. And truly flabbergasted. The file I sent you was to demonstrate that I had made changes to Header 1 but that the page number did not change. And yet, you are correct, it shows direct formatting and page 6 assigned. And I have several copies of the file (I usually work in .docx) and they all are the same. Gremlins?

Anyhow, I think I have reached the unmanageable situation you describe in a different section. I have 7 sections and 4 appendices and section 4 is the only one I have found this trouble.

I think my problem has to do with something called List Styles. And while they show up in inspector, I have not been able to modify them. Well, not quite true. There is an editing box but not the ability to tell it ‘Use this number!’

The problem shows up on page 27. Autonumbering has been proceeding nicely. We get to 4.7.4.3.1. And the next paragraph is a different subject and should be 4.8. But it comes up 4.1. I go Format>Paragraph>Outline and List tab>Untick ‘Restart Numbering at this paragraph’. It happily becomes 4.8, as does its first sub number (4.8.1). However I have to do this for each paragraph following. Luckily, I have a macro. Anyhow, I get thru the document, all is well. I save it. I reload it. Same problem in same place.

I’d hate to have to save it all out to a pure text file and start over but begin to feel that would be the best bet.

-----Paul-----

I obviously have something overriding something else but I can’t find it. AFAICT, I’m not using any Heading styles or anything other than LO-normal.
040-SECTION FOUR - PERSONNEL STATUS_EBC_Personnel_Handbook 20230505.odt (80.0 KB)

Thanks. That is a useful explanation of the priorities. But my problem is I can’t find what is doing the override. But I am learning a good bit here.

-----Paul-----

I appreciate the illustration but … things should be even simpler if the font is never changed. I use a single font, bolt, italic, and occasionally change the font size. Nothing fancier than that.

Just to illustrate my redneckness, I would work in Comic Sans if I could get away with it. Amazing how much hate that brings. So I generally stick to Arial or Times New Roman.

Oh, and I just got a popup saying I need to learn to combine my replys. I will try to do so in the future.
-----Paul-----

That may work for you, but not for many other people. And I was just giving examples. For what you are doing, WordPerfect 4 would suffice, and probably even older versions, but I don’t know about those.

A Correcting Selectric might work. :grinning:

Anybody know how to retrieve the popup that prompted me to combine replies? It made sense but I don’t remember the details.

Anyhow, a simpler (I think) question about my paragraph numbering problems. Under Format>Paragraph both the ‘Text Flow’ and the ‘Outline and List’ tabs have boxes to set a page number. Does one have priority over the other? Or, is there a good reason to use one over the other?

And, a what point should I start a new topic? I fear I am drifting.

New problem, new topic. Seems like you have a new problem :slight_smile:

Aye, aye.

-----Paul-----

I never did find the source of the problem, but I did finally overcome it. I split the document into two docs, one before what should have been 4.8 (first half) and one containing what should be 4.8 and thereafter (second half).

Then, using the first half I went to the end, hit enter and it offered up 4.7.x and then I did a shift Tab and it offered 4.8. I went to second half, did a pure text copy of the paragraph heading I wanted to become 4.8, pasted and it worked.

This sort of thing worked for a while and then it stopped. It kept dropping my paste back into 4.1.x. But if I typed in by hand, it worked. So I found an autohotkey script which took clipboard and typed it in. That worked in all instances. Later, because I used the wrong keystroke, I found regular paste was working again.

Anyhow, using this clumsy workaround, I finally have a unified document which numbers correctly. And that is what I wanted.

I do appreciate the help I was offered and perhaps some day I will understand most of it. But I really do miss ‘Reveal Codes’.

-----Paul-----

If you miss it enough to pay for it.