docbook-apps

  • 1.  re: Generated epub to mobi - lists are incorrectly displayed

    Posted 10-28-2011 15:51
    this may or may not be related to your issue with mobipocket
    massacring your lists.

    One quirk of Docbook is that it adds a P tag into every LI element.
    Mobipocket especially does not like that.

    So you should verify that the html code you posted

    is what actually is in the epub output. My guess is that you
    didn't notice that there was actually another p tag inside each

  • tag in the epub file.

    Here was Bob's solution to that -- previously posted on the list -- to
    strip the p tag from the LI element

    <xsl:template match="orderedlist/listitem/para
    [count(preceding-sibling::*) = 0 and count(following-sibling::*) =
    0]">
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="itemizedlist/listitem/para
    [count(preceding-sibling::*) = 0 and count(following-sibling::*) =
    0]">
    <xsl:apply-templates/> </xsl:template>

    If that is not the problem, I'm guessing that there is some conflict
    in the epub output which is triggering something crazy by kindlegen
    and calibre. Perhaps you have declared some stylesheet in paragraph
    spacing or line spacing css which is being incorrectly translated to
    an extra line. YOu can verify that by temporarily changing the css to
    blank and seeing what happens.

    But I'm pretty sure the first solution I suggested is right.

    --
    Robert Nagle
    6121 Winsome Ln #56C, Houston TX 77057-5581
    (H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010
    http://www.robertnagle.info



    ***************************************
    ubject: Generated epub to mobi - lists are incorrectly displayed

    From: Lars Vogel <lars.vogel@googlemail.com>
    To: DocBook Apps <docbook-apps@lists.oasis-open.org>
    Date: Fri, 28 Oct 2011 16:38:05 +0200

    Hello,

    this might be the wrong list to ask the following question, if that is
    the case I'm sorry.

    I'm generating epubs via Docbook and the epub XSLT stylesheets. If I
    convert them to mobipocket for the Kindle lists are incorrectly
    displayed.

    • Hello


    The dot is in one line and the text in another. Screenshot attached.

    I tried kindlegen and Calibre.

    Anyone know how to solve this?

    Best regards, Lars
    --
    Lars
    http://www.vogella.de - Eclipse, Android and Java Tutorials
    http://www.twitter.com/vogella - Lars on Twitter

    Attachment: epubtomobi_result.png
    Description: PNG image



  • 2.  Re: Generated epub to mobi - lists are incorrectly displayed

    Posted 10-28-2011 18:34
    Hello Robert,

    super cool. Thank you very much. This did solve my display problem with the
    list.

    Best regards, Lars

    2011/10/28 Robert Nagle <idiotprogrammer@gmail.com>

    > this may or may not be related to your issue with mobipocket
    > massacring your lists.
    >
    > One quirk of Docbook is that it adds a P tag into every LI element.
    > Mobipocket especially does not like that.
    >
    > So you should verify that the html code you posted

    • >
    is what actually is in the epub output. My guess is that you
    > didn't notice that there was actually another p tag inside each

  • > tag in the epub file.
    >
    > Here was Bob's solution to that -- previously posted on the list -- to
    > strip the p tag from the LI element
    >
    > <xsl:template match="orderedlist/listitem/para
    > [count(preceding-sibling::*) = 0 and count(following-sibling::*) =
    > 0]">
    > <xsl:apply-templates/>
    > </xsl:template>
    > <xsl:template match="itemizedlist/listitem/para
    > [count(preceding-sibling::*) = 0 and count(following-sibling::*) =
    > 0]">
    > <xsl:apply-templates/> </xsl:template>
    >
    > If that is not the problem, I'm guessing that there is some conflict
    > in the epub output which is triggering something crazy by kindlegen
    > and calibre. Perhaps you have declared some stylesheet in paragraph
    > spacing or line spacing css which is being incorrectly translated to
    > an extra line. YOu can verify that by temporarily changing the css to
    > blank and seeing what happens.
    >
    > But I'm pretty sure the first solution I suggested is right.
    >
    > --
    > Robert Nagle
    > 6121 Winsome Ln #56C, Houston TX 77057-5581
    > (H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010
    > http://www.robertnagle.info
    >
    >
    >
    > ***************************************
    > ubject: Generated epub to mobi - lists are incorrectly displayed
    >
    > From: Lars Vogel <lars.vogel@googlemail.com>
    > To: DocBook Apps <docbook-apps@lists.oasis-open.org>
    > Date: Fri, 28 Oct 2011 16:38:05 +0200
    >
    > Hello,
    >
    > this might be the wrong list to ask the following question, if that is
    > the case I'm sorry.
    >
    > I'm generating epubs via Docbook and the epub XSLT stylesheets. If I
    > convert them to mobipocket for the Kindle lists are incorrectly
    > displayed.
    >
    >
    • Hello

    >
    > The dot is in one line and the text in another. Screenshot attached.
    >
    > I tried kindlegen and Calibre.
    >
    > Anyone know how to solve this?
    >
    > Best regards, Lars
    > --
    > Lars
    > http://www.vogella.de - Eclipse, Android and Java Tutorials
    > http://www.twitter.com/vogella - Lars on Twitter
    >
    > Attachment: epubtomobi_result.png
    > Description: PNG image
    >



    --
    Lars
    http://www.vogella.de - Eclipse, Android and Java Tutorials
    http://www.twitter.com/vogella - Lars on Twitter