I seem to be running into a bug with Libreoffice intermittently displaying the wrong Chapter Title field in the header. I've reported this as bug 81012 in bugzilla:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=81012
In the meantime, I wanted to ask if people had any suggestions for workarounds. Here's the problem:
I have a Page Style that uses the Chapter Title in the right page header. In this document, I've created a section to contain each chapter, with endnotes appearing at the end of the section. This works fine for the most part, up through the first page of endnotes in a chapter. After that though, the title of the *first* chapter is displayed instead of the title of the *current* chapter (see the rh.odt and rh.pdf files in the bug report to see exactly what I'm saying).
This poses a problem for me since my actual document is a 300+ page book with lots of chapters, and some chapters have several pages of endnotes that end up being wrongly formatted.
I'm seeing this bug in 4.2.5.2, and it appears that the bug goes at least as far back as 3.3.0.4. (That was the earliest version that I was able to download and test from the download.documentfoundation.org site).
Current workarounds I'm thinking about:
1) Edit the PDF file directly to fix the chapter titles before printing the book (Somewhat cumbersome and perhaps time-consuming to figure out how to do properly)
2) Create several copies of the .odt file, hardcoding the Chapter Title in the header (the first file would be hardcoded to the first chapter, the second file hardcoded to the second chapter and so on), use --headless and --convert-to pdf to convert each of those files to PDF, and then cut+paste the appropriate chapters from each of those PDF files into a final PDF file that has all of the headers correct. (Tedious but probably workable, assuming that all of the automated tools work the way they should).
Any other thoughts/ideas would be welcome.
Thanks,
-Kartik