OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] RE: [docbook] PDF :: programlisting overflow


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>
>   <title>MXML Example 2</title>
>   <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>
  <?dbfo keep-together="auto"?>
   <title>MXML Example 2</title>
   <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



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]