![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 163
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
|
Generating a rough "table of contents"
Currently, I'm using a Kobo for ereading, and as you all may know, there's no way to simply skip to a certain page. What this can mean is, with some epubs not formatted with a table of contents, getting through to where you left off on your hard copy of the book can mean tons and tons of page turns.
I was wondering if there was a way for Calibre, while converting an epub, to make up a table of contents by simply breaking up the file into a user-specific number of sections (say, ten), and marking those as "chapters" on the ToC. That way, the reader could at least fast-forward to the 70%-mark of the book, and find their place from there. Calibre seems to have several ToC options available in the conversion menu, but none of them seem to work for me, and I don't seem to be seeing my answer in the help pages. Thanks in advance for any help. |
![]() |
![]() |
![]() |
#2 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,786
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
I dont think thats possible
What are your source files for generating epubs normally calibre just checks H1 and H2 tags but most books I acquire use H3 for chapter heading so I use this for chapter detection Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 163
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
|
So far, I've been adding in <h1/2/3> tags manually, but it gets quite tedious. The ones I dread specifically are Frank Herbert's Dune books. First off, they're very long books, with lots of chapters; and they don't have normal chapter headings (and therefore, no <h> tags already in the epub file).
So, I'm pretty much stuck putting them in myself, then? |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Try enabling the preprocess option under structure detection - one of the things it does is tries to detect common chapter headings and wrap them in <h2> tags so you don't have to. It's not always going to work, and can stick headings where you don't want them in rare cases, but generally should do ok.
If your book already has heading tags then that feature won't help you, you just need to look at the html to see what the right xpath needs to be. You can make the default xpath match a lot more if you change it to this: Code:
/*[((name()='h1' or name()='h2' or name()='h3') and re:test(., '.*', 'i')) or @class = 'chapter'] Last edited by ldolse; 01-09-2011 at 10:29 PM. |
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,786
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Format of "Contents" section in metadata | IMFletch | Calibre | 2 | 12-24-2010 12:04 AM |
Table of Contents not generating | Amalthia | Calibre | 2 | 12-19-2010 08:15 PM |
Woher bekomme ich "Infinite Jest" oder "Unendlicher Spaß" von David Foster Wallace? | bitschnau | Erste Hilfe | 3 | 11-01-2010 01:22 PM |
how does the kobo make it's "table of contents" | soup | Kobo Reader | 5 | 08-17-2010 10:24 PM |
TOO SLOW to open "Table of Contents" | mdhuang | Sony Reader | 16 | 09-06-2007 10:29 PM |