Author: sjur Date: Fri Sep 5 03:00:39 2008 New Revision: 692402 URL: http://svn.apache.org/viewvc?rev=692402&view=rev Log: Added support for user-specification of the font family.
At the same time bringing this contract in line with the skins-based pdf generation by changing some metrics from pt to em, and by adding @id. Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-toc.ft Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-toc.ft URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-toc.ft?rev=692402&r1=692401&r2=692402&view=diff ============================================================================== --- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-toc.ft (original) +++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-toc.ft Fri Sep 5 03:00:39 2008 @@ -42,6 +42,16 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> + <xsl:param name="defaultVariables" select="'test.html'"/> + <xsl:param name="sans-serif" select="$defaultVariables/*/[EMAIL PROTECTED]'output.pdf.fontFamily.sansSerif']/@value" /> + <xsl:param name="TOCTitleFontFamily"> + <xsl:choose> + <xsl:when test="$defaultVariables/*/[EMAIL PROTECTED]'output.pdf.fontFamily.TOCTitleFontFamily']"> + <xsl:value-of select="$defaultVariables/*/[EMAIL PROTECTED]'output.pdf.fontFamily.TOCTitleFontFamily']/@value"/> + </xsl:when> + <xsl:otherwise><xsl:value-of select="$sans-serif"/></xsl:otherwise> + </xsl:choose> + </xsl:param> <xsl:param name="max-depth" select="2"/> <xsl:param name="page-break-after" select="'true'"/> <xsl:include href="lm://pdf.transform.helper.pageBreaks"/> @@ -49,13 +59,14 @@ <forrest:content> <forrest:part xpath="/fo/xsl-region-body/title"> <fo:block - font-family="sans-serif" + font-family="{$TOCTitleFontFamily}" font-size="12pt" font-weight="bold" - space-after="5pt" - space-before="5pt" + space-after="0.5em" + space-before="1em" text-align="justify" - width="7.5in"> + width="7.5in" + id="__toc__"> <xsl:call-template name="insertPageBreaks"/> <!-- insert i18n stuff here --> <xsl:text>Table of contents</xsl:text>