Author: manuel
Date: 2007-04-24 13:03:02 -0600 (Tue, 24 Apr 2007)
New Revision: 8104
Modified:
branches/new-xsl/pdf/lfs-mixed.xsl
branches/new-xsl/pdf/lfs-pagesetup.xsl
Log:
Added revhistory support on PDF book titlepage.
Modified: branches/new-xsl/pdf/lfs-mixed.xsl
===================================================================
--- branches/new-xsl/pdf/lfs-mixed.xsl 2007-04-24 16:54:51 UTC (rev 8103)
+++ branches/new-xsl/pdf/lfs-mixed.xsl 2007-04-24 19:03:02 UTC (rev 8104)
@@ -364,4 +364,56 @@
<xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
</xsl:attribute-set>
+
+ <!-- Revision History -->
+
+ <!-- revhistory titlepage:
+ Self-made template to add missing support on bookinfo. -->
+ <xsl:template match="revhistory" mode="book.titlepage.verso.auto.mode">
+ <fo:block space-before.optimum="2em"
+ space-before.minimum="1.5em"
+ space-before.maximum="2.5em">
+ <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
+ </fo:block>
+ </xsl:template>
+
+ <!-- revhitory title properties -->
+ <xsl:attribute-set name="revhistory.title.properties">
+ <xsl:attribute name="text-align">center</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ </xsl:attribute-set>
+
+ <!-- revhistory/revision mode titlepage.mode:
+ Removed authorinitials and author. -->
+ <!-- The original template is in {docbook-xsl}/fo/titlepage.xsl -->
+ <xsl:template match="revhistory/revision" mode="titlepage.mode">
+ <xsl:variable name="revnumber" select="revnumber"/>
+ <xsl:variable name="revdate" select="date"/>
+ <xsl:variable name="revauthor" select="authorinitials|author"/>
+ <xsl:variable name="revremark" select="revremark|revdescription"/>
+ <fo:table-row>
+ <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
+ <fo:block>
+ <xsl:if test="$revnumber">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Revision'"/>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
+ <fo:block>
+ <xsl:apply-templates select="$revdate[1]"/>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
+ <fo:block>
+ <xsl:apply-templates select="$revremark[1]"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:template>
+
</xsl:stylesheet>
Modified: branches/new-xsl/pdf/lfs-pagesetup.xsl
===================================================================
--- branches/new-xsl/pdf/lfs-pagesetup.xsl 2007-04-24 16:54:51 UTC (rev
8103)
+++ branches/new-xsl/pdf/lfs-pagesetup.xsl 2007-04-24 19:03:02 UTC (rev
8104)
@@ -37,6 +37,11 @@
<!-- Adjust the left margin for titles. -->
<xsl:param name="title.margin.left">-0.8pc</xsl:param>
+ <!-- Default table width on tables that do not specify an alternate
+ width using the dbfo processing instruction.
+ This value is used also on bookinfo/revhistory table. -->
+ <xsl:param name="default.table.width" select="'70%'"/>
+
<!-- Properties for component titles -->
<xsl:attribute-set name="component.title.properties">
<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
@@ -75,7 +80,7 @@
Be sure that no uneeded fo:marker are generated. -->
<xsl:param name="marker.section.level" select="-1"></xsl:param>
- <!-- Force sect1 onto a new page -->
+ <!-- Force package's sect1 onto a new page -->
<xsl:attribute-set name="section.level1.properties">
<xsl:attribute name="break-before">
<xsl:choose>
@@ -92,7 +97,8 @@
</xsl:attribute-set>
<!-- book title:
- Centered the title and removed unused code. -->
+ Centered the title and removed unused code.
+ Added missing revhistory support. -->
<!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl
-->
<xsl:template name="book.titlepage">
<fo:block margin-top="3in">
@@ -103,12 +109,14 @@
<fo:block>
<xsl:call-template name="book.titlepage.before.verso"/>
<xsl:call-template name="book.titlepage.verso"/>
+ <xsl:apply-templates mode="book.titlepage.verso.auto.mode"
+ select="bookinfo/revhistory"/>
</fo:block>
<xsl:call-template name="book.titlepage.separator"/>
</fo:block>
</xsl:template>
- <!-- book title:
+ <!-- book title separator:
Drop a blank page after book title. -->
<!-- The original template is in {docbook-xsl}/fo/titlepage.templates.xsl
-->
<xsl:template name="book.titlepage.separator"/>
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page