Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-14-2013, 08:41 PM   #1
Tomkun
Junior Member
Tomkun began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: A500, iPhone
Table of Contents, nesting and playorder.

Hello there,

First post and I'm afraid it's a beg for help. I am having issues with the TOC editor in Calibre and would like to know where the fault lies; with me, with calibre or with my reader.

First, some background information. I am using Calibre version 0.9.30 on Windows Vista (both 64 bit versions). My reader is an Acer Iconia A500 running FBReader.

Now the problem. I am trying to create a nested table of contents, or rather tweak a nested table of contents. When I first convert the HTML to ePub, the TOC works fine in the reader, nesting and all. It just requires a quick tidy up.

However, when I use calibre's TOC editor, it seems that the playorder is getting messed up, causing it to display strangely in FBreader.

For example, this is how it is straight after conversion and it works:

BOOK 1 (playorder="1")
---->Chapter 1 (playorder="2")
---->Chapter 2 (playorder="3")
---->Chapter 3 (playorder="4")
BOOK 2 (playorder="5")
---->Chapter 1 (playorder="6")
---->Chapter 2 (playorder="7")
---->Chapter 3 (playorder="8")

Here is how it is after conversion and it doesn't:

BOOK 1 (playorder="1")
---->Chapter 1 (playorder="2")
---->Chapter 2 (playorder="3")
---->Chapter 3 (playorder="4")
BOOK 2 (playorder="2")
---->Chapter 1 (playorder="5")
---->Chapter 2 (playorder="6")
---->Chapter 3 (playorder="7")

Now this is just an example based on me examining the TOC files myself. In FBReader at least this fails. Book 1, chapter 1 is missing and all the rest are under book 2. I can fix it by manually changing the playorder myself.

Before I start filing bug reports I would like to know:

Is this a bug in Calibre?
Is this a bug in FBreader?

Thanks, and sorry for such a long first post!
Tomkun is offline   Reply With Quote
Old 05-14-2013, 10:44 PM   #2
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
playorder in the toc is meaningless, fbreader should not be using it for anything. In an epub file reading order is determined by the <spine> in the opf, not the toc.

However, in the interests of interoperability I will be happy to fix the toc editor to generate depth first play orders, if you can provide me with a an epub and a set of steps to reproduce the messed up play orders.
kovidgoyal is offline   Reply With Quote
Advert
Old 05-14-2013, 11:53 PM   #3
Tomkun
Junior Member
Tomkun began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: A500, iPhone
Thanks for the swift and helpful reply.

I am attaching two small and simple epub files which demonstrate the behaviour.
The first has only been converted from HTML to ePub. Nothing else has been done.

The second has been converted from the same HTML file, but has also had the TOC editor opened and closed (no editing was done).

The first works as expected in FBReader, the second doesn't. If you want to see for yourself, simply open the TOC reader and close it again on the first ePub file. You don't even need to edit anything, it seems to rewrite the TOC anyway.

Once again, thank you very much for your help.
Attached Files
File Type: epub Test Ebook - Unknown (working).epub (135.6 KB, 119 views)
File Type: epub Test Ebook 2 - Unknown (not working).epub (135.6 KB, 110 views)
Tomkun is offline   Reply With Quote
Old 05-15-2013, 01:53 AM   #4
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
http://bazaar.launchpad.net/~kovid/c...revision/15015
kovidgoyal is offline   Reply With Quote
Old 05-15-2013, 08:07 PM   #5
Tomkun
Junior Member
Tomkun began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: A500, iPhone
Thanks so much for fast fix; I'm looking forward to testing it on Friday!
Tomkun is offline   Reply With Quote
Advert
Old 05-19-2013, 11:51 PM   #6
Tomkun
Junior Member
Tomkun began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: A500, iPhone
Hi,
Thanks again for doing this, I've tested it today and it now works perfectly. However in testing I noticed that there is another little issue...

When I convert from HTML to ePub, if the original filename has spaces in it, then so do the parts inside the ePub file. This causes some ebooks to fail in CoolReader on Android because it cannot read the filenames correctly.

Is there an option somewhere to automatically remove spaces from filenames, or would it be possible to add?

The problem can be avoided by making sure that your source filename doesn't contain spaces.
Tomkun is offline   Reply With Quote
Old 05-19-2013, 11:56 PM   #7
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, there is no such option and I have no interest in adding one. I have enough work on my plate without jumping through hoops to accommodate ridiculous reader bugs like the inability to handle spaces in file names.
kovidgoyal is offline   Reply With Quote
Old 05-20-2013, 12:26 AM   #8
Tomkun
Junior Member
Tomkun began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: A500, iPhone
Thanks anyway, I didn't mean to sound demanding. I certainly didn't expect you to jump through hoops.

I didn't realise it was a bug in the readers though, because when I checked with epubcheck the spaces caused the book to fail validation.

Anyway, like I say it can easily be avoided by removing spaces from the source files.
Tomkun is offline   Reply With Quote
Old 05-20-2013, 12:32 AM   #9
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
epubcheck *warns* (as opposed to errors) about spaces in filenames, precisely because of broken epub readers. However, having spaces is filenames is perfectly valid as per the epub spec.

A warning from epubcheck does not imply an epub fails validation.
kovidgoyal is offline   Reply With Quote
Old 05-20-2013, 12:43 AM   #10
Tomkun
Junior Member
Tomkun began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: A500, iPhone
I understand. Thank you for clearing that up for me.
Tomkun is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table of Contents not being identified as Table of Contents openletter Conversion 2 10-19-2012 12:54 AM
Table of Contents fiona86 Conversion 1 08-11-2011 07:14 AM
Table of Contents ucoa Calibre 1 01-07-2011 09:01 PM
Table of Contents peterinnes Sigil 1 09-29-2010 03:03 AM
Creator Table of Contents Nate the great Kindle Formats 5 07-10-2008 05:55 AM


All times are GMT -4. The time now is 07:36 PM.


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