![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jul 2011
Device: none
|
making a TOC
I managed to create chapters in the TOC but how can you add a Prelude and Appendix to the TOC. I'm working from a PDF created from a ms word file. The desired heading are set at TOC headings from the word file.
|
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Moderator Notice
Moved to correct forum. |
![]() |
![]() |
![]() |
#3 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
If you have the original Word file then ensure you have the same heading (h1) for all items you want in the TOC, then save the file as web page filtered, add it to calibre and convert that file. You should avoid PDF as a source file whenever possible. PDF is a print format or a display format when able to be viewed at 100%. But it is full of trouble when attempting to convert it to any ereader format. Read these two sticky posts for more information. Read this before Posting PDF Questions Chapter Detection/Table of Contents Tutorial Good Luck. |
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jul 2011
Device: none
|
I am converting from PDF to Epub. All works in the TOC except I can't add an appendix and an interlude to the TOC. The Xpath I'm using is as follows
//*[((name()='h1' or name()='h2') and re:test(., 'chapter|appendix|interlude|appendix|prologue|epil ogue\s+', 'i')) or @class = 'chapter'] |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
PDF chapters get wrapped in h2 tags based on heuristics, the words 'appendix' and 'interlude' aren't words that trigger heuristics to wrap the heading in h2 tags. Appendix is probably a valid heading to be added to heuristics, but I'm a bit leary of using interlude - I've never seen it used before.
You either need to write your own search and replace to wrap those words in <h2> tags or hand edit after the fact in Sigil. PDF is a format that will always need hand massaging in Sigil if you're striving for perfection on issues like this, as is discussed in the sticky dwanthny linked. |
![]() |
![]() |
![]() |
#6 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() One of these is loaded with "Interlude" chapters |
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jul 2011
Device: none
|
gave up on the pdf to epub and went to html to epub. all worked out.
|
![]() |
![]() |
![]() |
#8 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
|
![]() |
![]() |
![]() |
#9 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 185
Karma: 363616
Join Date: Dec 2010
Location: Montreal, Canada
Device: Kobo Original, Kobo Touch
|
Alternatively I made a small app to manually create a TOC, reorder it etc. Check the link in my signature
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Inline TOC from toc.ncx | elmago79 | Kindle Formats | 38 | 03-25-2011 12:56 PM |
Making A Ebook - TOC | DrakeShockFire | Workshop | 0 | 01-21-2010 03:26 PM |
Making a TOC? Best Way For Mac? | KindleKid | Sony Reader | 7 | 08-01-2009 03:21 PM |
Making a Rough html toc for downloaded web pages | sherryk_us | Calibre | 5 | 06-21-2009 03:23 PM |
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working | Magitek | LRF | 0 | 05-06-2009 01:25 PM |