This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Messy FOP


Probably because that would also apply to inline monospace tags (like
literal).  Then you'd end up with <fo:inline/> elements where you're trying
to set alignment (a block attribute).  Again, something that could easily
confuse FOP.

Jeff Beal
Ansys, Inc.
(724)514-3150
jeff.beal@ansys.com

-----Original Message-----
From: Harm Kok [mailto:h.kok@diderottrack.nl]
Sent: Friday, July 26, 2002 10:34 AM
To: Jeff Beal
Cc: docbook-apps@lists.oasis-open.org
Subject: Re: DOCBOOK-APPS: Messy FOP

Hi Jeff,

The subject title said it all: Messy FOP :-)

I also wrote the same workaround you did but found that setting
text-align="start" on the monospace.verbatim.properties also gave
strange effects (text over text).

Harm

Jeff Beal wrote:

>My guess is that the callouts mess around with the templates enough that
>this override template doesn't get called.  I haven't tested this template
>with any kind of callout.  The only difference between my method and Harm
>Kok's is that the template will only affect your programlistings, the rest
>of your document can still be justified.  Of course, FOP's justification
>doesn't work well in general, so turning it completely off isn't a bad
idea.
>If you want to have your body text justified, though, you'll have to find
>the template that's actually being called for your callouts, and turn
>justification off there.
>
>Jeff Beal
>Ansys, Inc.
>(724)514-3150
>jeff.beal@ansys.com
>
>-----Original Message-----
>From: vnhu38f93 [mailto:vnhu38f93@subdimension.com]
>Sent: Friday, July 26, 2002 9:39 AM
>To: docbook-apps@lists.oasis-open.org
>Subject: Re: DOCBOOK-APPS: Messy FOP
>
>This doesn't seem to work, I put the template in my custom
>layer, is this where I should have put it? because it did
>not
>work.  The other approach suggested by Harm Kok worked, so
>what advantage would this approach confer? which is the
>correct way of going about it?
>
>
> 
>
>>That's a justification issue.  FOP isn't smart enough to
>>   
>>
>turn justification
> 
>
>>off when it's preserving white space.  This template fixes
>>   
>>
>the problem
> 
>
>>(using the 1.50.0 XSL Stylesheets)
>>
>><xsl:template match="programlisting|screen|synopsis">
>>  <xsl:param name="suppress-numbers" select="'0'"/>
>>  <xsl:variable name="vendor"
>>   
>>
>select="system-property('xsl:vendor')"/>
> 
>
>>  <xsl:variable name="id"><xsl:call-template
>>name="object.id"/></xsl:variable>
>>
>>  <xsl:choose>
>>    <xsl:when test="$suppress-numbers = '0'
>>                    and @linenumbering = 'numbered'
>>                    and $use.extensions != '0'
>>                    and $linenumbering.extension != '0'">
>>      <xsl:variable name="rtf">
>>        <xsl:apply-templates/>
>>      </xsl:variable>
>>      <fo:block wrap-option='no-wrap'
>>                white-space-collapse='false'
>>                linefeed-treatment="preserve"
>>             
>>   
>>
>xsl:use-attribute-sets="monospace.verbatim.properties"
> 
>
>>                        text-align="left">
>>        <xsl:call-template name="number.rtf.lines">
>>          <xsl:with-param name="rtf" select="$rtf"/>
>>        </xsl:call-template>
>>      </fo:block>
>>    </xsl:when>
>>    <xsl:otherwise>
>>      <fo:block wrap-option='no-wrap'
>>                white-space-collapse='false'
>>                linefeed-treatment="preserve"
>>             
>>   
>>
>xsl:use-attribute-sets="monospace.verbatim.properties"
> 
>
>>                        text-align="left">
>>        <xsl:apply-templates/>
>>      </fo:block>
>>    </xsl:otherwise>
>>  </xsl:choose>
>></xsl:template>
>>
>>Jeff Beal
>>Ansys, Inc.
>>(724)514-3150
>>jeff.beal@ansys.com
>>   
>>
>_____________________________________________________________________
>// free anonymous email || forums \\ subZINE || anonymous browsing
>            subDIMENSION -- http://www.subdimension.com
> 
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]