docbook-apps

  • 1.  Admonitions in .epub documents?

    Posted 07-13-2010 06:16
    I've been trying to get admonitions working in Docbook 5 / epub output
    files without any success. All that I get in .epub files is a blank
    space where the admonition should be.

    They are generated for PDF, HTML books, and CHM files without any
    problems. I'm just using the docbook.xsl stylesheet included within
    docbook-xsl-ns-1.75.2.zip.

    Is there anything special I need to do? The xsl only appears to have
    settings for callouts.

    Thanks,

    Glenn



  • 2.  Re: [docbook-apps] Admonitions in .epub documents?

    Posted 07-13-2010 21:07
    On Mon, Jul 12, 2010 at 11:15 PM, Glenn McDonald <gmcdonald@vividas.com> wrote:
    >  I've been trying to get admonitions working in Docbook 5 / epub output
    > files without any success. All that I get in .epub files is a blank space
    > where the admonition should be.

    What is an example of some of the markup that's being dropped?


    Keith



  • 3.  Re: [docbook-apps] Admonitions in .epub documents?

    Posted 07-13-2010 23:21
    Hi Keith,

    The html files that are generated for .epub have no links to the images
    themselves.

    For example, in my (working) html book, in a particular generated html
    file I get:

    src="images/note.png">Note

    Whereas for the epub conversion, in the generated html file I get:

    Note



    Note the img src is completely missing.

    Glenn

    On 14/07/2010 7:07 AM, Keith Fahlgren wrote:
    > On Mon, Jul 12, 2010 at 11:15 PM, Glenn McDonald<gmcdonald@vividas.com> wrote:
    >> I've been trying to get admonitions working in Docbook 5 / epub output
    >> files without any success. All that I get in .epub files is a blank space
    >> where the admonition should be.
    > What is an example of some of the markup that's being dropped?
    >
    >
    > Keith



  • 4.  Re: [docbook-apps] Admonitions in .epub documents?

    Posted 07-15-2010 03:53
    On Tue, Jul 13, 2010 at 4:20 PM, Glenn McDonald <gmcdonald@vividas.com> wrote:
    > The html files that are generated for .epub have no links to the images
    > themselves.

    Sorry, would you please clarify what DocBook is producing that HTML
    and what version of the DocBook-XSL stylesheets your using? (I'm not
    able to duplicate it with the current SVN trunk & a guess at the
    markup.)


    Thanks,
    Keith



  • 5.  Re: [docbook-apps] Admonitions in .epub documents?

    Posted 07-15-2010 04:21
    Sure thing.

    I am using the epub/docbook.xsl from the package docbook-xsl-ns-1.75.2.zip

    Here is an example of my docbook xml:


    <book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
    <info>

    <pubdate>2010</pubdate>
    <copyright>
    <year>2010</year>
    <holder>Me</holder>
    </copyright>
    </info>
    <chapter>

    <para>This is a test for Admonitions</para>
    <note><para>This is a note</para></note>
    <tip><para>This is a tip</para></tip>
    <important><para>This is important</para></important>
    <warning><para>this is a warning</para></warning>
    </chapter>
    </book>

    And here is the output generated for ch01.xml:


    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">










    The OPF manifest does not link to any admonition images:

    <manifest>
    <item id="ncxtoc" media-type="application/x-dtbncx+xml" href="toc.ncx"/>
    <item id="htmltoc" media-type="application/xhtml+xml" href="bk01-toc.html"/>
    <item id="d0e12" href="ch01.html" media-type="application/xhtml+xml"/>
    </manifest>

    On 15/07/2010 1:52 PM, Keith Fahlgren wrote:
    > On Tue, Jul 13, 2010 at 4:20 PM, Glenn McDonald<
    gmcdonald@vividas.com> wrote:
    >> The html files that are generated for .epub have no links to the images
    >> themselves.
    > Sorry, would you please clarify what DocBook is producing that HTML
    > and what version of the DocBook-XSL stylesheets your using? (I'm not
    > able to duplicate it with the current SVN trunk& a guess at the
    > markup.)
    >
    >
    > Thanks,
    > Keith



  • 6.  Re: [docbook-apps] Admonitions in .epub documents?

    Posted 07-15-2010 04:53
    On Wed, Jul 14, 2010 at 9:21 PM, Glenn McDonald <gmcdonald@vividas.com> wrote:
    > I am using the epub/docbook.xsl from the package docbook-xsl-ns-1.75.2.zip

    Are you using a customization layer that sets the admon.graphics parameter to 1?

    > The OPF manifest does not link to any admonition images:

    Yes, that's a known bug:
    http://sourceforge.net/tracker/?func=detail&aid=2849681&group_id=21935&atid=373747


    Keith



  • 7.  Re: [docbook-apps] Admonitions in .epub documents?

    Posted 07-15-2010 05:25
    Thanks Keith,

    Aha - I assumed they would be enabled by default. Interestingly, though,
    when I set the following:

    <xsl:param name="admon.graphics">1</xsl:param>
    <xsl:param name="admon.graphics.path">images/colorsvg/</xsl:param>
    <xsl:param name="admon.graphics.extension">.svg</xsl:param>

    The epub reader (Adobe Digital Editions in my case) is displaying the
    admonition graphic indented (as expected) but the admonition text is
    centered in the page. It should be next to the admonition graphic.

    i.e.

    [TAB][image][centeredText]

    instead of

    [TAB][image][leftAlignedText]

    When admon.graphics are disabled, the admonition text is correctly
    left-aligned.

    Output of the disabled admonition graphics:

    Note

    This is a note



    Output of the enabled admonition graphics:

    align="center" valign="top">src="images/colorsvg/note.svg"/>align="left">Note

    This is
    a note



    Glenn

    On 15/07/2010 2:53 PM, Keith Fahlgren wrote:
    > On Wed, Jul 14, 2010 at 9:21 PM, Glenn McDonald<gmcdonald@vividas.com> wrote:
    >> I am using the epub/docbook.xsl from the package docbook-xsl-ns-1.75.2.zip
    > Are you using a customization layer that sets the admon.graphics parameter to 1?
    >
    >> The OPF manifest does not link to any admonition images:
    > Yes, that's a known bug:
    > http://sourceforge.net/tracker/?func=detail&aid=2849681&group_id=21935&atid=373747
    >
    >
    > Keith



  • 8.  Re: [docbook-apps] Admonitions in .epub documents?

    Posted 07-15-2010 05:33
    On Wed, Jul 14, 2010 at 10:25 PM, Glenn McDonald <gmcdonald@vividas.com> wrote:
    > The epub reader (Adobe Digital Editions in my case) is displaying the
    > admonition graphic indented (as expected) but the admonition text is
    > centered in the page. It should be next to the admonition graphic.

    Interesting. EPUB requires strict conformance to XHTML 1.1, which
    makes table-based layouts (inherited from DocBook-XSL's aging html/
    output) like the above unattractive or invalid. In particular, I
    suspect an EPUB validator would complain about your @align attributes.
    I suspect it's this that's causing ADE the problems, but who knows
    (that rendering engine is known to be eccentric).



    Keith



  • 9.  Re: [docbook-apps] Admonitions in .epub documents?

    Posted 07-15-2010 05:46
    You are correct - Calibre renders the admonitions and text correctly.
    Thanks for the heads up on ADE being eccentric!

    epubcheck doesn't complain about the align attribs, FYI :)

    Thanks a lot for your help Keith.

    Glenn


    On 15/07/2010 3:32 PM, Keith Fahlgren wrote:
    > On Wed, Jul 14, 2010 at 10:25 PM, Glenn McDonald<gmcdonald@vividas.com> wrote:
    >> The epub reader (Adobe Digital Editions in my case) is displaying the
    >> admonition graphic indented (as expected) but the admonition text is
    >> centered in the page. It should be next to the admonition graphic.
    > Interesting. EPUB requires strict conformance to XHTML 1.1, which
    > makes table-based layouts (inherited from DocBook-XSL's aging html/
    > output) like the above unattractive or invalid. In particular, I
    > suspect an EPUB validator would complain about your @align attributes.
    > I suspect it's this that's causing ADE the problems, but who knows
    > (that rendering engine is known to be eccentric).
    >
    >
    >
    > Keith