Page 1 of 1

Chapter Fields in Header misbehaving with Headings/Page Brks

PostPosted: Thu Nov 14, 2019 9:09 pm
by stealthygopher
I am trying to layout an RPG book with several chapters. Each chapter has its own image/icon on the outside edge of the header as well as fields to display "Chapter - Subchapter" using Heading levels 1 and 2.

Because I have a unique image for each chapter I have page and header styles for each chapter (and a left and right version of each) which I believe is the only way to prevent having to manually add images to the header of each page. I'm not sure if this matters to the problem below but I thought I would mention it just in case.

My issue is that the Chapter fields aren't grabbing info from the page they apply to. The first page will show Heading 1 properly if it's the first line, but it doesn't seem to find any Heading 2's that are on the same page and so instead it just repeats Heading 1 again. On subsequent pages it grabs the Heading 2 from the page (or pages) previous (in short, whichever subheading would have applied before the first character on the current page) instead of using the first subheading on the current page and, if none are present, then using the most recent.

This is further compounded when I begin a new chapter. I insert a manual page break and start my new styles. The page break seems to be tied to the top of a page instead of the bottom and the fields in my header are populating with the previous chapters information instead of the current almost as if the page break doesn't apply until after the header.

Basically I want the chapter fields to populate with the first appropriate heading (or outline level) that starts on the current page and not the one that would have been in effect on the last character of the page before. Is this possible?

Re: Chapter Fields in Header misbehaving with Headings/Page

PostPosted: Thu Nov 14, 2019 9:14 pm
by Zizi64
Please upload your .odt type sample file here.

Re: Chapter Fields in Header misbehaving with Headings/Page

PostPosted: Thu Nov 14, 2019 9:31 pm
by RoryOF
I think we need to see a small sample file - it should be two chapters of at least two pages each. You can use dummy text and neutral icons if you wish.

Re: Chapter Fields in Header misbehaving with Headings/Page

PostPosted: Thu Nov 14, 2019 10:45 pm
by Bill
I don't think it's possible. From my experience, headers reflect what is at the top of the page, not what starts somewhere in the middle of the page. If a heading or subheading is actually in the text on a page, then it's not necessary to duplicate them in a header on that page. The first page of a chapter usually doesn't even have a header because the chapter name is already on the page. I believe that the fields are working as designed and not "misbehaving".

Re: Chapter Fields in Header misbehaving with Headings/Page

PostPosted: Thu Nov 14, 2019 10:56 pm
by RoryOF
I'm thinking, pending seeing a sample file, that the illustration/icon is confusing the issue; it may be being detected as the first item on the page and confusing the fields.

Also, my own experience is that I do not use a page header on a Chapter page, which has the inline Chapter Header structures; those are sufficient in my view to define a Chapter page. I think I arrived at this structure because of some difficulty with the chapter headers not correctly replicating to the fields in the page header if used.

A way around this might be (needs working out) to put the chapter sub-level headings in 2 pt white at the foot of the preceding page - they won't take much space and won't show when printed.

Re: Chapter Fields in Header misbehaving with Headings/Page

PostPosted: Fri Nov 15, 2019 5:01 pm
by John_Ha
I think this is an AOO bug which is fixed in LibreOffice. Try LO.

The workaround is to cover the incorrect text with a white image or rectangle etc. Add a Frame and place the correct text in the frame. Setting the frame background to white will cover anything behind it. Do not anchor the frame inside the header or it will appear on every page.