![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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! |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |