09-30-2010, 01:26 PM | #1 |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Table of Contents RTF > MOBI
I have several e-books as RFT files, and I've been using Calibre to convert them to the Mobi format (which btw, Calibre does a great job of doing this!).
I just wanted to know if there was any way I could make a table of contents in the RFT documents, and once I converted to Mobi, I could click on each chapter to jump to that chapter on the Kindle. Disclaimer: I am not a programmer! Most of my coding experience is basic HTML. I have an inkling that some code may be used in this process, if so, please explain in simple terms. I am a new at all this e-book stuff :P I am a fast learner though. (My computer runs Mac OS X Snow Leopard and I have the new Kindle 3). Dax |
09-30-2010, 09:01 PM | #2 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
You could try enabling preprocessing under structure detection in the conversion options - if your chapters are marked with typical chapter headings then it will mark those in such a way that Calibre will build a table of contents later in the conversion process.
|
Advert | |
|
10-02-2010, 09:35 AM | #3 | |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Quote:
I don't know if they are marked this way. I make the RFT files myself. I like reading fanfiction, so I just copy stories from the internet. How can I mark the chapters myself so that they will be identified by Calibre? Thank you for responding! |
|
10-02-2010, 10:07 AM | #4 | |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
For example if you styled your chapter headings with Word style 'Heading 2' then this is the equivalent of using <h2> HTML tags and you should set [Convert] - [StructureDetection] - [Detect chapters at] to //h:h2 and [Convert] - [Table of Contents] - [Level1 TOC] to //h:h2 Edit: This suggestion is not related to Idolse's pre-processing suggestions Last edited by jackie_w; 10-02-2010 at 10:12 AM. Reason: clarification |
|
10-02-2010, 10:31 AM | #5 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Jackie's suggestion is definitely the best way to go about this, especially if you're the author/doc creator.
The point with preprocessing is there are a lot of documents where the publisher of the doc didn't do this, and you're stuck with a doc where chapter detection doesn't work. Preprocessing looks for different patterns in the doc. It starts with lines that say 'Chapter xxx', or similar common headings. If it doesn't detect any chapters it tries numeric headings, and lastly it looks for lines which are composed entirely of uppercase words. This approach can lead to false positives, which is why the help indicates that it could potentially screw up your conversion. In practice false positives are pretty low, and if it happens it's generally easier to fix one or two false positives than it is to manually mark up the whole book beforehand. Did you actually try enabling preprocessing yet? Last edited by ldolse; 10-02-2010 at 10:41 AM. Reason: Confused different threads |
Advert | |
|
10-02-2010, 10:53 AM | #6 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
By the way, even if you do enable preprocessing, you would still need to follow Jackie's advice about Calibre's settings under structure detection/TOC to actually build the Table of Contents. Preprocessing takes those common types of chapter headings I mentioned and wraps them in <h2> tags, but then the structure detection settings must still match how the chapters are defined.
The default rule is this: Code:
//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part\s+', 'i')) or @class = 'chapter'] You can change that simply follow Jackie's advice to match all h2 headers in structure detection and TOC creation: Code:
//h:h2 Code:
//*[((name()='h1' or name()='h2') and re:test(., '\d+', 'i')) or @class = 'chapter'] Code:
//*[((name()='h1' or name()='h2') and re:test(., '.*', 'i')) or @class = 'chapter'] Last edited by ldolse; 10-02-2010 at 10:59 AM. |
10-02-2010, 01:42 PM | #7 |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
I'm using TextEdit on the Mac to create the RTF files. I don't see any options for Headings though.
I also have Pages and I know you can use Heading styles. They aren't labeled as Heading 1 or 2. Just Heading, Title, and Subtitle. I'm thinking that Heading would be the H2. (Title being H1 and Sub-heading being H3). I'm going to experiment with it a little and see what happens. Thanks! |
10-03-2010, 09:00 PM | #8 |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
It didn't work. I honestly don't know what I'm doing. As I said, I'm not very technically inclined.
But thanks for all the help. |
10-03-2010, 09:19 PM | #9 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
I've attached a sample RTF file. You'll note the rtf file includes three kinds of common chapter headings.
You generally can't mix and match those three types of chapter headings in a full book (just choose one), but in a test case like this it works fine. I tested that in Kindle for Mac and Adobe DE, both showed me TOCs. If you're not seeing a TOC maybe you need to describe how you're attempting to view it. Last edited by ldolse; 10-03-2010 at 09:22 PM. |
10-06-2010, 11:36 AM | #10 |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Hi, Idolse:
I just viewed this today, I will try it out. Thanks for the help. |
10-08-2010, 04:36 AM | #11 | |
Addict
Posts: 254
Karma: 59872
Join Date: Dec 2009
Location: New York, USA
Device: Kindle 3 (wifi) + nokia n900 tablet phone
|
Quote:
|
|
10-08-2010, 05:18 AM | #12 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Roman numerals match as well, forgot to include those in the examples. Not because it's looking for Roman numerals specifically, but looking for all uppercase letters without punctuation on a single line is one of the things it looks for.
|
10-09-2010, 12:46 AM | #13 |
Addict
Posts: 254
Karma: 59872
Join Date: Dec 2009
Location: New York, USA
Device: Kindle 3 (wifi) + nokia n900 tablet phone
|
Thank you, I'll be glad to re-generate my Georgette Heyer ebooks.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] RTF and Table of Contents | ShellShock | Calibre | 13 | 02-13-2013 05:39 AM |
[Old Thread] Table of contents forced to end not start of .mobi | irishpolyglot | Conversion | 4 | 05-24-2011 08:33 PM |
Table of Contents - html to Mobi problem | thames | Calibre | 3 | 06-02-2010 07:24 PM |
preserve table format when converting mobi to rtf | moogoogai | Calibre | 4 | 02-26-2010 12:50 PM |
PRS-500 Is Working Table of Contents Possible with RTF? | Falstaff | Sony Reader Dev Corner | 2 | 12-20-2006 11:42 PM |