05-03-2011, 01:46 PM | #16 | |
Evangelist
Posts: 448
Karma: 864744
Join Date: Mar 2011
Device: Kindle 3, LookBook, Nook Simple Touch
|
Quote:
|
|
05-06-2011, 06:44 PM | #17 |
Resident Curmudgeon
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Keep your document well away from Word. The garbage put in by Word is a pain in the ass to deal with.
And since you are dealing with ePub, you do not need an internal ToC. Just use the NCX for the ToC and Calibre will convert that so the link to the ToC works. |
Advert | |
|
05-06-2011, 06:46 PM | #18 |
Resident Curmudgeon
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
When I see an ePub with both an internal and external ToC and I am making any changes to the ePub, I will delete the internal ToC as it is not needed and just takes up space.
|
04-03-2012, 10:22 PM | #19 |
Junior Member
Posts: 3
Karma: 10
Join Date: Apr 2012
Device: calibre
|
DMSmillie your suggestion is just what i'm look for. but i need more explanation please.
when i "tweak epub" it brings up a bunch of files. which is the OPF file and how do i open it to add you fix? where in the file do i add your <guide> code? thank you for you help maryjanee |
04-03-2012, 11:22 PM | #20 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
Advert | |
|
04-04-2012, 01:13 AM | #21 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
If there is already a <guide> section, add the <reference> tag inside it. If you need to add <guide> section, it can go anywhere within the <package> section so long as it isn't within a subsection. It is probably easiest to add it just before the </package> tag. |
|
04-04-2012, 06:31 PM | #22 |
Junior Member
Posts: 3
Karma: 10
Join Date: Apr 2012
Device: calibre
|
davidfor
that was helpful thanks. i guess i dont understand what to add exactly. i thought i just add the name of my bookmarked toc like this <reference type="toc" title="Table of Contents" href="filename.html#tocc"/> but the kindle previewer said there is no toc. <reference type="toc" title="Table of Contents" href="filename.html#bookmark"/> this is the code that works. what exactly should i add? |
04-04-2012, 10:54 PM | #23 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
What you need is code that looks something like: Code:
<guide> <reference type="toc" title="Table of Contents" href="filename.html#bookmark"/> </guide> - There can be only one set of <guide></guide> tags. - There may be other <reference> tags in there. Most will probably have type of "text" but "cover" for the cover page is one I can see. - For the TOC, everything other than what is in quotes after "href" attribute should be the same. The href attribute is where the changes are. This refers to a file in the epub and an anchor point within that file. So, there needs to be a file in the epub that has a table of contents in it. This will be html or xhtml file with links to the chapters. One of the tags in the file will have an id which is used as the anchor point. The example of this I can find has a separate file that is just the TOC. I suspect in this case, the anchor point is not needed, but it is there from whoever created the file. The anchor point will be needed if the file contains text other than the TOC. The example I can find in my library has: Code:
<guide> <reference href="Text/Twice_Shy_split_024.html#filepos695889" title="Table of Contents" type="toc" /> <reference href="Text/titlepage.xhtml" title="Cover" type="cover" /> </guide> As I mentioned, I use Sigil to edit epubs. As an experiment, I edited an epub, selected a file and gave it the semantics of TOC (right click on the file, select "Add Sementics" and then "Table of Contents"). Sigil updated contents.opf to have the tags we are talking about. In this case, there was no id in the href. I don't know what would happen if I converted this epub to mobi as the file I marked as the TOC did not have a TOC in it. I would expect the Kindle to either display the error you are seeing or an empty TOC. |
|
04-04-2012, 11:08 PM | #24 |
Well trained by Cats
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
A second for Sigil.
If you right-click on a file in Sigil's Book Browser, you can add a 'Semantic' to that file. Basically making those entries for you. The ?down side, is one semantic per file (SIgil does not attach semantics to anchors). The up side is it is easy to split a file in Sigil. |
04-07-2012, 02:39 PM | #25 |
Junior Member
Posts: 3
Karma: 10
Join Date: Apr 2012
Device: calibre
|
thank you. i didnt know about Sigil it generates a perfect toc. i REALLY appreciate every ones help. problem solved thanks to helpful people like you.
|
12-16-2012, 07:33 AM | #26 |
Junior Member
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: none
|
Hi there,
I just spent... 8 hours... trying to solve this TOC issue. I must precise I'm a complete beginner and non-native English speaker. Sorry if I misunderstand things sometime. I tried and do what's described here. My first issue is the following: - if I UNCHECK "Do ot add a TOC to..." like explained by medwatt, my eBook display 2 TOC: the initial, inline one I creatdd in Word, PLUS the "metadata" one at the very end of the ebook. This second one is the one that is recognized when I use the "GO TO... Tables of Contents" functionality. - When I CHECK the "Do ot add a TOC to..." option, my ebook only display the inline TOC of my Word document. But in piste of me trying to follow the process you describe, I'm unable to have it recognized by the "GO TO..." functionality. Here is what I did: 1. In Word, I created a Bookmark just before my TOC. I named the bookmark "CIU"so that I do not mistake it with anything else when editing my files. 2. I saved the file as a WEB PAGE, FILTERED. 3. In CALIBRE, I converted that WEB PAGE into EPUB. I had to check the "No default Cover" in the EPUB Ouput option. 4. Still in CALIBRE, I right-clicked on the book and select TWEAK BOOK and EXPODE BOOK. 5. I select the OPF file and open it into WordPad. Here, I'm not sure I'm not already "corrupting" the file format? Is there any free text editor I should better use to do that? Or is there no risk here? 6. I know that my initial TOC is in the file "TT_Test Bkmrk et EPUB_split_002.html" and the bookmark is named CIU. 7. Then it should give me the following: <reference type="toc" title="Table of Contents" href="TT_Test Bkmrk et EPUB_split_002.html#CIU"/> My issue is that I do not where to add this line in the OPF file. I can see the <guide/> tag, but I cannot find the <guide> tag. Then, I'm not even sure that this edit is well-taken into account. Well, I'm not a coder and very new to eBook. Can anyonre please advise me? Here is my edited OPF file: Code: <?xml version='1.0' encoding='utf-8'?> <package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="uuid_id"> <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlnspf="http://www.idpf.org/2007/opf" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata" xmlns:dc="http://purl.org/dc/elements/1.1/"> <meta name="calibre:title_sort" content="Le TT_BOOKMARK"/> <dc:language>en</dc:language> <dc:creator opf:role="aut">Unknown</dc:creator> <meta name="calibre:timestamp" content="2012-12-16T12:03:01+00:00"/> <dc:title>Le TT_BOOKMARK</dc:title> <dc:date>0101-01-01T00:00:00+00:00</dc:date> <dc:contributor opf:role="bkp">calibre (0.9.10) [http://calibre-ebook.com]</dc:contributor> <dc:identifier id="uuid_id" opf:scheme="uuid">b3376e2e-2f8e-4252-a4aa-b82187a3f450</dc:identifier> </metadata> <manifest> <item href="TT_Test Bkmrk et EPUB_split_000.htm" id="html7" media-type="application/xhtml+xml"/> <item href="TT_Test Bkmrk et EPUB_split_001.htm" id="html6" media-type="application/xhtml+xml"/> <item href="TT_Test Bkmrk et EPUB_split_002.htm" id="html5" media-type="application/xhtml+xml"/> <item href="TT_Test Bkmrk et EPUB_split_003.htm" id="html4" media-type="application/xhtml+xml"/> <item href="TT_Test Bkmrk et EPUB_split_004.htm" id="html3" media-type="application/xhtml+xml"/> <item href="TT_Test Bkmrk et EPUB_split_005.htm" id="html2" media-type="application/xhtml+xml"/> <item href="TT_Test Bkmrk et EPUB_split_006.htm" id="html1" media-type="application/xhtml+xml"/> <item href="page_styles.css" id="page_css" media-type="text/css"/> <item href="stylesheet.css" id="css" media-type="text/css"/> <item href="toc.ncx" media-type="application/x-dtbncx+xml" id="ncx"/> </manifest> <spine toc="ncx"> <itemref idref="html7"/> <itemref idref="html6"/> <itemref idref="html5"/> <itemref idref="html4"/> <itemref idref="html3"/> <itemref idref="html2"/> <itemref idref="html1"/> </spine> <reference type="toc" title="Table of Contents" href="TT_Test Bkmrk et EPUB_split_002.html#CIU"/> <guide/> </package> |
12-16-2012, 11:13 AM | #27 |
Well trained by Cats
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
the guide shown there is of the self closing format.
simply change it to <guide> put your stuff and add the closing </guide> after |
12-18-2012, 05:55 PM | #28 |
Junior Member
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: none
|
That's what I did, but my TOC is still not recognized when using the GO TO function. I'm just turning crazy with that issue. I spent like over 8 hours on it researching and testing all solutions I have found in forums.
Another issue of mine: my COLORED cover page is turned into a black & white page when I open my eBook in KindlePreviewer. Who will be the magician helping tring to find a work-around? |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
create TOC for every X pages | omegauo | Conversion | 0 | 03-21-2011 01:45 AM |
Create Newspaper TOC | plantoschka | Kindle Formats | 2 | 09-09-2010 02:03 PM |
Txt to Epub: how to create a toc | nestol | Calibre | 0 | 08-09-2010 08:56 PM |
How to create a TOC from scratch? | greenapple | Sigil | 5 | 06-01-2010 02:20 AM |
How to create linked TOC? | squawker | Sony Reader | 1 | 03-04-2007 08:20 AM |