View Single Post
Old 04-28-2015, 02:32 AM   #29
darryl
Wizard
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
darryl's Avatar
 
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
Thanks Kovid. A comprehensive solution very quickly. I probably should have brought it to your attention in a private bug report.

It seems the mystery is solved. The TOC is produced from lines like the following. I don't know exactly what the aid= tags do, though they seem to be sequentially numbered as used. But then in the second example, chapter 1, the use of 1G following 1F is strange. I had thought the numbers were hexadecimal.

<h1 style="margin:0.00% 0.00%; page-break-before:always; line-height:150%; " aid="12"><span style=" font-size:1.2rem; font-weight:bold" aid="13">Prologue</span></h1>

<h1 style="margin:0.00% 0.00%; page-break-before:always; line-height:150%; " aid="1G"><span style=" font-size:1.2rem; font-weight:bold" aid="1H">Chapter 1</span></h1>

In any case, it seems to be fixed. Calibre now creates a working toc.ncx and links work in calibre viewer. As eschwartz says, KindleUnpack now needs corresponding alterations.

Thanks to everyone who took an interest.
darryl is offline   Reply With Quote