Hi,
you can use the monospace.verbatim.properties attribute set to specify the font 
size of programlisting.
See 
http://docbook.sourceforge.net/release/xsl/current/doc/fo/monospace.verbatim.properties.html
 
For more information see 
http://www.sagehill.net/docbookxsl/FittingText.html#ReduceFontSize 
You can do for example something like this:
  <xsl:attribute-set name="monospace.properties">
    <xsl:attribute name="font-size">
      <xsl:choose>
        <xsl:when test="self::programlisting">8pt</xsl:when>
        <xsl:otherwise>10pt</xsl:otherwise>
      </xsl:choose>
    </xsl:attribute>
  </xsl:attribute-set>

Regards,
Pavel ?kop?k

-----Original Message-----
From: xmleditor-support-bounces at xmlmind.com 
[mailto:[email protected]] On Behalf Of Rishi Khan
Sent: Tuesday, September 23, 2008 6:18 PM
To: Skopik Pavel
Cc: xmleditor-support at xmlmind.com; Chris Taylor
Subject: Re: [XXE] tables

I have a similar problem with programlistings, but I would like to  
decrease the font size rather than wrap to the next line (the program  
listing displays code that is lined up with monospaced characters  
like a table and it looks terrible if it wraps).

Any ideas on how to do that?
Basically, I want the final PDF to show a smaller font size for just  
that programlisting alone.

Rishi

On Sep 23, 2008, at 3:07 AM, Skopik Pavel wrote:

>
> "I also have some 'programlisting' entries that are a little too width
> for the pdf. The pdf is not wrapping the text around. Is there a  
> setting
> in the attributes to allwo text wrapping according to width?"
>
> Hello,
> you can use these parameters in you DocBook XSL customization layer  
> to turn on hyhphenating verbatim environments and to specify list  
> of additional characters after which line break is allowed:
> http://docbook.sourceforge.net/release/xsl/current/doc/fo/ 
> hyphenate.verbatim.html
> http://docbook.sourceforge.net/release/xsl/current/doc/fo/ 
> hyphenate.verbatim.characters.html
>
> I use these with XEP and it all works fine. But I have no  
> experience with FOP though.
>
> Regards,
> Pavel ?kop?k
>
> --
> XMLmind XML Editor Support List
> xmleditor-support at xmlmind.com
> http://www.xmlmind.com/mailman/listinfo/xmleditor-support
>

 
--
XMLmind XML Editor Support List
xmleditor-support at xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to