docbook-apps

  • 1.  epub for mobipocket: image dimensions?

    Posted 01-04-2011 04:11
    Hi, there. I'm trying to produce an epub which can be submitted to
    Amazon's ebook store (and renders as mobipocket). I've been going
    through Joshua Tallent's book about Kindle formatting and reading
    through all the kludges needed to get images to render properly.

    Specifically for smaller images in Kindle/Mobipocket, they recommend
    specifying image dimensions in attributes for the IMG tag (i.e.,
    height="", width="") in order to prevent the images from blowing up.
    Yikes!

    If you wanted to output an image HTML element that contains these
    attributes, what do they think would be the easiest way to get these
    attributes? I don't mind hardcoding the dimensions if necessary; in
    fact, that sounds easier than using the graphic size extension. Even
    if I could get it to work in Saxon, that would not help me to render
    them in db2epub.py (which uses lxml to render the XSLT).

    Anyway, it would be much easier to hardcode the dimensions. Any ideas
    about how this might be done?

    Thanks.

    --
    Robert Nagle
    12777 Ashford Point Dr #1417
    Houston, Texas 77082
    713 893 3424
    http://www.robertnagle.info



  • 2.  Re: [docbook-apps] epub for mobipocket: image dimensions?

    Posted 01-05-2011 18:48
    On Mon, Jan 3, 2011 at 8:10 PM, Robert Nagle <idiotprogrammer@gmail.com> wrote:
    > If you wanted to output an image HTML element that contains these
    > attributes, what do they think would be the easiest way to get these
    > attributes?

    My guess is that the easiest way is with @contentwidth and
    @contentdepth attributes, following
    http://www.docbook.org/tdg/en/html/imagedata.html and
    http://www.sagehill.net/docbookxsl/ImageSizing.html


    Keith



  • 3.  Re: [docbook-apps] epub for mobipocket: image dimensions?

    Posted 01-05-2011 21:41
    Aha, problem solved. Horray!

    In fact, I had already given values for the contentdepth and
    contentwidth attributes.

    But i had an extra parameter enabled which I shouldn't have.

    ignore.image.scaling will tell Docbook to ignore contentwidth and
    contentdepth information for html/xhtml output. Which sorta makes
    sense.


    Robert

    On Wed, Jan 5, 2011 at 12:48 PM, Keith Fahlgren <abdelazer@gmail.com> wrote:
    > On Mon, Jan 3, 2011 at 8:10 PM, Robert Nagle <idiotprogrammer@gmail.com> wrote:
    >> If you wanted to output an image HTML element that contains these
    >> attributes, what do they think would be the easiest way to get these
    >> attributes?
    >
    > My guess is that the easiest way is with @contentwidth and
    > @contentdepth attributes, following
    > http://www.docbook.org/tdg/en/html/imagedata.html and
    > http://www.sagehill.net/docbookxsl/ImageSizing.html
    >
    >
    > Keith
    >



    --
    Robert Nagle
    12777 Ashford Point Dr #1417
    Houston, Texas 77082
    713 893 3424
    http://www.robertnagle.info