View Single Post
Old 04-10-2009, 11:54 PM   #7
HenryP
Enthusiast
HenryP began at the beginning.
 
HenryP's Avatar
 
Posts: 43
Karma: 24
Join Date: Feb 2009
Location: Australia
Device: Sony 505
Hello,
Before opening a ticket, I figure it might be useful to add this observation just in case someone out there can point out that there's no bug in Calibre but merely ignorance on the part of the (always grateful) user.

A couple of weeks ago someone pointed out to me that the .lrf file I'd generated from Calibre had included the endnote references in the Table of Contents list.

The .mobi file generated an accurate Table of Contents, and only a table of contents; i.e., it was exactly what the doctor ordered.

Unable to solve the lrf problem, I decided to wait for the next Calibre upgrade and see what that would bring.

I upgraded to 0.5.6 and generated the .lrf file again. Same problem. So I generated a .mobi in order to compare the outcome with a view to locating the offending code.

The unexpected result was that the .mobi file now suffered from the same problem that had previously pertained only to the .lrf; i.e., the TOC now included the endnote numbers.

So I played around with the regular expression syntax, moving between 'Heading' 'Heading 1', 'Heading 2', and so on. That didn't help.

As far as I know, the only code I have access to is the input file - .odt or .html in my case - and an examination of that code leads me to conclude that Calibre is inadvertently detecting other than TOC entries to generate the TOC.

Try it for yourself for an input file containing endnotes: limit the regular expression for TOC detection to the narrowest range, such as 'H[1-2]' or 'Heading', and so on. That 's what I've been doing and the final TOC includes the endnote reference numbers as if they were chapter headings - even though they do not have H1 or H2 signifiers.

Were it the case that .mobi files could be generated in good working order in previous versions of Calibre I'd not comment, here. However, since something which wasn't broke now seems to be then I figure it's worth drawing attention to with the example provided.

I'm sold on Calibre but I think something's awry in the latest version, something that was awry for .lrf but not .mobi detection in a previous version.

And, to reiterate, I'm aware that my two penneth worth, here, may be nothing but another case of ignorance masquerading as analysis.

henry
HenryP is offline   Reply With Quote