docbook-apps

  • 1.  RE: [docbook] PDF :: programlisting overflow

    Posted 09-12-2008 17:26
    > -----Original Message-----
    > From: Michael Schmalle
    >
    > I have an example that is about 200 lines long and it looks
    > terrible in the pdf. The source code is overlapping the top
    > of the page and the section title.
    >
    > It looks as though the listing is anchored to the bottom of
    > the page and the source actually overflows the top of the
    > page. Kinda backwards from what I would expect.
    >
    > code:
    >
    > <example>
    >
    > <programlisting ><textobject><textdata
    > entityref="white-board.mxml"/></textobject></programlisting>
    > </example>


    [Moving to docbook-apps, which is the appropriate list for stylesheet
    issues]

    It's hard to be sure, but it might be enough to add a processing
    instruction, as follows:

    <example>


    <programlisting ><textobject><textdata
    entityref="white-board.mxml"/></textobject></programlisting>
    </example>

    For more information, see
    http://www.sagehill.net/docbookxsl/PageBreaking.html

    Mauritz





  • 2.  RE: [docbook-apps] RE: [docbook] PDF :: programlisting overflow

    Posted 09-12-2008 20:09
    I believe this is because DocBook tries to keep all the contents of an <example> on a single page by default. I had this problem recently, and here is what Bob said:

    ***********
    Actually, this would be a feature, to automatically keep each example together on a page. Doesn't work well for long examples, though.

    The FO stylesheets have an attribute-set in the 1.74 stylesheets for examples called "example.properties", which by default inherits properties from the "formal.object.properties" attribute-set, which includes a keep-together attribute. Your customization layer could turn it off for examples using:

    <xsl:attribute-set name="example.properties">
    <xsl:attribute name="keep-together.within-column="auto"/>
    </xsl:attribute-set>

    *************

    HTH!
    cheri

    -----Original Message-----
    From: Mauritz Jeanson [mailto:mj@johanneberg.com]
    Sent: Friday, September 12, 2008 10:26 AM
    To: 'Michael Schmalle'; docbook-apps@lists.oasis-open.org
    Subject: [docbook-apps] RE: [docbook] PDF :: programlisting overflow

    > -----Original Message-----
    > From: Michael Schmalle
    >
    > I have an example that is about 200 lines long and it looks
    > terrible in the pdf. The source code is overlapping the top
    > of the page and the section title.
    >
    > It looks as though the listing is anchored to the bottom of
    > the page and the source actually overflows the top of the
    > page. Kinda backwards from what I would expect.
    >
    > code:
    >
    > <example>
    >
    > <programlisting ><textobject><textdata
    > entityref="white-board.mxml"/></textobject></programlisting>
    > </example>


    [Moving to docbook-apps, which is the appropriate list for stylesheet
    issues]

    It's hard to be sure, but it might be enough to add a processing
    instruction, as follows:

    <example>


    <programlisting ><textobject><textdata
    entityref="white-board.mxml"/></textobject></programlisting>
    </example>

    For more information, see
    http://www.sagehill.net/docbookxsl/PageBreaking.html

    Mauritz



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org