07-07-2010, 07:55 PM | #1 |
Busy Read'n
Posts: 980
Karma: 5039283
Join Date: Feb 2010
Location: Auburn, WA
Device: Pocketbook Touch Lux 5
|
Make Table of Contents?
Is there a way to use Calibre to make a table of contents that I can use on my Sony Reader when I access the Table of Contents function? I want to make it so I can skip between stories (complete works of H.P. Lovecraft) without having to return to the first page and use the hyperlink-style ToC that is there. Just a convenience thing. Thanks in advance if anyone knows.
|
07-08-2010, 07:55 AM | #2 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Yes, this is straightforward. I do this when generating epub books to use on my Sony reader and I never use an inline hyperlink style TOC.
It's all defined on the "Table of Contents" page during the conversion. (You can also set defaults for this page in the calibre preferences). How you then fill in the fields depends on what type of source code you are using for input. Are you using plain text, html or something else? Last edited by Agama; 07-08-2010 at 09:08 AM. |
Advert | |
|
07-08-2010, 09:49 AM | #3 | |
Enthusiast
Posts: 41
Karma: 10
Join Date: Jul 2010
Location: Midwest, USA
Device: Kindle Paperwhite 2,
|
Quote:
I use Open Office to create odt files that I then put through Calibre ePub conversion. Because I didn't know how to make chapter links work in the Table of Contents I just deleted the Table of Contents from the files. (I found it annoying to have to page through the Table of Contents when it had no use to me other than to inform me that there were chapters.) These files are books I copy and paste from the internet - so I guess they are originally HTML - but paste them into Open Office. The Table of Contents is there in the original file, and clicking on the links opens a web page with that chapter. I'm guessing there is a way to make them open the chapter inside the ebook instead, I just don't grasp the process of how to achieve this. |
|
07-08-2010, 06:28 PM | #4 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Can I add attachments to this forum or should I just paste html code directly into my reply? (This is the first forum I've ever joined and I'm still figuring out how it all works!). It would be easiest to show you with a simple example. I tried the insert link tool button but it appears to be for a hyperlink rather than an attachment.
|
07-08-2010, 06:49 PM | #5 | |
Well trained by Cats
Posts: 30,397
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Code:
(the # icon) |
|
Advert | |
|
07-08-2010, 08:24 PM | #6 |
Busy Read'n
Posts: 980
Karma: 5039283
Join Date: Feb 2010
Location: Auburn, WA
Device: Pocketbook Touch Lux 5
|
I have no idea whatsoever what I'm doing. I was hoping it would be similar to Word, which will generate a table of contents for you. I made all the story names in a header format, then Word detects those and automatically makes a ToC to link back to the page. It looks like there's a way to have Calibre detect headings in that same kind of way but I don't know how to make it do that.
|
07-08-2010, 08:43 PM | #7 |
Busy Read'n
Posts: 980
Karma: 5039283
Join Date: Feb 2010
Location: Auburn, WA
Device: Pocketbook Touch Lux 5
|
Okay, so I took a shot in the dark and I think I have it figured out. I had a PDF file and I converted it to epub with table of contents. Problem is all the nice PDF formatting is gone. I'll just use the hyperlink ToC for this one. Thanks everybody anyway!
|
07-08-2010, 09:17 PM | #8 | |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Once you get the hang of a single-level TOC you can experiment with a 2-level TOC. Proceed as before with the following additions:- In 1/2 above, style each chapter heading within each story as built-in style "Heading 3" When you Save-As Webpage-filtered each chapter heading will be wrapped in <h3>...</h3> tags. In 4. above: [Convert] - [Structure Detection] change "Detect chapters at" to //*[name()='h2' or name()='h3'] [Convert] - [Table of Contents] add "Level 2 TOC" to //h:h3 The resulting EPUB will have a nested 2-level TOC +Story 1 Chapter 1 +Story 2Chapter 2 ... Chapter 1
Chapter 2 ... |
|
07-09-2010, 02:22 AM | #9 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Thanks jackie_w, I couldn't have put it better. That's basically what I do, except that my starting documents are html or plain-text with markdown.
One other point to note is that you can also have TOC entries within a chapter. For example if you want <h4> tags to generate a Level 3 TOC, (to mark sections within a chapter), then add to step 4 above: In [Convert] - [Table of Contents] set "Level 3 TOC" to //h:h4 but do NOT add h4 to the [Structure Detection] so it won't break the chapter. Calibre has even more flexibility in this area because you can be selective about when a tag produces a TOC entry. For example you may want <h4 class="toc"> to produce an entry, but <h4 class="notoc"> not to. Just click on the Xpath helper button on [Table of Contents], and fill it in as follows: [Match HTML...] h4 [Having the attribute] class [With value] toc I can post a simple html example if anyone is interested but I think that everything is pretty well covered now. Last edited by Agama; 07-09-2010 at 02:29 AM. |
07-09-2010, 04:39 AM | #10 |
Busy Read'n
Posts: 980
Karma: 5039283
Join Date: Feb 2010
Location: Auburn, WA
Device: Pocketbook Touch Lux 5
|
Thank you so much everyone. I did what jackie_w said, only with //h:h1 since Heading 1 was the style. The table of contents was perfect but the main text and page flow still work much better as a PDF than as an epub so for now I'm leaving it alone. Thank you again, very helpful!
|
07-19-2010, 05:17 PM | #11 |
Junior Member
Posts: 4
Karma: 10
Join Date: Feb 2010
Device: ereader on BB Storm
|
Does this work in mobi format or only epub?
|
07-24-2010, 06:27 PM | #12 |
Enthusiast
Posts: 35
Karma: 300
Join Date: Jan 2009
Device: none
|
Hi,
I'm having problems creating an ePub TOC using Calibre. I have an RTF that I saved as a web page, filtered file. I edited the html in Notepad and added the h2 class="toc" and in Calibre I set the toc flags to //h:h2. Anyone out there willing to take a look at my raw file and tell me where I'm going wrong? Calibre looks like it knows to create a ToC. I get a ToC listing, but clicking on the links within Calibre does nothing and using Firefox ePub add in it leads to erroneous pages. Jason |
07-24-2010, 10:00 PM | #13 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
I'm happy to take a look at it tomorrow if you don't find someone sooner.
|
07-24-2010, 10:07 PM | #14 |
Enthusiast
Posts: 35
Karma: 300
Join Date: Jan 2009
Device: none
|
|
06-21-2011, 08:39 PM | #15 |
Zealot
Posts: 133
Karma: 998
Join Date: Apr 2010
Device: Nook
|
Jackie, your are life saver!
Now one 'dumb' question. Can I create a TOC inside my ePub with Calibre? I know I can with MobiCreator, but I am hoping I can skip using that application and move directly to Calibre. Otherwise, I have to use MobiCreator for the internal, inside the ePub TOC, and then import that into Calibre to get my final product. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table of Contents | peterinnes | Sigil | 1 | 09-29-2010 03:03 AM |
How to make a PDF table of contents work in epub | ajbrutico | Calibre | 3 | 09-26-2010 09:31 AM |
how does the kobo make it's "table of contents" | soup | Kobo Reader | 5 | 08-17-2010 10:24 PM |
Help with my Table of Contents | Skylinefranc | Calibre | 0 | 03-19-2010 12:55 AM |
Creator Table of Contents | Nate the great | Kindle Formats | 5 | 07-10-2008 05:55 AM |