Douglas W Philips wrote:
>     This is probably more of a question than a change request.
>     We're looking for additional control over the appearance of the text
> in the page headers and footers.
>     Specifically, we would like to have the center footer read "...
> CONFIDENTIAL..." and have that text be larger and in RED when it
> appears. I've tried the obvious:
>          -p footer-center '<fo:block color="red"...>... CONFIDENTIAL
> ...</fo:block>' but of course that doesn't work.
>     Question: If we were to customize our installation to handle this,
> would it be worth feeding that customization back to XMLmind?
> 

No, because there is a clean, generic, way to implement this kind of
customization. See below.



> 
> P.S. I have played a little bit with the
> ditac_1_2_1/xsl/fo/pagination.xsl file and that seems to be where the
> customization would go, but I have just started looking into how we
> would do this.
> 

Please do not change anything in the stock XSL files. Instead follow
what described here:

XMLmind DITA Converter Manual,
Part II. Customizing the output of XMLmind DITA Converter,
Chapter 1. Simple customization,
Customizing the look of the PDF files generated by ditac --

http://www.xmlmind.com/ditac/_distrib/doc/manual/manual-6.html#customAttributeSet

Your custom_fo.xsl must redefine attribute-set "tabular-header" and/or
named template "tabularHeader".

This is pretty easy to do. However, if you have problems doing that,
we'll help you.

Excerpts of ditac_1_2_1/xsl/fo/pagination.xsl:
---
<!-- tabularHeader ================================================ -->

<xsl:attribute-set name="tabular-header">
  <xsl:attribute name="hyphenate">false</xsl:attribute>
  <xsl:attribute name="font-family">sans-serif</xsl:attribute>
  <xsl:attribute name="font-size">70%</xsl:attribute>
  <xsl:attribute name="color">#404040</xsl:attribute>
  <xsl:attribute name="border-color">#404040</xsl:attribute>
  <xsl:attribute name="border-width">0.25pt</xsl:attribute>
</xsl:attribute-set>

<xsl:template name="tabularHeader">
  <xsl:param name="left" select="()"/>
  <xsl:param name="center" select="()"/>
  <xsl:param name="right" select="()"/>
  <xsl:param name="isFooter" select="false()"/>

  <xsl:variable name="verticalAlign"
                select="if ($isFooter) then 'before' else 'after'"/>

  <fo:block xsl:use-attribute-sets="tabular-header">
    <xsl:choose>
      <xsl:when test="$isFooter and $footer-separator = 'yes'">
        <xsl:attribute name="border-top-style">solid</xsl:attribute>
        <xsl:attribute name="padding-top">0.125em</xsl:attribute>
      </xsl:when>
      <xsl:when test="not($isFooter) and $header-separator = 'yes'">
        <xsl:attribute name="padding-bottom">0.125em</xsl:attribute>
        <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
      </xsl:when>
    </xsl:choose>

    <fo:table table-layout="fixed" width="100%">
      <fo:table-column column-number="1"
                       column-width="proportional-column-width(2)"/>
      <fo:table-column column-number="2"
                       column-width="proportional-column-width(6)"/>
      <fo:table-column column-number="3"
                       column-width="proportional-column-width(2)"/>
      <fo:table-body>
        <fo:table-row>
          <fo:table-cell start-indent="0"
                         text-align="left"
                         display-align="{$verticalAlign}">
            <fo:block>
              <xsl:choose>
                <xsl:when test="exists($left)">
                  <xsl:copy-of select="$left"/>
                </xsl:when>
                <xsl:otherwise>&#xA0;</xsl:otherwise>
              </xsl:choose>
            </fo:block>
          </fo:table-cell>
          <fo:table-cell start-indent="0"
                         text-align="center"
                         display-align="{$verticalAlign}">
            <fo:block>
              <xsl:choose>
                <xsl:when test="exists($center)">
                  <xsl:copy-of select="$center"/>
                </xsl:when>
                <xsl:otherwise>&#xA0;</xsl:otherwise>
              </xsl:choose>
            </fo:block>
          </fo:table-cell>
          <fo:table-cell start-indent="0"
                         text-align="right"
                         display-align="{$verticalAlign}">
            <fo:block>
              <xsl:choose>
                <xsl:when test="exists($right)">
                  <xsl:copy-of select="$right"/>
                </xsl:when>
                <xsl:otherwise>&#xA0;</xsl:otherwise>
              </xsl:choose>
            </fo:block>
          </fo:table-cell>
        </fo:table-row>
      </fo:table-body>
    </fo:table>
  </fo:block>
</xsl:template>
---



--> In next release, we'll add additional attribute-sets and also
additional properties (needed to adjust the width of each column)
allowing to extensively customize the look of the tabular header/footer.

In the vast majority of cases, redefining one or more these additional
attribute-sets/properties should suffice.

Already having these additional attribute-sets/properties would have
spared you the effort of redefining named template "tabularHeader".


 
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to