Quote:
Originally Posted by kmashlea
if it is not found, how come in the intermediate html file that gets created it shows id="calibre_toc_" style="page-break-before:always" before each chapter?
|
It's not an issue with finding the chapters during the conversion process. It's an issue of transforming the XHTML with an external TOC into the FB2 format. The intermediate can mark explicitly what a chapter is but it does not have to. It can just point to an arbitrary element in the content. Also, the TOC text is external to the document and does not have to relate to the content in the book.
Look at the examples I posted previously. In example 2 the chapter is marked after the chapter title. In 3 the chapter has no title in the document.
FB2 requires sections to be in a specific format for the application to generate a TOC:
Code:
<section>
<title>
<p>TITLE TEXT</p>
</title>
<p>CONTENT</p>
...
</section>
Again, there is no reliable way to determine what is supposed to be in the title and what is supposed to be in the content. In example 2 the title will always be added to the end of the previous chapter.
In example 3, well what do we use as the title? Do we use the first sentence? The first X characters of the sentence? If there is no chapter title in the book's content then breaking it up like this will not look correct.
Quote:
Originally Posted by kmashlea
If I manually search the fb2 output looking for the 'CHAPTER' e.g. "id="calibre_link" and insert the section / title as I stated, it works perfectly, showing page breaks and sections and looks great.
|
In some cases this works fine. But not all source material will end up looking like this. Again, look at the examples of possible chapter markings that are possible going into the FB2 output.