Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-17-2010, 05:56 PM   #1
corona
Addict
corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.
 
corona's Avatar
 
Posts: 324
Karma: 25168
Join Date: May 2010
Device: kobo
force new chapter every x pages?

I use Calibre most frequently to convert PDF articles that don't inherently come with chapter breaks.

Sometimes the conversion process -- PDF to ePub with Calibre -- yields chapter breaks that don't make any sense, and sometimes none at all.

It would be convenient to insert chapter breaks every few pages -- every 5, say.

Oh, I have a Kobo reader so I have no ability to go to a specific page number. Only chapters. So if I could set chapters every 5 pages, then I could just use the table of contents (right?) to jump around in the document.

Is it possible to suppress all other chapter breaks, and add them every x pages?

Thanks!
corona is offline   Reply With Quote
Old 10-17-2010, 06:07 PM   #2
toddos
Guru
toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.
 
toddos's Avatar
 
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
Epub doesn't really have a concept of "pages", so "every 5 pages" is more or less meaningless. Do your PDF articles have any headings or other natural locations where you could break? If so, you can play with the chapter break xpath in the structure detection options.

Calibre breaks epub files every 260KB if it doesn't find any better chapter breaks. You could adjust that configuration value down to something small like every 10KB.
toddos is offline   Reply With Quote
Advert
Old 10-17-2010, 06:24 PM   #3
corona
Addict
corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.corona knows what's going on.
 
corona's Avatar
 
Posts: 324
Karma: 25168
Join Date: May 2010
Device: kobo
Thank you, toddos -- I posted this partly because I'm too lazy to figure out how to manipulate the xpath statement. Indeed, although I can see all of this in the Calibre conversion pages, I don't (yet) have any idea what any of it means, or even what an xpath statement is. I'll keep trying though.
corona is offline   Reply With Quote
Old 10-17-2010, 07:28 PM   #4
toddos
Guru
toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.
 
toddos's Avatar
 
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
http://calibre-ebook.com/user_manual/xpath.html

You'll probably want to do a conversion with debugging turned on (it's in the conversion dialog, the little ladybug icon on the left -- just pick a folder you'll remember). Do the conversion and then look at the generated HTML file to figure out what element your headings are being generated as. Hopefully you'll have some h3 or h4 elements in there (obviously no h1 or h2 elements are being found or the standard chapter xpath would've already worked). You might find that the elements are div or p elements with a class only used for headings so you could break on that instead.
toddos is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ebook chapter titles: with or without chapter number? amoroso Writers' Corner 16 06-14-2011 06:35 AM
HTML to PDF, blank pages after each chapter ibarro Calibre 5 08-02-2010 03:08 PM
Next Chapter skips to End in last chapter? JoGoCo Kobo Reader 5 07-13-2010 09:23 PM
Pages to end of chapter. Any javascript function? Car105 Sony Reader Dev Corner 0 12-28-2009 05:03 AM
Adding chapter breaks by number of pages/lines raptir Calibre 8 10-22-2009 12:11 PM


All times are GMT -4. The time now is 08:53 PM.


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