Remove footer on the last page of a chapter

It is easy to remove the header of the first page of a chapter with a page break and page styles. But I can’t see how to remove the footer of the last page, although it is quite common too.

I could use a page break before the last page, and apply a special style, but that’s an ugly hack: it will probably split a paragraph in two (although I can justify the last line of the first and remove indentation of the second to make them look like one paragraph again) and if I ever modify anything before the last page, the page break will happen in the middle of nowhere. It’s also logically unsatisfying for such a common requirement.

The other solution would be to use conditional text with a variable set to TRUE on the last page and FALSE everywhere else, e.g.:

IF last_page THEN [nothing] ELSE [text of the footer]

The problem here is that I can’t see how to use a variable or field in text of the footer, and I want it to show the page number.

So I’m stuck. Anybody?

I faced such a requirement (footer suppression on last page of chapter) and could not implement it.

I filed tdf#128041 bug report in 2019. It is still pending.

There is no automatic solution. I strongly advocate against manual hacks, such as adding artificial page breaks to switch to another page style, because you become extremely sensitive to edits potentially changing page boundaries.

1 Like

That’s what I feared…
Another hack, as ugly as the manual break but a little less fragile, is to insert a text frame (in the main text) with a white background above the footer.

This hack is also mentioned in the bug report.