Writer: How to add First and last H1 name to Header?

I’m working on a dictionary-styled book for a class, and I’d like it if the header would automatically list the first and last entry on each page of the work.

If I use H1 fields to start each entry, I can tell the header to insert a CHAPTER NAME, and it displays the FIRST h1 entry in the header. Likewise, if I add CHAPTER NAME to the footer, I get the LAST H1 entry on the page.

Is there any way to get the header to show BOTH the first and last h1 field?

That is … instead of getting “FROG” in the header and “FUSS” in the footer, I’d like to get “FROG - FUSS” in the header.

A little workaround in this post. See the answer from me (at the time of writing, that is not the accepted solution, but it is the one that works :wink: ).

Insert field in the header as you normally would, and position the footer-anchored frame with the same field to look like a continuation of the header content. Note that as you need the header activated, my instruction to drag the frame will most likely unanchor it from footer and anchor it to header, which defeats its purpose. See @ajlittoz’ comment about using the Frame properties dialog to adjust placement.

Hmm… I’m trying that out, and it’s clunky, but it is at least WORKING.
I was really hoping there was some way to pull up a field from the footer, or something like this… I mean, the use case of listing the first and last entry on a page can’t be THAT uncommon, right?

… the use case of listing the first and last entry on a page can’t be THAT uncommon, right?

Quite so. And in LibreOffice (and related software) the only solution I have found is to “pull it up by the anchor”, as it were.

I just realized there is an easier way to do this… instead of mixing the header with a frame from the footer… I can just create a frame in the HEADER and the FOOTER, then set both to position themselves to about .2" from the top of the page.

Now I just need to hide the unused space of the header and footer …

@free-pg, it isn’t “that uncommon” but implementation is quite simple (and IMHO should remain simple for obvious stability reason). Pages are dynamic and do not exist until needed. When a page break occurs, a footer is created using the current environment (i.e. the current state of the Heading n family). The break is inserted. The first paragraph of the page is checked to see if it is a Heading n, eventually updating the state and the header is created.

It is thus inaccurate to say that the header is set using the first Heading n in the page.It uses in fact what is known at the page break + the first paragraph if it is a Heading n.

@free-pg: use other positioning reference than “top of page”. Your frame is anchored to the header paragraph, then position it relative to this paragraph and it will automatically adapt when you change the margin widths in the page style.