Just by chance I have a blockquote in which a page break occurs
between the quotation and the attribution. This simply looks
bad. I have tried using <?dbfo keep-together="always"?>
after the <blockquote>, but it doesn't have any effect.
<blockquote><?dbfo
keep-together="always"?>
<attribution>A. N. Author, <citetitle>A Title</citetitle></attribution>
<para>Some long quotation here extending over
several lines</para>
</blockquote>
I could use a hard page-break before the <blockquote>, but
I'd rather not do that - some day it will turn around and bite me!
For a similar reason I don't like to use a soft page break,
<?dbfo-need height="1.5in"?> before the blockquote,
suppose I later change the line spacing in the document!
Is there any way I can use 'keep-together' to force the quote and
attribution to keep to the same page?
I have tried to customize blockquote in fo/block.xsl, but it
doesn't work, what am I doing wrong?
<xsl:template match="blockquote">
<!-- this variable added -->
<xsl:variable name="keep.together">
<xsl:call-template name="dbfo-attribute">
<xsl:with-param name="pis"
select="processing-instruction('dbfo')"/>
<xsl:with-param name="attribute" select="'keep-together'"/>
</xsl:call-template>
</xsl:variable>
<!-- -->
<fo:block xsl:use-attribute-sets="blockquote.properties">
<xsl:call-template name="anchor"/>
<fo:block>
<!-- this test added -->
<xsl:if test="$keep.together != ''">
<xsl:attribute name="keep-together.within-column">
<xsl:value-of select="$keep.together"/>
</xsl:attribute>
</xsl:if>
<!-- -->
<xsl:if test="title">
<fo:block xsl:use-attribute-sets="formal.title.properties">
<xsl:apply-templates select="." mode="object.title.markup"/>
</fo:block>
</xsl:if>
<xsl:apply-templates select="*[local-name(.) != 'title'
and local-name(.) != 'attribution']"/>
</fo:block>
<xsl:if test="attribution">
<!-- this variable added -->
<xsl:variable name="keep.together">
<xsl:call-template name="dbfo-attribute">
<xsl:with-param name="pis"
select="processing-instruction('dbfo')"/>
<xsl:with-param name="attribute" select="'keep-together'"/>
</xsl:call-template>
</xsl:variable>
<!-- -->
<fo:block xsl:use-attribute-sets="blockquote.properties">
<xsl:call-template name="anchor"/>
<fo:block>
<!-- this test added -->
<xsl:if test="$keep.together != ''">
<xsl:attribute name="keep-together.within-column">
<xsl:value-of select="$keep.together"/>
</xsl:attribute>
</xsl:if>
<!-- -->
<xsl:if test="title">
<fo:block xsl:use-attribute-sets="formal.title.properties">
<xsl:apply-templates select="." mode="object.title.markup"/>
</fo:block>
</xsl:if>
<xsl:apply-templates select="*[local-name(.) != 'title'
and local-name(.) != 'attribution']"/>
</fo:block>
<xsl:if test="attribution">
<fo:block
text-align="right">
<xsl:text>—</xsl:text>
<xsl:apply-templates select="attribution"/>
</fo:block>
</xsl:if>
</fo:block>
</xsl:template>
<xsl:apply-templates select="attribution"/>
</fo:block>
</xsl:if>
</fo:block>
</xsl:template>
Ron
--
Ron Catterall, Phd, DSc
email: [EMAIL PROTECTED]
Prolongacion de Hidalgo 140
http://catterall.net/
San Felipe del Agua
tel:
+52 951 520 1821
Oaxaca 68020
Mexico
fax:
+1 530 348 8309
Prolongacion de Hidalgo 140
San Felipe del Agua
Oaxaca 68020
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
