09-10-2009, 12:59 PM | #1 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2009
Device: HTC Hero phone
|
Creating table of contents (TOC)
I'm looking for help in creating tables of contents for ebooks converted from MS Word documents.
I've tried applying the 'Heading 3' style and using Word's facility to create a table of contents and saving the resulting document as first an rtf file then an html file (since Calibre doesn't seem to accept doc files as input). However, I have not been able in Calibre to create a working TOC from either the rtf or the html files. Can you please direct me to step-by-step guidance on how to do this, preferably using the Calibre GUI? If it's necessary for me to use the Calibre Command-Line interface, can you suggest where I should go for beginners' instructions as to how I should use it? |
09-10-2009, 01:39 PM | #2 |
creator of calibre
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just search these forums for BookCreator (it is a macro package for word that integrates with calibre and makes doing these kinds of things very easy).
|
09-10-2009, 02:37 PM | #3 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2009
Device: HTC Hero phone
|
Thank you. I'll do that.
|
09-10-2009, 07:11 PM | #4 | |
Wizard
Posts: 1,150
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
http://community.livejournal.com/fanfic_ebooks/ Basically, I just use < h2 > tags for all the headers I want in my table of contents. There are a lot of screencaps. |
|
09-11-2009, 02:10 AM | #5 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2009
Device: HTC Hero phone
|
Thanks. I'll look at that too.
|
09-11-2009, 03:49 AM | #6 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2009
Device: HTC Hero phone
|
I'm sorry to be dense.
I looked at Amalthia's web page and, following hints from her screenshots, went back to Calibre and in Preferences-Conversion-TOC changed h2 references to h3. I then opened my rtf file (with h3 headings) and converted to epub. As before the result worked in Calibre, but when I copied it to my Android phone and opened it in FBReader only the last TOC entry was visible. Otherwise the book works fine: the TOC entries are visible at the start of the book and its entries link to the correct pages. The only problem is that when I open the TOC all I can see is the last entry. (Changing h2 to h3 doesn't seem to have made any difference. I tried a similar conversion yesterday with the same result.) Unzipping the epub file and looking in toc.ncx, all 19 TOC entries are present and I can't spot any significant differences between them. Similarly, inside the .htm file. I know that FBReader can deal with epub TOCs correctly. I have downloaded an epub from Project Gutenberg and this works fine. All I want to do is create something similar from my own rtf/doc files. So, I searched these forums for BookCreator and found the long sticky threads about versions 2 and 3. Because version 3 is said to have problems with epub I've downloaded the 2.6.1 version, unzipped the Word template, loaded it into Word and inserted my rtf file. My problem now is that I can't see what to do next. I haven't seen any 'getting started' instructions for BookCreator. I can't see that the template has added an toolbars or menus. Where do I go? Help, please! (I'm using Word XP (2002) on MS Vista.) |
09-11-2009, 12:14 PM | #7 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2009
Device: HTC Hero phone
|
Comparing two toc.ncx files:
A - the one inside the epub file generated by Calibre from my rtf file (which does not work in FBReader on my Android phone) B - the one inside the Project Gutenberg book which I downloaded (which works in FBReader) I have noticed that whereas the <navPoint> tags in B have playOrder properties numbered consecutively 1, 2 , 3, ...., those in A have playOrder all set to 0. Could that be significant? |
09-11-2009, 12:26 PM | #8 |
creator of calibre
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I suggest trying wordplayer on your phone instead, I know it works with calibre generated EPUB files. And attach your RTF file with the settings you used to a ticket on the calibre website, calibre shouldn't be generating all equal play orders.
|
09-11-2009, 12:33 PM | #9 | |
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
playOrder attributes remain required. Although playOrder attributes are not used to sequence SMIL content, they should contain valid values that reflect the linear document reading order. This could, for example, be used when one is navigating a pageList to find a corresponding location in the navMap. ... well, as invalid as the strong is the "should". The relevant part of the NCX spec says: The playOrder attribute is required on each pageTarget, navTarget and navPoint. It provides a means to collate all pageTargets, navTargets, and navPoints into a single ordered sequence that reflects their order in the normal playback sequence of the book as presented in the spine and SMIL file(s). playOrder is a positive integer; the first playOrder value in a document shall be 1. When the content elements of any pageTargets, navTargets, or navPoints reference the same SMIL time container, they must have the same playOrder value. playOrder must increase by one for each unique SMIL time container referenced by any pageTarget, navTarget or navPoint. |
|
09-11-2009, 01:01 PM | #10 |
Wizard
Posts: 1,150
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
My tutorial is targeted towards coding HTML files, honestly I haven't really tried converting RTFs to LRF so I'm not sure how well that would turn out. I always felt like I had more control over the elements in the story via html.
|
09-11-2009, 02:18 PM | #11 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2009
Device: HTC Hero phone
|
Thanks, kovidgoyal. I'll post the details on your website, as requested.
Jellby, thank you for the details. At the moment the details of the epub spec, SMILs and Spines, are a complete mystery to me. I look forward to finding out more when I have time. Amalthia, the HTML that Word creates seems fine and I can display it OK on my Android phone, but so far as I can see I don't have the ability to switch quickly back to the table of contents at the top of the page when I'm in the middle of an HTML document. |
09-11-2009, 04:06 PM | #12 |
Wizard
Posts: 1,150
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Yeah, that is one problem, there isn't exactly a button to hit that takes you directly to the Table of Contents and yet keeping in the Previous Index and Next links kind of make the page look crowded. I don't even keep the table of contents on the front page of the ebooks anymore because you have to scroll through each link, so I'm using the Table of contents you have to access via the book index on the device.
|
09-14-2009, 04:08 AM | #13 |
Junior Member
Posts: 9
Karma: 10
Join Date: Sep 2009
Device: HTC Hero phone
|
Thanks to kovidgoyal's encouragement I had another go: loaded my rtf file (created in Word with 'Heading 3' style applied to all chapter headings and a table of contents created by Word) into Calibre, then leaving the preferences as described above I converted into epub and this time the result worked, both in Calibre and in FBReader.
There was a minor problem in that the entries in table of contents were present at the start of the epub document looking slightly garbled. Bearing in mind that by default Calibre seems to look for h1 and h2 headings, but not h3, when creating a table of contents, what I have now done is: 1. In Calibre: set preferences for 'Structure Detection' and 'Table of Contents' back to default (referring to h2 headings but not h3) 2. In Word: applied 'Heading 2' styles to the headings I want in the TOC, then saved the document as an rtf file 3. NOT created a TOC in Word 4. In Calibre: simply added the rtf file and converted to epub without modifying any settings 5. The result seems to work perfectly, both in Calibre and in FBReader on my Android phone. I'm not sure exactly what I did wrong previously. I expect it was a combination of not understanding I did not need to create a TOC in Word and creating muddled preferences when I tried to get Calibre to look for h3 headings. Anyway, now that I understand a bit better what I am doing, it seems to work very well. Thank you all for your patience and advice. |
Tags |
calibre, contents, toc |
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 |
Help with my Table of Contents | Skylinefranc | Calibre | 0 | 03-19-2010 12:55 AM |
How to: table of contents | wizzofoz | Sigil | 1 | 10-08-2009 08:22 AM |
only the table of contents | wang960 | Sony Reader | 3 | 08-29-2008 12:45 PM |
Creator Table of Contents | Nate the great | Kindle Formats | 5 | 07-10-2008 05:55 AM |