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] Centering lines of text in FO output


Bob
No it doesn't have to be a para, in fact preferably not.  As I saw 
it, the problem with literallayout is that it is 'literal' and I 
thought I had to count spaces etc. so that if I change page size 
that's a hassle.  Setting it up as a table I have to use negative 
row-heights (which is illegal, but works OK with XEP) and there is 
more code than content and I have to juggle to get it out of the LOT.

Are you suggesting I set up PI to handle a pseudo-attribute?

Would something like this do it:

<literallayout> <?dbfo-justification role="centered" ?>
    line 1
    a longer line 2
    etc
</literallayout>

with, in the customization layer:

<xsl:variable name="role">
   <xsl:call-template name="dbfo-attribute">
     <xsl:with-param name="pis"
            select="ancestor-or-self::entry/processing-instruction('dbfo')" />
     <xsl:with-param name="attribute" select="'role'" />
   </xsl:call-template>
</xsl:variable>

<xsl:attribute-set name="verbatim.properties">
   <xsl:attribute name="role">
     <xsl:choose>
       <xsl:when test="processing-instruction('dbfo-justification')">
         <xsl-value-of select="processing-instruction('dbfo-justification')" />
       </xsl:when>
       <xsl:otherwise>inherit</xsl:otherwise>
     </xsl:choose>
   </xsl:attribute>
</xsl-attribute-set>

I can't see how the centering gets applied.  Sorry, I'm trying to 
hack some code together without really understanding it.

Ron

>>>  Bob wrote:
Does it have to be a para?  The processing expectations for para are 
to flow the text into the available space, not preserve line endings. 
Your example looks like a literallayout, where line endings are 
preserved.  With a role attribute on the literallayout you could 
customize the attributes in the 'verbatim.properties' attribute-set 
to add a centering property.
<<<

-- 
Ron Catterall, Phd, DSc			        	email: 
ron@catterall.net
Prolongacion de Hidalgo 140				http://catterall.net/
San Felipe del Agua					tel: +52 951 520 1821
Oaxaca      68020	Mexico				fax: +1 530 348 8309


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