View Single Post
Old 08-07-2016, 07:48 AM   #7
NullNix
Guru
NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.
 
Posts: 929
Karma: 15576314
Join Date: Jan 2013
Location: Ely, Cambridgeshire, UK
Device: Kindle Oasis 3, Kindle Oasis 1
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.)
Attached Files
File Type: txt tl_section.txt (4.1 KB, 201 views)
NullNix is offline   Reply With Quote