View Single Post
Old 09-13-2011, 07:14 PM   #6
LaoTseu
Member
LaoTseu began at the beginning.
 
Posts: 20
Karma: 12
Join Date: Sep 2011
Device: Kindke
I did some tests using title="start" and it works but not always.

First, a working exemple:

The Epub guide:
Code:
<guide>
  <reference href="Text/cover.xhtml" title="Cover" type="cover" />
  <reference href="Text/toc.html" title="Table Of Contents" type="toc" />
  <reference href="Text/title_page.html" title="Title Page" type="title-page" />
  <reference href="Text/dedication.xhtml" title="Dedication" type="dedication" />
  <reference href="Text/quote.xhtml" title="Epigraph" type="epigraph" />
  <reference href="Text/one.html" title="start" type="text" />
</guide>
resulting MOBI OPF guide section
Code:
<guide>
<reference type="text" href="Free Fall - Laura Anne Gilman.html#filepos7332" />
<reference type="title-page" title="Title Page" href="Free Fall - Laura Anne Gilman.html#filepos5059" />
<reference type="toc" title="Table Of Contents" href="Free Fall - Laura Anne Gilman.html#filepos690061" />
<reference type="text" title="start" href="Free Fall - Laura Anne Gilman.html#filepos7332" />
</guide>
</package>
The resulting type="text is there twice and both of them pointing to the same filepos7332. The filepos7332 in question exists in the html file and it located where it should.

Only the first reference is needed. When I remove the second reference type="text" title="start" and repack the mobi, it sill opens where it should.

Second example, I decide that the reader should start reading at the dedication. (This pass all the Epub validation tests so I assume it's valid Epub.)

The Epub guide:
Code:
<guide>
  <reference href="Text/cover.xhtml" title="Cover" type="cover" />
  <reference href="Text/toc.html" title="Table Of Contents" type="toc" />
  <reference href="Text/title_page.html" title="Title Page" type="title-page" />
  <reference href="Text/dedication.xhtml" title="Dedication" type="dedication" />
  <reference href="Text/quote.xhtml" title="Epigraph" type="epigraph" />
  <reference href="Text/dedication.xhtml" title="start" type="text" />
</guide>
resulting Mobi OPF guide section:
Code:
<guide>
<reference type="text" href="Free Fall - Laura Anne Gilman.html#filepos178" />
<reference type="title-page" title="Title Page" href="Free Fall - Laura Anne Gilman.html#filepos5001" />
<reference type="toc" title="Table Of Contents" href="Free Fall - Laura Anne Gilman.html#filepos690003" />
</guide>
This time there is only one reference type="text" and the filepos178 doesn't exist anywhere in the .html file.

I'm not sure if it's easy to fix or not but there is a problem there although the work around is easy.

Also, since the Epub standard clearly states that type="text" always mark the 'First "real" page of content (e.g. "Chapter 1")', I don't think that calibre should bother checking the title at all and just use the first type="text".

That should probably be low on your priority because once we know about it, it's not a big thing to add the title.

And while I'm at it, I always want to thank you for the great job you do on calibre.

Best
LaoTseu is offline   Reply With Quote