15 Replies Latest reply: Apr 21, 2013 2:39 PM by marcusstringer RSS

    InDesign 5.5 - EPUB export - Table of Contents weirdness

    ashtangakasha Community Member

      I'm using the latest epub tools in ID5.5 to create a Kindle edition of a fairly simple textbook.

       

      The exported MOBI file works fine in Kindle Viewer, Reader, and actual Kindle 3G. But unfortunately, I can't get a proper TOC -- all 3 readers report "no TOC."

       

      The TOC is generated inside InDesign as expected, and after export to EPUB it's the first page when you open the book, and the links all work. You can jump to the cover picture, and to the "beginning" (which is the TOC, since it's the first page after the cover), but the TOC button is greyed out. In Viewer, the NCX view works as well.

       

      Inside InDesign, the TOC is listed in the Articles panel, in a separate story that contains nothing else. The TOC story is not linked to any other stories.

       

      Shouldn't InDesign export both an NCX TOC and an HTML TOC from the TOC in the document?

       

      After a lot of reading the Kindle Pub Guidelines, and the slim docs  on ID5.5 epub, and a whole lot of experimentation with para styles, doc  structure, and export options, I've been unable to get the dual TOC  required by Kindle (NCX and HTML).

       

      Any info on what I'm missing or doing wrong would be most welcome. I posted this on InDesign Secrets several days ago, but nobody had any ideas.

       

      I can start manually editing the HTML for the EPUB file, but I thought ID was supposed to have this working in 5.5. Is this not the case? If not, is there any documentation on the hand-work one must do to fix ID's EPUB output for Kindle?

       

      Thanks,

       

      Allen

        • 1. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
          Steve Werner CommunityMVP

          If you can't get an answer here (since many of us are still learning to create EPUB and Kindle content), try asking at the MobileRead forums:

           

          http://www.mobileread.com/forums/

           

          I've created EPUB files but haven't yet convert them to Mobi format.

          • 2. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
            ashtangakasha Community Member

            Thanks, Steve. I'll check there.

             

            I discovered that InDesign was creating the TOC as "just another page (chapter) of HTML" and not separating it the way Kindle requires.

             

            I also discovered in replies to other threads on various fora that the content.opf file has to contain something like this:

             

              <guide>
                <reference href="TOC.html" type="toc" title="Table of Contents"/>
              </guide>

             

            ... aftrer the <spine> section at the end of the <package>.

             

            So I excised the actual TOC page from the <spine> section, renamed it in the <manifest> section, and moved it from the Pages folder to the top level folder.

             

            This worked, until I recompiled the EPUB file, and then I started getting href errors because Kindle Viewer (which invokes KindleGen) is finding or creating weird links to some temp folder somewhere and seeking the toc references there. And not finding them, and failing to build the final Kindle TOC.

             

            It is slightly amazing that all this hasn't been sorted out yet. Yes, this is new, but aren't there enough tech people at Adobe to handle it? Fifteen minutes with the right tech person would resolve all these mysteries, and then InDesign could have a Kindle option somewhere in the TOC section of the export dialog.

             

            Allen

            • 3. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
              Steve Werner CommunityMVP

              While EPUB export has been going on for a few years, it's mostly been in the hands of CSS and XHTML techies. It's not been widely exported out of InDesign without a lot of knowledge and a lot of postprocessing.

               

              I'm sure in a couple years, it will be a lot more sorted out. You won't get the kind of help you need for Adobe tech support. Those folks don't really deal with what happens to the files after they're exported.

               

              You'll find it here or on the MobileRead Forum. You'll also find good resources mentioned if you look for previous EPUB postings to the book by Elizabeth Castro, webinars by Gabriel Powell, and Lynda.com videos by Anne-Marie Concepcion. Things are changing very fast and you'll have to do some research and digging to get your answers.

              • 4. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                ashtangakasha Community Member

                Yes, thanks, I've gone through Anne-Marie's Lynda course, which is great, but when 5.5 came out, the whole workflow changed and a lot of what I had just learned was obsolete. And her 5.5 course is still in the pipeline. Hopefully it will cover a complete workflow from ID to Kindle.

                 

                After this much learning and relearning, I think I might have done the whole thing more easily with a good explanation of how to create the raw files. This HTML stuff LOOKS ugly, but with good step-by-step instructions I'm not sure it would be any more confusing than trying to sort out these new "user friendly" tools that are still so rough around the edges.

                 

                I agree about Adobe support -- they seem to let go of the end user just shy of where I still need their help. But if they were to decide that Kindles deserve some explicit support, as they obviously have done for iStuff, it wouldn't really take that big an investment. That said, I really like what Mr Narayan has been doing with the company these last several years. A lot of it is thankless and behind the scenes, but all the apps are coalescing and modernizing and paying more attention to ease of use AND ease of learning. And the eBook market has certainly gotten their attention this year!

                 

                I'm starting to rummage around on MobilRead.com. It appears to range from people who just bought their first eBook reader to serious CSS hackers. Should prove helpful.

                 

                I fixed all the href issues after studying the code for a while, so this project is complete, but I guess I'll have to write a little manual for myself to remember all the little tweaks I had to do to get everything working.

                 

                Thanks for your input,

                 

                Allen

                • 5. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                  Steve Werner CommunityMVP

                  Trust me, I know what you're going through because I am going through it myself.

                   

                  Here's one of the little stumbling blocks I ran into, and overcame with the help of some experts:

                   

                  Creating EPUB in InDesign CS5.5: Beware the WebKit Bug!

                  • 6. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                    ashtangakasha Community Member

                    Yes, I read your generously informative post on the SHY "bug" in epub export.

                     

                    The author of the project I just finished left a few minutes ago. Turns out he had handed me the penultimate version, not the final version. So off we go again! Can't blame ID or Amazon for that...

                     

                    Allen

                    • 7. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                      marcusstringer Community Member

                      ashtangakasha wrote:

                      After this much learning and relearning, I think I might have done the whole thing more easily with a good explanation of how to create the raw files. This HTML stuff LOOKS ugly, but with good step-by-step instructions I'm not sure it would be any more confusing than trying to sort out these new "user friendly" tools that are still so rough around the edges.

                       

                       

                      I'm starting to rummage around on MobilRead.com. It appears to range from people who just bought their first eBook reader to serious CSS hackers. Should prove helpful.

                       

                      Thanks for your input,

                       

                      Allen

                      Here is a step by step write up I did for CS3

                       

                      Although it's for CS3 all the principles and stuff to add are all the same, and I think it's a best outcome for epub

                      it also sets up the epub for kindle (.mobi) conversion.

                      It talks about using the book feature, which I think is the best way, because if the xhtml file goes over 300kb in size you will get errors in you validation.

                       

                      Hope this help and points you in the right direction. If you have any questions, Let me know and I'll try to help you out...

                       

                       

                      http://www.mobileread.com/forums/showthread.php?t=123439

                      • 8. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                        ashtangakasha Community Member

                        Many thanks, Marcus,

                         

                        I'll study your write-up and try building an workflow around 5.5. I see you've updated the post for CS5, so that will help. I've been using the new Articles panel for sequencing things, and it's very convenient if an ID doc is trying to serve both print and e-media. I haven't needed to use Book mode yet, but I'll take a closer look at the pros and cons (for short works; obviously it's mandatory for anything large).

                         

                        Thanks again,

                         

                        Allen

                        • 9. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                          marcusstringer Community Member

                          Steve Werner wrote:

                           

                          Trust me, I know what you're going through because I am going through it myself.

                           

                          Here's one of the little stumbling blocks I ran into, and overcame with the help of some experts:

                           

                          Creating EPUB in InDesign CS5.5: Beware the WebKit Bug!

                          Steve, after reading this post I just had a job come back with this exact issue. It's the only job I have done in 5.5 and the last for now...

                           

                          Thanks for posting this. It saved me hours of research.

                           

                          Thanks...this is me going back to CS3 where everything is greener...

                          • 10. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                            John Hawkinson CommunityMVP

                            Hey, Steve, it's not really very fair to call this a "WebKit bug." It's not a bug! WebKit is just honoring the specification as written! It's simply not allowed to have a &shy; in there. Just bceause some browsers let you do it doesn't mean it's allowed! It's an InDesign bug, plain aind simple.

                            • 11. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                              stevenjs Community Member

                              My workflow is different from yours, since I am not making "an epub for Kindle," but rather generating an epub for whatever devices use them from ID, and then generating a mobi from ID.

                               

                              I too experienced huge frustration trying to get a TOC to work, first in epub, then in mobi. It is obvious ID is still extremely buggy in this regard, but in the end I got a TOC in both formats.

                               

                              For epub, I renamed my ID files as I wanted them to appear in the epub TOC, and did not select the export option for using the ID TOC. I had a separate file for each document in the ID book, including Cover and Title Page etc. The export grabbed all the file names and made a nice navigable index/TOC on the left side.

                               

                              For mobi (Kindle), things were more difficult, as the hyperlink features in ID are untsable and buggy. For the mobi export, I created Anchor Text hyperlink destinations for each document in the book at the start of the document text (not the top of the page, mind you -- ID is exceedinly finicky about a number of things in setting up hyperlinks). Then manually typed and formatted a TOC document (did NOT generate one within ID using Layout>TOC). I then selected each individual item in the TOC document and created New Hyperlink for each, linking to the named Anchors previously set up. Note, I did not have a TOC item for the TOC itself. (I also removed the Cover document from the book to avoid the double cover in mobi.)

                               

                              I found I needed to have all documents open and all selected in the book panel, book synched and saved, to get a successful export with the TOC document showing up active in Kindle, and all links working. Part of ID's instability was that ANY error in the TOC document and its hyperlinks and destination anchors, NONE of the links were navigable in Kindle.And errors would appear in the hyperlink panel for no reason I could guess. Using it was challenging to say the least. ;-)

                               

                              Hope this works for you.

                              • 12. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                                motolola

                                Here is a free ebook conversion tool for you.

                                You can easily convert your ebook from mobi to epub.

                                 

                                Free Online Ebook Converter

                                 

                                It provides you with the best mobi to epub converting experience.

                                • 13. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                                  ashtangakasha Community Member

                                  Thanks motolola,

                                   

                                  I would need epub to AZW3 ideally, or at least epub to MOBI, but as it turns out the latest Export to Kindle plugin from Amazon is working quite well on simple books (e.g., novels), and it gets the TOC right, and provides several handy configuration options in the export dialog.

                                   

                                  Allen

                                  • 14. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                                    shockpuppetslc

                                    I had this exact same problem and this is how I finally fixed it:

                                     

                                    • Built the TOC in InDesign (I actually have two, one for print with the page numbers and one for EPUB, no page numbers).
                                    • Export to EPUB, choose the EPUB table of contents in the export dialog—this will automatically replace the print version that is placed in the document.
                                    • And then — and here's the trick — get the app Sigil and go to Tools > Table of Contents > Create HTML Table of Contents. This will use the same structure to build your TOC and you can edit it super easily (no code knowledge required). Then save this EPUB.

                                     

                                    Now you will have two TOCs — one that works with the Kindle functionality and one that is placed inline in your document. I opted to leave both for reasons that aren't interesting to this thread — but you could create articles for each section and just tell your TOC to not export.

                                     

                                    This is how I was able to have ONE master document that I use for print, interactive PDF and EPUB. I never did find a way for my document that came out of InDesign to get the Kindle TOC functionality working without running it through Sigil. It's an extra step, but really not too bad (beats spending the 6 hours I blew trying to figure it out). Good luck!

                                    • 15. Re: InDesign 5.5 - EPUB export - Table of Contents weirdness
                                      marcusstringer Community Member

                                      You just have to add this line to your Content.opf file to get the TOC working in Kindle:

                                       

                                      </spine>

                                      <guide>

                                                <reference type="cover" title="my-cover-image" href="cover.xhtml"/>

                                                <reference type="toc" title="Table of Contents" href="frontmatter02.xhtml"/>

                                      </guide>

                                      </package>