writer,table of contents, how change pagenumber offsets

Sorry to bother you. I have given an overlong explanaton of the problem
to guide you properly on what the problem is. Hope it is not too long.

In regard to Writer
Any way to change page offsets in the table of contents?
At this point i just make my table of contents manually to save the hassle.

(I) My first thought was to have
4 page styles and 2 chapterheadings styles

(1) FrontmatterFirstpages and
(2)FrontmatterSubsequentPages
with numbering like i,ii,iii, for the pages
and
(3) a FrontMatterHeading based on Heading 1,
so I can have the heading insert in the right style of page
the FrontMatterFirstPage with the page numbering
and have that page numbering correctly starting at page i and
(importantly) not have
the Tools,ChapterNumbering give autochapter numbers to the Preface,
since i want the heading to read Preface not Chapter 1 Preface

(4) A OrdinaryChapterFirstPage and
(5)OrdinaryChapterSubsequenPages
with numbering like 1,2,3 for pages
and a
(6)custom ChapterHeader based on Heading 1 to start off on the proper type of page
OrdinaryChapterFirstPage
and be able to start pagenumbering at page 1
(even if there are 13 frontmatter pages before it, i,ii,iii, etc )
and also have
the tools, chapter numbering autonumber and all subssequent chapters properly
as chapter 1, chapter 2, etc.

Breakdown.
This method won’t work.
Each one of the Chapter 1, Chapter 2, Chapter 3 etc all start on page 1.

Back to the drawing board.

My second thought was
(II)
Forget about having the ChapterHeader insert page number 1 when it inserts the chapter first page,
since we don’t want all chapters starting on page 1
Undo all that

Instead I just go to the first page of the first chapter
and then manually insert in the footer, the field,otherfield, page, page number
and tell it to offset by number of frontmatter pages (-14 if that many frontmatter pages)

then it properly numbers the pages in all subsequent chapters in the correct order
so chapter 1 is page 1, and automatically chapter 2 is page 14 or whatever etc.

Breakdown
This method won’t work.
The automatic table of contents will not put in the proper offset.
It will not put in page 1 for chapter 1 but rather page 15 or whatever the total
is when including front matter pages)

Back to the drawing board

My third thought was
(III)
instead of putting offsets on page numbers in the footers
try
6 page styles and 6 page headings.
to the previous 4 I added
another page style and another heading style
I made
(1)a separate FirstChapterFirstPage and a
(2)a FirstChapterHeading based on Heading 1
This FirstChapteHeading would insert the firstchapterfirstpage
and insert the starting pagenumber of 1
But none of the other chapterheadings, used for all other later chapters
would ever insert page numbers when they added the chapterfirstpage.
The other chapters would then have page numbers that follow along in the proper order
continuing what started with chapte 1
they would then have the right page numbers
not all starting at page 1 but at the proper page
so chapter 1 would be page 1 but chapter 2 would be page 14 or whatever

Breakdown
This method won’t work.

The tools, automatic chapter numbering won’t recognize this new heading
FirstChapterHeading as a chapter the way it does the heading ChapteHeading of all other chapters
The first chapter has no autonumber.
And the second chapter is incorrectly given the autoheading Chapter 1
the third chapter is called automatically Chapter 2
and so on.

Looks like you can’t have your cake and eat it too. You can’t have both
proper auto page numbers and proper auto chapter numbers.

I have no more drawing boards.

So either i do the Table of Contents manually or Chapter numbers manually
or
go back to MS Word which can handle such easy stuff

If you have bothered to patiently read all of this then maybe you have new suggestions.

A remark first: page offset is not meant to make “linear arithmetics” on page number. It is related to forward/backward references like “see next page” when you’re requesting page+1 (offset = +1). A page number with offset returns either the offset page number if the page exists or blank if it doesn’t exist.

A field inserting page+offset does not change the page number but retrieves the number for the designated page. The page where it is inserted keeps its number. The TOC engine captures the current page number (without any offset because a field used in a footer/header won’t change any property of the page). What you see is clearly what is expected.

Your (II) approach is very close to the solution. Remove the page offset in the page number field. Your problem is to restart page number to 1 only for the first chapter. This must not be done with ChapterHeader paragraph style, otherwise all your chapters will restart at 1.

Then Insert>Manual Break>More Breaks before the first chapter. You will choose the proper page style and page restart.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

yes i had tried that, forgot to include it, perhaps i should have included that way as approach 4 that didn’t work, breakdown 4
the problem with that approach of manually inserting page breaks is it disturbs the header for all other chapters
then either
(1) have to remove chapterheader from autoinserting pagebreak and do what you suggest
manually for all chapters, then if i have to manually insertpage breaks for each chapter i might as well just manually make a tableofcontents as i do
or
(2) change the header style for the first chapter (one of my approaches) to be different than for
the rest of the chapters, but then the auto chapter numbering won’t apply to it, as i indicated

still lookin

forgot to thank you for your interest, even if the suggestion is not workable

also forgot to mention another way that doesn’t work,
putting the manual page break and then also letting the chapterheader insert its own page break
but then the chapter first page has an empty page in front of it called page1, the chapter will then be page 3 ;
another thing i sometimes do is let MS word do a table of contents then copy it over and paste
into libreoffice

another approach i do sometimes
is like approach 3 mentioned above, having special pages and,chapterheaders
for frontmatter, firstchapter, allotherchapters, with the headers autoinserting pages at starting numbers
but then just TurnOff the autochapternumbering
and manually add chapter numbers

new magic workaround

your suggestion about inserting manual breaks got me experimenting again

with an addition, or rather deletion, it seems to work magically

the addition is that
after you insert the page break
you have to delete the newly inserted page break

i tried with just one paragraph style for all chaptertitles
called it chaptertitleheading
set the style so it inserts the special first page of a chapter,
but didn’t set any page number inserting

all chapters have this same heading with chaptertitles

then go to first chapter
go into its heading, the chaptertitle paragraph style

then use the insert, more breaks, manual breaks,
pagebreak
choose the same page style that the chaptrtitle heading will insert
set the page number to 1

when it inserts the new blank page in front of the chapter
go up into the new blank page and backspace delete it
attention, don’t delete forward with the delete key
you must delete with backspace

it will delete the newly inserted pagebreak
but yet magically keep the new page number on the
chapter first page

table of contents accepts this magic number, as do the footers
and with all chaptertitle headers the same style, the automatic chapter numbering is ok

strange but true
the magic new page number is magically saved somewhere
even though the inserted page it belongs with has been backspace deleted

extra condition, there must be at least one other page in front of the new page inserted,
otherwise backspace delete has nothing to go to when it backspace deletes

Your complex procedure makes me think that you don’t use paragraph styles as you should do in Writer. Perhaps you are too influenced by Word idiosyncrasies. Also, you may have strays empty paragraphs if your styling is not optimised. Try to work with View>Formatting Marks to always have clues about what is really present in the document.