You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by lt...@apache.org on 2008/01/07 19:41:07 UTC
svn commit: r609731 - in /maven/maven-1/plugins/trunk/pdf: project.xml
src/plugin-resources/fo-body.xslt xdocs/changes.xml
Author: ltheussl
Date: Mon Jan 7 10:40:58 2008
New Revision: 609731
URL: http://svn.apache.org/viewvc?rev=609731&view=rev
Log:
[MPPDF-56] Add support for <font> and <samp> tags.
Modified:
maven/maven-1/plugins/trunk/pdf/project.xml
maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-body.xslt
maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml
Modified: maven/maven-1/plugins/trunk/pdf/project.xml
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/pdf/project.xml?rev=609731&r1=609730&r2=609731&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/project.xml (original)
+++ maven/maven-1/plugins/trunk/pdf/project.xml Mon Jan 7 10:40:58 2008
@@ -23,7 +23,7 @@
<pomVersion>3</pomVersion>
<artifactId>maven-pdf-plugin</artifactId>
<name>Maven PDF Plugin</name>
- <currentVersion>2.5.1</currentVersion>
+ <currentVersion>2.5.2-SNAPSHOT</currentVersion>
<description>PDF Documentation generator</description>
<shortDescription>Generator of project documentation in PDF Format.</shortDescription>
<versions>
Modified: maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-body.xslt
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-body.xslt?rev=609731&r1=609730&r2=609731&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-body.xslt (original)
+++ maven/maven-1/plugins/trunk/pdf/src/plugin-resources/fo-body.xslt Mon Jan 7 10:40:58 2008
@@ -761,5 +761,138 @@
</xsl:apply-templates>
</fo:block>
</xsl:template>
+ <xsl:template match="samp">
+ <xsl:param name="chapterNumber"/>
+ <xsl:param name="fileName"/>
+ <fo:inline font-family="monospace" font-size="110%">
+ <xsl:apply-templates>
+ <xsl:with-param name="chapterNumber">
+ <xsl:value-of select="$chapterNumber"/>
+ </xsl:with-param>
+ <xsl:with-param name="fileName">
+ <xsl:value-of select="$fileName"/>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </fo:inline>
+ </xsl:template>
+ <xsl:template match="font">
+ <xsl:param name="chapterNumber"/>
+ <xsl:param name="fileName"/>
+ <xsl:variable name="color">
+ <xsl:choose>
+ <xsl:when test="@color">
+ <xsl:value-of select="@color"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>inherited-property-value(color)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="face">
+ <xsl:choose>
+ <xsl:when test="@face">
+ <xsl:value-of select="@face"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>inherited-property-value(font-family)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="size">
+ <xsl:choose>
+ <xsl:when test="@size">
+ <xsl:choose>
+ <!-- if size is given in pt or %, use it as is -->
+ <xsl:when test="contains(@size, 'pt')">
+ <xsl:value-of select="@size"/>
+ </xsl:when>
+ <xsl:when test="contains(@size, '%')">
+ <xsl:value-of select="@size"/>
+ </xsl:when>
+ <!-- otherwise set to arbitrary values -->
+ <xsl:when test="@size = '+1'">
+ <xsl:text>110%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '+2'">
+ <xsl:text>120%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '+3'">
+ <xsl:text>130%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '+4'">
+ <xsl:text>140%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '+5'">
+ <xsl:text>150%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '+6'">
+ <xsl:text>160%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '+7'">
+ <xsl:text>170%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '-1'">
+ <xsl:text>90%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '-2'">
+ <xsl:text>80%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '-3'">
+ <xsl:text>70%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '-4'">
+ <xsl:text>60%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '-5'">
+ <xsl:text>50%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '-6'">
+ <xsl:text>40%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '-7'">
+ <xsl:text>30%</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '1'">
+ <xsl:text>8pt</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '2'">
+ <xsl:text>10pt</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '3'">
+ <xsl:text>12pt</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '4'">
+ <xsl:text>14pt</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '5'">
+ <xsl:text>18pt</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '6'">
+ <xsl:text>24pt</xsl:text>
+ </xsl:when>
+ <xsl:when test="@size = '7'">
+ <xsl:text>36pt</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>12pt</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>inherited-property-value(font-size)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <fo:inline font-size="{$size}" font-family="{$face}" color="{$color}">
+ <xsl:apply-templates>
+ <xsl:with-param name="chapterNumber">
+ <xsl:value-of select="$chapterNumber"/>
+ </xsl:with-param>
+ <xsl:with-param name="fileName">
+ <xsl:value-of select="$fileName"/>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </fo:inline>
+ </xsl:template>
<xsl:template match="style"/>
</xsl:stylesheet>
Modified: maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml?rev=609731&r1=609730&r2=609731&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/pdf/xdocs/changes.xml Mon Jan 7 10:40:58 2008
@@ -25,6 +25,9 @@
<author email="aheritier@apache.org">Arnaud Heritier</author>
</properties>
<body>
+ <release version="2.5.2-SNAPSHOT" date="in SVN">
+ <action dev="ltheussl" type="fix" issue="MPPDF-56">Add support for <code><![CDATA[<font>]]></code> and <code><![CDATA[<samp>]]></code> tags.</action>
+ </release>
<release version="2.5.1" date="2007-03-28">
<action dev="ltheussl" type="fix" issue="MPPDF-57">Unable to remove cover type and version.</action>
</release>