10 Replies Latest reply on Jul 19, 2011 8:41 PM by GoldCountry86

    Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub

    GoldCountry86

      Help! My Paragraph Styles won't behave!

       

      Trying to design and export my first eBook to ePub in InDesign CS5.5. It's not a complicated document. A cover and title/copyright page, followed by one long story.  I've created a handful of styles, two for paragraphs, two for titles, a copyright style, etc. They look exactly the way they should in the InDesign document, and I've attached tags and classes to them in Style Options, but when they export to ePub or html they go weird on me. One of the Paragraph Styles blows up to h1. The title won't center and is the size of paragraph text, and so forth.

       

      Another weird thing, the export tags don't want to stay put. When I bring up "Edit all Export Tags," the export tags change. What was h1 is now h3, or a style that was h2 is now h4. In addition, the wrong classes suddenly jump and attach themselves to the wrong style. Nor is it consistent. The changes are different each time I open "Edit all Export Tags."

       

      Just so you know what I've already checked:

       

      Opened content in Story Editor. All styles appear to be correctly assigned. I've gotten rid of the (+) next to any styles in all paragraphs. No extraneous, unused paragraph styles. Green light instead of red light in the Error Panel. All content showing as it should in the Articles Panel. Have run script for prepping text so that italics and other local formatting doesn't interfere. In the Export Panel, the CSS Styles and Include Paragraph Styles boxes are checked.

       

      Not sure what's going wrong. Anyone have an idea?

       

      UPDATE: Just opened a brand new document and created two Paragraph Styles, basing one on the other and attaching a class name to the second style. Typed in fresh text. Did not Place. Looked great until I opened up the "Edit all Export Tags." Sure enough, the export tags had changed and the class on the second had jumped to the first.

        • 1. Re: Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub
          BobLevine MVP & Adobe Community Professional

          Without seeing the file, no.

           

          What I can tell you is that I just used CS5.5 to create an Epub and every style mapped exactly the way I wanted it to.  I'd also be quite curious why you need classes with that few paragraph styles. There should be no need at all for them.

           

          Bob

          • 2. Re: Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub
            GoldCountry86 Level 1

            Thanks for the answer, Bob. Much appreciated.

             

            Okay, when I said a handful, I meant seven. Not a lot, but the way I was taught to do ePubs and CSS, when you have two styles that will be using the same tag, say <p> and <p> with extra formatting, in this case extra bottom margin space, you have to assign a class to one of them so that each renders correctly. I'm not sure how an eBook reader or any other device using html/css is supposed to tell the difference between two <p> tags without a class?

             

            Following your suggestion, however, I opened up a fresh document, created two simple paragraph styles, no classes, and exported to ePub. Both styles looked identical in the ePub document, every paragraph had extra margin space at the bottom. Not only that, but when I opened the Style Options for each Style, ID had assigned each style a class, the same class, one I had created with a totally different name two documents before!

            • 3. Re: Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub
              BobLevine MVP & Adobe Community Professional

              The main p tag should not have a class. There's simply no reason for it.

               

              If there's something unique about the other you can do it in the css. For example, if you wanted the first p tag after a heading to be different in some way you could create a CSS rule for h1+p.

               

              The fewer classes you use the better.

               

              Bob

              • 4. Re: Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub
                GoldCountry86 Level 1

                Sorry, didn't mean to be confusing. I didn't make the main Paragraph Style have a class. Only the second one with the extra formatting. Not really sure what is meant by h1+p, but will try to figure it out. Thank you. I do appreciate your response.

                 

                For what it's worth, in going through the courses on ePub and Kindle at Lynda.com, both Anna-Marie Concepcion and James Fritz are showing viewers classes in CSS when creating ePub documents. It seemed pretty straight forward and was working for them. I really liked that supposed functionality in InDesign—if it can be made to work—and don't know why it shouldn't be used. My experience with CSS, and granted I'm a professional photographer, not a web designer, comes from designing websites and creating classes for different variations of a standard tag.

                • 5. Re: Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub
                  StirlingEditor2

                  Did you ever get this figured out, GoldCountry? I'm very very new to "classes." I just had a very similar problem with export tagging. I tried to do an export tag for each style of mine, but I ended up having to change some of them back to Automatic instead of a "p" or "h" tag, because it was rendering incorrectly in the epub.

                   

                  For example,

                  I had a couple of styles for my book title page that needed to be centered. When I changed them to either a paragraph or header tag, it would simply change to either P (body-text) style or H1 (chapter-head) style. Took me a while to figure out it was the export tagging. So now I'm trying to understand how to use classes. Are these class names something I can make up on my own? Or do I have use pre-defined class names from some kind of CSS god somewhere?

                   

                  For example:

                  I have body-text which is "p."

                  If I have body-text that I want to center with no other style changes, can I name that body-text-center?

                   

                  If I can do this class naming outside of CSS in the epub, I'd really like to, as I prefer to stay out of the xhtml files if possible.

                   

                  I hope it's okay to post my own question here in this thread since it's such a similar issue. *bites lip*

                  • 6. Re: Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub
                    BobLevine MVP & Adobe Community Professional

                    You cannot, IMO, successfully work on EPUBs and stay out of the XHTML (and CSS)

                     

                    IMO, the fewer classes you have the better. Map to styles to appropriate tags and then handle the styling in the CSS. For  the occasional different type of paragraph you can even map the paragraph style to blockquote and then define the blockquote property in the CSS.

                     

                    Bob

                    • 7. Re: Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub
                      StirlingEditor2 Level 1

                      Hi Bob,

                      Have you worked with the classes within ID CS5.5's export tagging feature and found them lacking or buggy? I'm unfortunately working on a tight deadline, and know zilch about classes, either within ID's export tagging or in the CSS/xhtml. I'm trying to figure out the best way to do this fast with the minimal knowledge I have. =(

                       

                      Just a general question: are classes something I name myself? Or is there some kind of cheat sheet for standard naming somewhere?

                      • 8. Re: Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub
                        [Jongware] Most Valuable Participant

                        A class is to a HTML paragraph what a paragraph style is to an InDesign paragraph. (A span is the equivalent of a character style.)

                         

                        By default, classes are named after your paragraph styles -- they do get renamed, though, to conform to some space-less form --, and get listed in the css file that gets exported along with the HTML. Adjusting the CSS should be done in this file. However, working with CSS is certainly not easy.

                         

                        StirlingEditor2 wrote:

                        I'm unfortunately working on a tight deadline, and know zilch about classes, either within ID's export tagging or in the CSS/xhtml. I'm trying to figure out the best way to do this fast with the minimal knowledge I have. =(

                         

                        Then you certainly have a problem.

                         

                        Googling for "CSS" will tell you more than can be taught in three, twelve, or twenty-five follow up mails.

                        • 9. Re: Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub
                          StirlingEditor2 Level 1

                          Thank you Jongware and Bob for your responses. I really appreciate your help and will do my best to learn the CSS I need to make my project look professional.

                          • 10. Re: Help! CS5.5 Paragraph Styles Corrupting when Exporting to ePub
                            GoldCountry86 Level 1

                            Just wanted to bring everyone up-to-date on the problem I was having with classes and export tagging.

                             

                            Finally figured out that when exporting to ePub, the export tagging and classes will stay put the way you assign them IF you set-up your original document as a print document vs. a web document. Set up as a web document and they go completely wacky.

                             

                            And yes, you most likely will have to unzip the ePub document and mess around in the XHTML/HTML and CSS files. You may even have to fix the opf file on occasion. I know that I have had to work on all three.