Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-11-2009, 05:02 PM   #1
dracodoc
Connoisseur
dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.
 
Posts: 83
Karma: 322
Join Date: Mar 2009
Device: Kindle DXG, Sony T1
epub problem: weird link and page locations

I was trying to convert this book into epub:
Structure And Interpretation Of Computer Programs

which is a free available text.
I have a chm decompressed folder, which include chapter htmls, images, table of content html. I draged the table of content html to calibre, then convert it to epub.

The problems are:
1. I can jump between links in calibre epub viewer, but sony 505 will jump to random location by link.
2. the chapters are arranged in random order. I have following htmls:
content\book-z-h-4.xhtml until book-z-h-9.xhtml
content\book-Z-H-10.xhtml until book-Z-H-38.xhtml

but they are located in random order in book, so chapter 1 in page 410, chapter 1.2 in page 150 etc.

I found this in metadata.opf

</metadata>
<manifest>
<item id="id1" href="content/calibre_title_page.html" media-type="application/xhtml+xml"/>
<item id="id2" href="content/book-z-h-4.xhtml" media-type="application/xhtml+xml"/>
<item id="id3" href="content/book-Z-H-5.xhtml" media-type="application/xhtml+xml"/>
<item id="id4" href="content/book-Z-H-4.xhtml" media-type="application/xhtml+xml"/>
<item id="id5" href="content/book-Z-H-6.xhtml" media-type="application/xhtml+xml"/>
<item id="id6" href="content/book-Z-H-29.xhtml" media-type="application/xhtml+xml"/>
<item id="id7" href="content/book-Z-H-22.xhtml" media-type="application/xhtml+xml"/>
<item id="id8" href="content/book-Z-H-15.xhtml" media-type="application/xhtml+xml"/>
<item id="id9" href="content/book-Z-H-14.xhtml" media-type="application/xhtml+xml"/>
<item id="id10" href="content/book-Z-H-10.xhtml" media-type="application/xhtml+xml"/>
<item id="id11" href="content/book-Z-H-12.xhtml" media-type="application/xhtml+xml"/>
<item id="id12" href="content/book-Z-H-11.xhtml" media-type="application/xhtml+xml"/>
<item id="id13" href="content/book-Z-H-24.xhtml" media-type="application/xhtml+xml"/>
<item id="id14" href="content/book-Z-H-18.xhtml" media-type="application/xhtml+xml"/>
<item id="id15" href="content/book-Z-H-17.xhtml" media-type="application/xhtml+xml"/>
<item id="id16" href="content/book-Z-H-16.xhtml" media-type="application/xhtml+xml"/>
<item id="id17" href="content/book-Z-H-20.xhtml" media-type="application/xhtml+xml"/>
<item id="id18" href="content/book-Z-H-21.xhtml" media-type="application/xhtml+xml"/>
<item id="id19" href="content/book-Z-H-34.xhtml" media-type="application/xhtml+xml"/>
<item id="id20" href="content/book-Z-H-31.xhtml" media-type="application/xhtml+xml"/>
<item id="id21" href="content/book-Z-H-35.xhtml" media-type="application/xhtml+xml"/>
<item id="id22" href="content/book-Z-H-26.xhtml" media-type="application/xhtml+xml"/>
<item id="id23" href="content/book-Z-H-32.xhtml" media-type="application/xhtml+xml"/>
<item id="id24" href="content/book-Z-H-28.xhtml" media-type="application/xhtml+xml"/>
<item id="id25" href="content/book-Z-H-27.xhtml" media-type="application/xhtml+xml"/>
<item id="id26" href="content/book-Z-H-33.xhtml" media-type="application/xhtml+xml"/>
<item id="id27" href="content/book-Z-H-23.xhtml" media-type="application/xhtml+xml"/>
<item id="id28" href="content/book-Z-H-7.xhtml" media-type="application/xhtml+xml"/>
<item id="id29" href="content/book-Z-H-8.xhtml" media-type="application/xhtml+xml"/>
<item id="id30" href="content/book-Z-H-9.xhtml" media-type="application/xhtml+xml"/>
<item id="id31" href="content/book-Z-H-13.xhtml" media-type="application/xhtml+xml"/>
<item id="id32" href="content/book-Z-H-19.xhtml" media-type="application/xhtml+xml"/>
<item id="id33" href="content/book-Z-H-25.xhtml" media-type="application/xhtml+xml"/>
<item id="id34" href="content/book-Z-H-30.xhtml" media-type="application/xhtml+xml"/>
<item id="id35" href="content/book-Z-H-36.xhtml" media-type="application/xhtml+xml"/>
<item id="id36" href="content/book-Z-H-37.xhtml" media-type="application/xhtml+xml"/>
<item id="id37" href="content/book-Z-H-38.xhtml" media-type="application/xhtml+xml"/>

why would this happen?
dracodoc is offline   Reply With Quote
Old 06-11-2009, 08:26 PM   #2
dracodoc
Connoisseur
dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.
 
Posts: 83
Karma: 322
Join Date: Mar 2009
Device: Kindle DXG, Sony T1
I may found the reason why the order of chapter was messed up, but it is still weird.
It may related to the option "preserve tag structure when splitting", or may because I removed the navigation bar in the beginning and end of every chapter html.

Last edited by dracodoc; 06-11-2009 at 08:36 PM.
dracodoc is offline   Reply With Quote
Advert
Old 06-11-2009, 08:35 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
make sure that a page break is not happening after the nav bar. Adjust the chapter detection and page breaking options for your HTML
kovidgoyal is online now   Reply With Quote
Old 06-12-2009, 10:36 AM   #4
dracodoc
Connoisseur
dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.
 
Posts: 83
Karma: 322
Join Date: Mar 2009
Device: Kindle DXG, Sony T1
There is no page break after the nav bar, and I can remove the nav bar by grep.
I managed to get a metadata.opf in order once, but that was the one in folder of ebook before calibre begin to convert epub. I think it was changed in converting.
I tried disable and enable "preserve tag structure", "do not split on page break", not working.
As for chapter heading, I don't know how to tweak it, the chapters are detected, the auto generated table of contents was right, how can the chapter detection change chapter order?
dracodoc is offline   Reply With Quote
Old 06-12-2009, 10:45 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you specify an OPF file as input, calibre will use the order specified in the <spine> element of the OPF file. If you specify an html file as input, caclibre will use the "depth first" order of link traversal.
kovidgoyal is online now   Reply With Quote
Advert
Old 06-13-2009, 11:03 AM   #6
dracodoc
Connoisseur
dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.
 
Posts: 83
Karma: 322
Join Date: Mar 2009
Device: Kindle DXG, Sony T1
OK. I manually edited the opf file generated by calibre, to sort the items in <spine>. Then I got a epub file with correct chapter order.

I don't know if this problem is special to that ebook, if it also happens in other case, I think a "sort chapter" feature will be helpful. So that user can sort and drag the source files before converting the epub file.
dracodoc is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Locations? Whatever happened to page numbers? DeusExMe Amazon Kindle 12 07-17-2013 10:41 PM
How to go to a page on Kindle??? Locations are annoying. pashlit Amazon Kindle 86 12-14-2011 01:25 PM
Problem with html->epub: reader can't page through file horseflesh Calibre 5 10-20-2009 12:22 AM
Stanza Link problem and solution (creating own epub files) gescom Apple Devices 2 05-23-2009 04:53 PM


All times are GMT -4. The time now is 12:21 PM.


MobileRead.com is a privately owned, operated and funded community.