Thread: ToC renumbering
View Single Post
Old 01-23-2012, 01:11 PM   #10
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
I have a working test version of the tox.ncx playOrder renumbering - right click on the toc.ncx file and select Refresh TOC PlayOrder and the toc.ncx navMap gets re-written exactly the same except the playOrder values start at 1 and increment from there. So you can add something in the middle and it'll correct the numbers.

But I do have some questions.

As also mentioned in https://www.mobileread.com/forums/showthread.php?t=75984 I found that the NCX file can also have 2 other types of navigation lists besides the navPoint - navList and pageList. The current Generate TOC From Headings functionality in Sigil does not do anything with navList or pageList, so the renumbering also ignores/deletes these types of lists.

However, I'm wondering if anyone uses navList or pageList? If it is used and it is in a toc.ncx that you renumber, then the navList/pageList entries will be removed. If it is used, possibly/likely to be used, then I can extend the code to rewrite those as well - since they also have playOrder numbers. As far as I can see there is only one set of playOrder numbers used by each section, so if there is some specific interlaced ordering of the elements that was manually created in the file then that would be lost and all navPoints would show up before the navList and the pageList items in the playOrder.
meme is offline   Reply With Quote