When I add a new chapter title on a page, the chapter title in the header does not change until the next page. How do I get it to change on the same page?
It can be done.
As @ajlittoz says, the header reflects current state, or environment, at the top of the page. Footer reflects state at the bottom of the page.
So, you want to use footer info in the header area. A frame anchored in the footer, positioned in header area, can help you with that.
- Enable page footer.
- Insert a frame in the footer.
- Remove frame borders.
- Insert a chapter field in the frame.
- Drag the frame to the top of the page.
The last step is easiest to perform if you view entire page (reduce zoom level) and disable the page header. When you drag a frame and drop it on an area enabled for text, the anchoring will follow. You want the anchoring to remain in the footer. Drag it in one go, from the footer to outside the text area on top of page.
Excellent. I think however it is better to keep header enabled to have boundary clues for correctly positioning the frame exactly where the standard header would be.
As an improvement, give the frame the same size as the header and style content as Header.
Positioning is better controlled through the frame properties, notably to simulate a standard header by giving exact coordinates. I’d even suggest to create a specific frame style so that it is easier to apply the trick on several page styles.
Positioning is better controlled through the frame properties, …
Quite right. This gives better control of placement and also avoids “unanchoring” the frame.
.
… better to keep header enabled to have boundary clues …
Admittedly, visual clues are useful. I see that point. However, there are advantages and disadvantages. As you edit your document you may “click around”, and can easily come across a “drag situation” for the frame. If header is enabled, this could spontaneously re-anchor the frame to the header.
Bottom line, “whatever works for you …”. Try different setups and find out which one you are more comfortable with.
I see your point about “click around”. Then have the header enabled while you tune the frame parameters, mainly the spacing-below distance in the Wrap
tab to have the exact same layout as the standard header, then disable it.
Once you have the correct frame style, you need no longer worry about all that. A simple styling action is enough.
The header of page is computed when the page is allocated, i.e. when there is a need to lay out the first paragraph.
The “environment” which is current in this first paragraph is captured, that is the chapter numbering hierarchy. If the first paragraph is styled Heading n, it contributes to the environment. Any Heading n inserted after the first paragraph is not part of the capture, but will be on next page.
Usually, Heading 1 style is configured with a page break before (note this is not the case by default). Consequently, it will be laid out in first position and its heading can be inserted in the header with an adequate field.
If your Heading 1 chapter change may occur anywhere, there is no solution. There is an ugly workaround: have the chapter heading both in the header and in the footer. The header reflects the environment at top of page and the footer at bottom of page.
If you header references a Heading n with n ≥ 2, the case is even more complicated. The first paragraph environment is still used, but you may have yet no Heading n. As a fallback, Writer use a Heading m with the highest m < n.
To be exhaustive, the first page is special. It uses the first Heading n, whatever n.
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!
In case you need clarification, edit your question (not an answer) or comment the relevant answer.