5 Replies Latest reply on Feb 9, 2012 7:02 AM by BobLevine

    How do I prevent unwanted paragraph style overrides when exporting an epub

    alanwmjones Level 1

      I am having trouble controlling the size of a  logo in an e-pub. Actually, it's only a problem with Amazon's Kindle which seems to insist on enlarging the image to the full screen width. So, I need a robust command in my CSS to override Kindle's preference. Seems easy. I placed the logo into my In Design layout in a picture box with the object style "frontmatterlogo" which should export into a div of the same name. Which it does. So far so good. However, In Design insists on creating a paragraph style override (see bold in the code below) which disregards the  frontmatterlogo settings I've written in to my CSS in favour of it's own image settings which correspond to the size of the placed image. Currently, I've just put together a hacked solution by writing a class for para-style-override into my CSS. It's an inelegant solution but seems to work for all the other e-readers. But, as mentioned, it doesn't work on the Kindle.

       

      Anyone have any idea what is causing these overrides and how I might prevent them so my div class can take over?

       

      Alan

       

       

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml">

          <head>

              <title>Titlepage2-1.html</title>

              <link href="template.css" rel="stylesheet" type="text/css"/>

          </head>

          <body>

              <div id="Titlepage2-1.html" xml:lang="en-US">

                  <div class="story">

                      <p class="Pagebreak"/>

                      <h1 class="fulltitle">Far North</h1>

                      <h2 class="author">MARCEL THEROUX</h2>

                  </div>

                  <div class="frontmatterlogo">

                      <p class="para-style-override-1">

                          <img width="191" height="19" src="images/HarperPerennialClassic_fmt.jpeg" alt="HarperPerennialClassicsLogo.jpg"/>

                      </p>

                  </div>

              </div>

          </body>

      </html>

        • 1. Re: How do I prevent unwanted paragraph style overrides when exporting an epub
          BobLevine MVP & Adobe Community Professional

          What version of InDesign? Is the logo an anchored object?

           

           

           

          That being said, the easiest thing to do is edit the markup.

           

           

           

          Bob

          • 2. Re: How do I prevent unwanted paragraph style overrides when exporting an epub
            alanwmjones Level 1

            Thanks for getting back so quickly, Bob.

             

            I'm using Version 5.5. I have basically the same problem when the object is anchored. In the case below, I created a new paragraph style for the line on which the logo would be anchored, also mapping to the frontmatterlogo entry in my CSS. This time, no paragraph-style-override is added but In Design still adds it's own image dimensions corresponding to the size at which the image was placed in the layout. This overrides the settings in my CSS and, I suspect, might be what's allowing the Kindle settings to take over as well. I had kind of resigned myself to fixing this in the code  on a book by book basis, which is fine if the only images the book contains is a cover and a title page logo. But I'm worried about what happens when I have to create an e-pub from a photo-heavy book. You can see how it would be ideal to create a few specific object styles for different image situations in In Design and have them map them to specific div styles in my CSS. Basically it's a workflow issue. This would minimize the amount of after-the-fact coding our already swamped designers would have to do.

             

            It's so obvious in the code where the problem lies, and so I just have a feeling that there may be a simple fix. If only I knew why In Design felt obliged to specify the image size.

             

            A.

             

             

            <?xml version="1.0" encoding="UTF-8" standalone="no"?>

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

            <html xmlns="http://www.w3.org/1999/xhtml">

                <head>

                    <title>Titlepage2-1.html</title>

                    <link href="template.css" rel="stylesheet" type="text/css"/>

                </head>

                <body>

                    <div id="Titlepage2-1.html" xml:lang="en-US">

                        <div class="story">

                            <p class="Pagebreak"/>

                            <h1 class="fulltitle">Far North</h1>

                            <h2 class="author">MARCEL THEROUX</h2>

                            <p class="frontmatterlogo"><img class="frontmatterlogo" width="196" height="20" src="images/HarperPerennialClassic_fmt.jpeg" alt="HarperPerennialClassicsLogo.jpg"/></p>

                        </div>

                    </div>

                </body>

            </html>

            • 3. Re: How do I prevent unwanted paragraph style overrides when exporting an epub
              BobLevine MVP & Adobe Community Professional

              CS5.5 dramatically improved EPUB export but it certainly didn’t perfect it.

               

               

               

              Bob

              • 4. Re: How do I prevent unwanted paragraph style overrides when exporting an epub
                alanwmjones Level 1

                Agreed. And I guess it's a touch of laziness on my part, wanting to have In Design do all the work.

                 

                Thanks for your input on this. I'll keep tinkering and see if I can't blindly hit on an answer through trial and error.

                 

                A.

                • 5. Re: How do I prevent unwanted paragraph style overrides when exporting an epub
                  BobLevine MVP & Adobe Community Professional

                  As you say, this is only happening on the Kindle.

                   

                   

                   

                  Have you checked out Liz Castro’s blog? I’m not sure if she’s discussed this at all but it’s worth visiting there: http://www.pigsgourdsandwikis.com/

                   

                   

                   

                  Bob

                  1 person found this helpful