Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-05-2009, 06:21 PM   #331
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: 44,088
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's not yet supported for EPUB
kovidgoyal is offline   Reply With Quote
Old 02-10-2009, 08:43 PM   #332
ewiplayer
Enthusiast
ewiplayer has learned how to buy an e-book online
 
Posts: 47
Karma: 90
Join Date: Nov 2008
Device: Sony PRS-700
--levelN-toc doesn't work?

Hi,

I've been trying to use --level1-toc and friends to no avail.

I've tried all kinds of different things but in the end, the only thing that lets me get everything into the TOC is to use the --chapter flag:

Code:
--chapter='//*[@class="docPartTitle" or @class="docChapterTitle" or @class="docAppendixTitle" or @class="docPrefaceTitle" or @class="docSection1Title"]'
but this gives me a dead flat hierarchy. Ideally what I want to do is:

Code:
--leve1-toc='//*[@class="docPartTitle" or @class="docAppendixTitle" or @class="docPrefaceTitle"]' --level2-toc='//*[@class="docChapterTitle" or @class="docSection1Title"]'
But no matter how I try to do it, include --no-chapters-in-toc or --use-auto-toc, or --chapter=/, those options don't do anything at all. All I get is the default behaviour (h1, h2 with Part and Chapter in it).

Is this feature not working or am I doing something stupid?

Thanks,
EP
ewiplayer is offline   Reply With Quote
Advert
Old 02-10-2009, 09:22 PM   #333
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: 44,088
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As far as I know, they are working. Open a bug report and attach your file alogwith the command line you used.
kovidgoyal is offline   Reply With Quote
Old 02-11-2009, 06:21 AM   #334
ewiplayer
Enthusiast
ewiplayer has learned how to buy an e-book online
 
Posts: 47
Karma: 90
Join Date: Nov 2008
Device: Sony PRS-700
Quote:
Originally Posted by kovidgoyal View Post
As far as I know, they are working. Open a bug report and attach your file alogwith the command line you used.
Trac crapped out when I was trying to make the ticket. It said the database was locked.

So, I'm just posting it here. I think the tar file should be adequate to reproduce the problem. Just extract and run the create.sh. When I do it, there are no level2 items.
Attached Files
File Type: tar book.tar (40.0 KB, 341 views)
ewiplayer is offline   Reply With Quote
Old 02-11-2009, 08:10 AM   #335
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by ewiplayer View Post
So, I'm just posting it here. I think the tar file should be adequate to reproduce the problem. Just extract and run the create.sh. When I do it, there are no level2 items.
The problem is that right now TOC-generation via the --level*-toc options depends upon the markup structure within a single file. If you just 'cat' all the files in the example together (lxml can handle the resulting markup soup) and run calibre with the TOC options you provided, everything works as you had expected.

We'll see what Kovid says, but I don't see an obvious way to fix this in the current release series. Fortunately work on the next release series is in progress , although I can't begin to guess on a release date.
llasram is offline   Reply With Quote
Advert
Old 02-11-2009, 10:32 AM   #336
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: 44,088
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
To elaborate a bit, you don't actually need a single file, just one file per level1 part. So part01.html needs to contain the part01 title as well as the markup for all the chapters in Part1 and so on...
kovidgoyal is offline   Reply With Quote
Old 02-11-2009, 11:23 AM   #337
ewiplayer
Enthusiast
ewiplayer has learned how to buy an e-book online
 
Posts: 47
Karma: 90
Join Date: Nov 2008
Device: Sony PRS-700
Quote:
Originally Posted by kovidgoyal View Post
To elaborate a bit, you don't actually need a single file, just one file per level1 part. So part01.html needs to contain the part01 title as well as the markup for all the chapters in Part1 and so on...
Alright, I'll give that a shot.

As it stands now, I did try to put everything in one file with the "real" document I'm working on and it failed in a different way. Normally to build the epub with the individual 294 files, it takes about 2 mins. With all 294 concatenated into 1 file, after 105 minutes it was still "Rationalizing fonts..." and sucking up 100% cpu. I wasn't willing to wait anymore and just killed it off.

When I get a chance later, I'll try breaking things up a bit more to see if that gets around this problem.

Cheers
ewiplayer is offline   Reply With Quote
Old 02-11-2009, 11:25 AM   #338
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: 44,088
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Font rationalization happens for each file, the larger the file, the longer it takes.
kovidgoyal is offline   Reply With Quote
Old 02-14-2009, 05:16 PM   #339
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by kiklop74 View Post
BTW I was not aware that feature is supported by calibre. How do you embed fonts in epub?
I meant by hand.
Valloric is offline   Reply With Quote
Old 02-14-2009, 06:34 PM   #340
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Yes but I want to avoid all that hassle and since reader already has suitable font why not just use it? And I can tell you it works great.
kiklop74 is offline   Reply With Quote
Old 02-14-2009, 08:05 PM   #341
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by kiklop74 View Post
Yes but I want to avoid all that hassle and since reader already has suitable font why not just use it? And I can tell you it works great.
But doesn't your workaround make the epub file Reader specific? How would it display on something like the desktop version of Digital Editions? Or some future device?
Valloric is offline   Reply With Quote
Old 02-14-2009, 11:46 PM   #342
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Yes it does make it reader specific but since calibre does not support font embedding from the recipe - embedding them manually is something that does not make much sense to me.

The point of the recipe IS to automate complete process not make it into something you manually need to do every day. Imagine downloading 5 or more newspapers every day and every day having to embed same font 5 times. That is something I just do not want to do, and I do not care that it would not work on some other device since I do not distribute epub files I generate nor do I have any other device. If somebody else want to do some change into recipe - be my guest. After all this is open-source and anybody can adapt code to their specific needs.

Last edited by kiklop74; 02-14-2009 at 11:54 PM.
kiklop74 is offline   Reply With Quote
Old 02-15-2009, 12:14 AM   #343
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: 44,088
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Those EPUB files will display fine on other devices/software provided that the device has as default font capable of displaying the needed character set. In any case calibre will soon get suport for embedding fonts in EPUB files.
kovidgoyal is offline   Reply With Quote
Old 02-15-2009, 06:42 AM   #344
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
That is really great news Kovid!
kiklop74 is offline   Reply With Quote
Old 02-15-2009, 07:55 PM   #345
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by kovidgoyal View Post
In any case calibre will soon get suport for embedding fonts in EPUB files.
This is good news indeed.
Valloric is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Epub Output: Line Height greenapple Conversion 20 01-27-2013 09:27 AM
EPUB output justification toki08 Calibre 10 01-08-2011 04:14 PM
Calibre epub output details and Nook squidward Calibre 6 11-24-2010 03:21 PM
epub output metadata troymc Calibre 5 05-22-2010 12:23 AM
Problem with epub output in Cybook Gen3 fjf Calibre 3 02-03-2010 02:23 AM


All times are GMT -4. The time now is 05:57 PM.


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