forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ferdin...@apache.org
Subject svn commit: r627076 - /forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
Date Tue, 12 Feb 2008 20:14:19 GMT
Author: ferdinand
Date: Tue Feb 12 12:14:17 2008
New Revision: 627076

URL: http://svn.apache.org/viewvc?rev=627076&view=rev
Log:
Fixed and adjusted underlining of headings.

Modified:
    forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl

Modified: forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl?rev=627076&r1=627075&r2=627076&view=diff
==============================================================================
--- forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
(original)
+++ forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
Tue Feb 12 12:14:17 2008
@@ -489,13 +489,13 @@
             id="{@id}" />
         <xsl:apply-templates />
     </xsl:template>
+    
     <xsl:template
         match="section">
         <xsl:param
             name="level">0</xsl:param>
         <xsl:variable
             name="size">
-            <!-- 14pt for level 1 12pt for level 2 -->
             <xsl:value-of
                 select="12-number($level)" />
         </xsl:variable>
@@ -516,19 +516,7 @@
             space-after="8pt"
             margin="0">
             <xsl:call-template
-                name="insertPageBreaks" />
-            <xsl:if
-                test="$heading-type = 'boxed'">
-                <xsl:attribute
-                    name="background-color">
-                    <xsl:value-of
-                        select="$heading-color" />
-                </xsl:attribute>
-                <xsl:attribute
-                    name="padding-left">3pt</xsl:attribute>
-                <xsl:attribute
-                    name="padding-top">4pt</xsl:attribute>
-            </xsl:if>
+            name="insertPageBreaks" />
             <xsl:attribute
                 name="id">
                 <xsl:choose>
@@ -544,6 +532,29 @@
                 </xsl:choose>
             </xsl:attribute>
             <xsl:if
+                test="$heading-type = 'boxed'">
+                <xsl:attribute
+                    name="background-color">
+                    <xsl:value-of
+                        select="$heading-color" />
+                </xsl:attribute>
+                <xsl:attribute
+                    name="padding-left">3pt</xsl:attribute>
+                <xsl:attribute
+                    name="padding-top">4pt</xsl:attribute>
+            </xsl:if>
+            <xsl:if
+                test="$heading-type = 'underlined'">
+                <xsl:attribute
+                    name="border-bottom-style">solid</xsl:attribute>
+                <xsl:attribute
+                    name="border-bottom-width"><xsl:value-of select="2+(2-number($level))*2"/>pt</xsl:attribute>
+                <xsl:attribute
+                    name="border-bottom-color"><xsl:value-of select="$heading-color"/>
+                </xsl:attribute>
+            </xsl:if>
+            
+            <xsl:if
                 test="$numbersections = 'true' and number($level) &lt; $numbering-max-depth+1">
                 <xsl:number
                     format="1.1.1.1.1.1.1"
@@ -564,15 +575,7 @@
             <xsl:value-of
                 select="title" />
         </fo:block>
-        <xsl:if
-            test="$heading-type = 'underlined'">
-            <!-- The non-breaking space in this block is required, otherwise
-      the block won't be rendered at all. -->
-            <fo:block
-                font-family="serif"
-                font-size="{10 div (number($level) +1 )}pt"
-                background-color="{$heading-color}">&#160;</fo:block>
-        </xsl:if>
+        
         <fo:block
             background-color="{$background-color}">
             <xsl:apply-templates>



Mime
View raw message