Quote:
Originally Posted by sherman
Unfortunately, the toc.ncx has been generated as one line since the latest few versions of 0.5.x  . It's a simple matter of running it through tidy or similar to get a readable form.
|
I use my RegEx capable editor, Textpad, to add newlines ("\n") to the end of tokens that should signify the end of the line. It makes a world of difference when re-editing. IMHO, there's no efficiencies gained by stripping those line endings and making the 'toc.ncx' one long line/text stream.
Quote:
Depending on how the source file and/or calibre is setup, this may not be the best thing to do.
If calibre splits the xhtml stream at TOC items (eg: Chapter headings) then removing anchors will have no negative effects, and indeed speeds up navigation. I realise that this is what happens for the majority of conversions.
|
I agree!
Quote:
However, if calibre ends up splitting the xhtml stream purely by the 300K size limit, then the anchors are necessary for correct navigation.
|
Not so, since any split file doesn't require an anchor to go to the top of that new file i.e where the 300K split took place. You would only effectively need the anchor links when dealing with illustrations or sub-headings which require linking to a place not at the top of a page or beginning of a file.
Quote:
And then of course, there is level 2 and 3 TOC elements, which often have several occurrence in one xhtml split. Again anchors are required for correct navigation.
|
True, and given the frequency that these secondary links may be used, leaving them in should not be a problem.
Quote:
What I'd like to see is calibre detecting a scenario of one TOC element per xhtml split (eg: when there is a page break at every chapter) and omitting the anchors when this is the case.
|