Aside: the attached patch gives you a _TL_SECTION_ which is nailed to top-level section names only. It's quite nasty: in particular the code in do_paged_render() is too repetitive. But it works, and lets you do things in the header like arranging to populate it only when the top-level section has not changed since the last header laid out (-> the last page): this gives you the behaviour you get in most real books, where the header is silently omitted when new chapters start.
(MobileRead's anaemic attachment system won't let me upload it without calling it .txt, not .diff, but it is still a diff. Ugh. Bring back mailing lists, all is forgiven.)
|