Hi Kevin,
If you want your footer content on the outside, then I suggest you not
put it in the center cell, but instead put it in the left or right cell,
depending on the page number. That's done in the template named
"footer.content" that you would customize to define what appears in your
footer cells. You can also adjust the relative column widths or make
the center column width zero if you don't use it. The details are
described here:
http://www.sagehill.net/docbookxsl/PrintHeaders.html#PrintHeadersTextHere is what I used in my book for the footers, which put the copyright
on the inside and page number on the outside. I left the conditional
clauses for $double.sided = 0 even though I never used that setting.
<xsl:param name="footer.column.widths">10 0 1</xsl:param>
<xsl:template name="footer.content">
<xsl:param name="pageclass" select="''"/>
<xsl:param name="sequence" select="''"/>
<xsl:param name="position" select="''"/>
<xsl:param name="gentext-key" select="''"/>
<fo:block>
<xsl:choose>
<xsl:when test="$sequence='blank'">
<xsl:choose>
<xsl:when test="$double.sided != 0 and $position = 'left'">
<fo:inline font-weight="bold"><fo:page-number/></fo:inline>
</xsl:when>
<xsl:when test="$double.sided != 0 and $position = 'right'">
<xsl:call-template name="footer.copyright"/>
</xsl:when>
<xsl:when test="$double.sided = 0 and $position = 'right'">
<fo:inline font-weight="bold"><fo:page-number/></fo:inline>
</xsl:when>
<xsl:when test="$double.sided = 0 and $position = 'left'">
<xsl:call-template name="footer.copyright"/>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="$pageclass='titlepage'">
</xsl:when>
<xsl:when test="$double.sided != 0 and ($sequence = 'even' or
$sequence = 'last') and $position='left'">
<fo:inline font-weight="bold"><fo:page-number/></fo:inline>
</xsl:when>
<xsl:when test="$double.sided != 0 and ($sequence = 'odd' or
$sequence = 'first') and $position='right'">
<fo:inline font-weight="bold"><fo:page-number/></fo:inline>
</xsl:when>
<xsl:when test="$double.sided != 0 and ($sequence = 'even' or
$sequence = 'last') and $position='right'">
<xsl:call-template name="footer.copyright"/>
</xsl:when>
<xsl:when test="$double.sided != 0 and ($sequence = 'odd' or
$sequence = 'first') and $position='left'">
<xsl:call-template name="footer.copyright"/>
</xsl:when>
<xsl:when test="$double.sided = 0 and $position='right'">
<fo:inline font-weight="bold"><fo:page-number/></fo:inline>
</xsl:when>
<xsl:when test="$double.sided = 0 and $position='left'">
<xsl:call-template name="footer.copyright"/>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</xsl:template>
<xsl:template name="footer.copyright">
<fo:inline font-size="6pt">
<xsl:apply-templates select="/d:book/d:info/copyright[1]"
mode="titlepage.mode"/>
</fo:inline>
</xsl:template>
Let me know if any of this requires further explanation.
Bob Stayton
bobs@sagehill.netOn 7/19/2021 12:39 PM, Kevin Dunn wrote:
> In double-sided xsl-fo, how can you control text-align for the center
> cell of the header or footer table (usually chapter or section title)?
>
> Using the attribute-set footer.table.properties, I can set text-align,
> but it doesn't distinguish between recto and verso pages. "center"
> centers the center cell for both recto and verso pages, which is
> acceptable. But some books (e.g., DocBook XSL TCG) align "end" on the
> recto pages and "start" on the verso pages, which I find attractive.
>
> I tried customizing footer.table.cell.properties, but that had no affect.
>
> Would I have to customize the footer.table template, or can it be done
> with attribute-sets?
>
> Get Outlook for Android <https://aka.ms/ghei36>