r4965 - in branches/6.1/BOOK/stylesheets: . pdf

bdubbs at linuxfromscratch.org bdubbs at linuxfromscratch.org
Sat Aug 20 14:05:48 PDT 2005


Author: bdubbs
Date: 2005-08-20 15:05:47 -0600 (Sat, 20 Aug 2005)
New Revision: 4965

Modified:
   branches/6.1/BOOK/stylesheets/blfs-nochunks.xsl
   branches/6.1/BOOK/stylesheets/blfs-pdf.xsl
   branches/6.1/BOOK/stylesheets/pdf/lfs-mixed.xsl
Log:
Update 6.1 stylesheets

Modified: branches/6.1/BOOK/stylesheets/blfs-nochunks.xsl
===================================================================
--- branches/6.1/BOOK/stylesheets/blfs-nochunks.xsl	2005-08-20 20:58:43 UTC (rev 4964)
+++ branches/6.1/BOOK/stylesheets/blfs-nochunks.xsl	2005-08-20 21:05:47 UTC (rev 4965)
@@ -18,7 +18,7 @@
   <xsl:include href="xhtml/lfs-xref.xsl"/>
 
     <!-- This file contains our localization strings (for internationalization) -->
-  <xsl:param name="local.l10n.xml" select="document('lfs-l10n.xml')"/>
+  <xsl:param name="local.l10n.xml" select="document('blfs-l10n.xml')"/>
 
     <!-- Dropping some unwanted style attributes -->
   <xsl:param name="ulink.target" select="''"></xsl:param>

Modified: branches/6.1/BOOK/stylesheets/blfs-pdf.xsl
===================================================================
--- branches/6.1/BOOK/stylesheets/blfs-pdf.xsl	2005-08-20 20:58:43 UTC (rev 4964)
+++ branches/6.1/BOOK/stylesheets/blfs-pdf.xsl	2005-08-20 21:05:47 UTC (rev 4965)
@@ -4,12 +4,12 @@
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">
 
-  	<!-- We use FO and FOP as the processor -->
+    <!-- We use FO and FOP as the processor -->
   <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.68.1/fo/docbook.xsl"/>
   <xsl:param name="fop.extensions" select="1"/>
   <xsl:param name="draft.mode" select="'no'"/>
 
-  	<!-- Including our others customized templates -->
+    <!-- Including our others customized templates -->
   <xsl:include href="pdf/lfs-admon.xsl"/>
   <xsl:include href="pdf/lfs-index.xsl"/>
   <xsl:include href="pdf/lfs-mixed.xsl"/>
@@ -20,19 +20,19 @@
     <!-- This file contains our localization strings (for internationalization) -->
   <xsl:param name="local.l10n.xml" select="document('blfs-l10n.xml')"/>
 
-  	<!-- Probably want to make the paper size configurable -->
+    <!-- Probably want to make the paper size configurable -->
   <xsl:param name="paper.type" select="'letter'"/>
 
     <!-- Printing Style -->
-  <xsl:param name="double.sided" select="1"/>
+  <xsl:param name="double.sided" select="0"/>
   <xsl:param name="hyphenate">false</xsl:param>
   <xsl:param name="alignment">justify</xsl:param>
 
-  	<!-- Font size -->
+    <!-- Font size -->
   <xsl:param name="body.font.master">9</xsl:param>
   <xsl:param name="body.font.size">12pt</xsl:param>
 
-  	<!-- TOC generation -->
+    <!-- TOC generation -->
   <xsl:param name="generate.toc">
     book      toc
     part      nop

Modified: branches/6.1/BOOK/stylesheets/pdf/lfs-mixed.xsl
===================================================================
--- branches/6.1/BOOK/stylesheets/pdf/lfs-mixed.xsl	2005-08-20 20:58:43 UTC (rev 4964)
+++ branches/6.1/BOOK/stylesheets/pdf/lfs-mixed.xsl	2005-08-20 21:05:47 UTC (rev 4965)
@@ -5,8 +5,8 @@
                 version="1.0">
 
 
-    <!-- This is a hack and isn't correct semantically. Theoretically, the beginpage 
-      tags should be placed in the XML source only to render the PDF output and 
+    <!-- This is a hack and isn't correct semantically. Theoretically, the beginpage
+      tags should be placed in the XML source only to render the PDF output and
       should be removed after it. But there is no a better way and we need this.-->
   <xsl:template match="beginpage">
     <fo:block break-after="page"/>
@@ -138,7 +138,7 @@
   <xsl:param name="variablelist.as.blocks" select="1"/>
   <xsl:param name="variablelist.max.termlength">32</xsl:param>
 
-    <!-- Adding space before segmentedlist -->
+    <!-- Making the same look that in the XHTML output. -->
   <xsl:template match="segmentedlist">
     <!--<xsl:variable name="presentation">
       <xsl:call-template name="pi-attribute">
@@ -161,14 +161,44 @@
         <xsl:apply-templates select="." mode="seglist-table"/>
       </xsl:when>
       <xsl:otherwise>-->
-        <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em"
-                space-before.maximum="0.8em">
+        <fo:list-block provisional-distance-between-starts="11em"
+              provisional-label-separation="1em"
+              xsl:use-attribute-sets="list.block.spacing">
           <xsl:apply-templates/>
-        </fo:block>
+        </fo:list-block>
       <!--</xsl:otherwise>
     </xsl:choose>-->
   </xsl:template>
 
+  <xsl:template match="seglistitem">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="seg">
+    <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
+    <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
+    <xsl:variable name="segtitles" select="$seglist/segtitle"/>
+    <!-- Note: segtitle is only going to be the right thing in a well formed
+      SegmentedList.  If there are too many Segs or too few SegTitles,
+      you'll get something odd...maybe an error -->
+    <fo:list-item xsl:use-attribute-sets="list.item.spacing">
+      <fo:list-item-label end-indent="label-end()" text-align="start">
+        <fo:block>
+          <fo:inline font-weight="bold">
+            <xsl:apply-templates select="$segtitles[$segnum=position()]"
+                    mode="segtitle-in-seg"/>
+            <xsl:text>: </xsl:text>
+          </fo:inline>
+        </fo:block>
+      </fo:list-item-label>
+      <fo:list-item-body start-indent="body-start()">
+        <fo:block text-align="left">
+          <xsl:apply-templates/>
+        </fo:block>
+      </fo:list-item-body>
+    </fo:list-item>
+  </xsl:template>
+
     <!-- Presentation of literal tag -->
   <xsl:template match="literal">
     <fo:inline  font-weight="normal">




More information about the blfs-book mailing list