[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
Thanks Bob, that worked perfectly. Ron > >That property really ought to be in the attribute-set so it can be >more easily changed. > sometime, maybe! >Hi Ron, >I was suggesting that a role attribute on literallayout could be used: > ><literallayout role="SpecialStuff"> >line 1 >a longer line 2 ></literallayout> > >and the stylesheet customization would look like this: > ><xsl:attribute-set name="verbatim.properties"> > <xsl:attribute name="text-align"> > <xsl:choose> > <xsl:when test="@role = 'SpecialStuff'">center</xsl:when> > <xsl:otherwise>start</xsl:otherwise> > </xsl:choose> > </xsl:attribute> ></xsl:attribute-set> > >That should have been sufficient, but it didn't work when I tried >it. Further investigation showed that the template that matches >literallayout adds its own text-align="start" property to the >fo:block, which overrides the attribute-set. Ugh. > >So you have to also customize the template with >match="literallayout" from fo/verbatim.xsl to remove its text-align >property so the attribute-set can work. > > <xsl:otherwise> > <fo:block id="{$id}" > wrap-option='no-wrap' > white-space-collapse='false' > white-space-treatment='preserve' > => text-align='start' > linefeed-treatment="preserve" > xsl:use-attribute-sets="verbatim.properties"> > <xsl:copy-of select="$content"/> > </fo:block> > </xsl:otherwise> > >That property really ought to be in the attribute-set so it can be >more easily changed. > >Bob Stayton >Sagehill Enterprises >DocBook Consulting >bobs@sagehill.net -- 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]