r1557 - in trunk/BOOK/stylesheets: . pdf xhtml

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed May 10 15:51:38 PDT 2006


Author: manuel
Date: 2006-05-10 16:51:37 -0600 (Wed, 10 May 2006)
New Revision: 1557

Modified:
   trunk/BOOK/stylesheets/lfs.css
   trunk/BOOK/stylesheets/patcheslist.xsl
   trunk/BOOK/stylesheets/pdf/lfs-mixed.xsl
   trunk/BOOK/stylesheets/xhtml/lfs-sections.xsl
   trunk/BOOK/stylesheets/xhtml/lfs-titles.xsl
Log:
Updated stylesheets to match current LFS features.

Modified: trunk/BOOK/stylesheets/lfs.css
===================================================================
--- trunk/BOOK/stylesheets/lfs.css	2006-05-10 22:15:06 UTC (rev 1556)
+++ trunk/BOOK/stylesheets/lfs.css	2006-05-10 22:51:37 UTC (rev 1557)
@@ -172,6 +172,10 @@
   font-weight: bold;
 }
 
+div.important tt.literal, div.warning tt.literal, div.caution tt.literal {
+  font-weight: normal;
+}
+
 /* variablelist & segmentedlist */
 dl {
   margin: 0;
@@ -213,6 +217,9 @@
 
 div.variablelist dd p {
   margin-top: 0px;
+  margin-bottom: 0px;
+  padding-top: 0px;
+  padding-bottom: 0px;
 }
 
 div.materials dd {
@@ -225,15 +232,25 @@
   clear: left;
 }
 
-div.package span.segtitle {
+div.package span.segtitle, div.appendix span.segtitle {
   float: left;
 }
 
-div.package span.seg {
+div.package span.seg, div.appendix span.seg {
   display: block;
   padding-left: 14em;
 }
 
+div.appendix div.segmentedlist {
+  padding-left: 1em;
+}
+
+div.appendix h2 {
+  font-size: 133%;
+  margin-top: 1em;
+  margin-bottom: 0.2em;
+}
+
 div.content div.seg {
   margin-bottom: 1em;
   margin-top: 1em;
@@ -255,6 +272,20 @@
   margin-left: 1em;
 }
 
+ul[compact="compact"] {
+  list-style: none;
+}
+
+ul[compact="compact"] li {
+  margin: 0em;
+  padding: 0em;
+}
+
+ul[compact="compact"] li p {
+  padding: 0.3em;
+  margin: 0em;
+}
+
 /*table */
 
 div.table {

Modified: trunk/BOOK/stylesheets/patcheslist.xsl
===================================================================
--- trunk/BOOK/stylesheets/patcheslist.xsl	2006-05-10 22:15:06 UTC (rev 1556)
+++ trunk/BOOK/stylesheets/patcheslist.xsl	2006-05-10 22:51:37 UTC (rev 1557)
@@ -15,21 +15,33 @@
   </xsl:param>
 
   <xsl:template match="/">
-    <xsl:text>#! /bin/bash&#x0a;&#x0a;</xsl:text>
-    <xsl:text>  umask 002&#x0a;&#x0a;</xsl:text>
+    <xsl:text>#! /bin/bash
+
+function copy
+{
+  cp $1 $2 >>copyerrs 2>&1
+}
+
+umask 002 &#x0a;&#x0a;</xsl:text>
+               
       <!-- Create dest.dir if it don't exist -->
-    <xsl:text>  install -d -m 775 -g lfswww </xsl:text>
+    <xsl:text>install -d -m 775 -g lfswww </xsl:text>
     <xsl:value-of select="$dest.dir"/>
     <xsl:text> &&&#x0a;</xsl:text>
-    <xsl:text>  cd </xsl:text>
+    <xsl:text>cd </xsl:text>
     <xsl:value-of select="$dest.dir"/>
     <xsl:text> &&&#x0a;&#x0a;</xsl:text>
-      <!-- Touch a dummy patch to prevent fails if dest dir is empty, then remove old patches -->
-    <xsl:text>  touch dummy.patch &&&#x0a;  rm -f *.patch &&&#x0a;&#x0a;</xsl:text>
+      <!-- Remove old patches -->
+    <xsl:text>rm -f *.patch copyerrs && &#x0a;&#x0a;</xsl:text>
     <xsl:apply-templates/>
       <!-- Ensure correct owneship -->
-    <xsl:text>&#x0a;  chgrp lfswww *.patch &&&#x0a;</xsl:text>
-    <xsl:text>&#x0a;  exit&#x0a;</xsl:text>
+    <xsl:text>&#x0a;chgrp lfswww *.patch &&&#x0a;</xsl:text>
+    <xsl:text>
+if [ `wc -l copyerrs | sed 's/ *//' | cut -f1 -d' '` -gt 0 ]; then
+  mail -s "Missing LFS patches" lfs-book at linuxfromscratch.org < copyerrs
+fi&#x0a;&#x0a;</xsl:text>
+          
+    <xsl:text>exit&#x0a;</xsl:text>
   </xsl:template>
 
   <xsl:template match="//text()"/>
@@ -46,7 +58,7 @@
         <xsl:text>-</xsl:text>
         <xsl:value-of select="$cut"/>
       </xsl:variable>
-      <xsl:text>  cp /home/httpd/www.linuxfromscratch.org/patches/downloads/</xsl:text>
+      <xsl:text>copy /home/httpd/www.linuxfromscratch.org/patches/downloads/</xsl:text>
           <xsl:value-of select="substring-before($patch.name2, '-0')"/>
       <xsl:text>/</xsl:text>
       <xsl:value-of select="$patch.name"/>

Modified: trunk/BOOK/stylesheets/pdf/lfs-mixed.xsl
===================================================================
--- trunk/BOOK/stylesheets/pdf/lfs-mixed.xsl	2006-05-10 22:15:06 UTC (rev 1556)
+++ trunk/BOOK/stylesheets/pdf/lfs-mixed.xsl	2006-05-10 22:51:37 UTC (rev 1557)
@@ -12,7 +12,8 @@
     <fo:block break-after="page"/>
   </xsl:template>
 
-    <!-- Allow forced line breaks inside paragraphs emulating literallayout. -->
+    <!-- Allow forced line breaks inside paragraphs emulating literallayout
+    and to remove vertical space in pachages and patches pages. -->
  <xsl:template match="para">
     <xsl:choose>
       <xsl:when test="./@remap='verbatim'">
@@ -25,6 +26,15 @@
           <xsl:apply-templates/>
         </fo:block>
       </xsl:when>
+      <xsl:when test="ancestor::variablelist/@role = 'materials'">
+        <fo:block>
+          <xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
+          <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
+          <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
+          <xsl:call-template name="anchor"/>
+          <xsl:apply-templates/>
+        </fo:block>
+      </xsl:when>
       <xsl:otherwise>
         <xsl:apply-imports/>
       </xsl:otherwise>

Modified: trunk/BOOK/stylesheets/xhtml/lfs-sections.xsl
===================================================================
--- trunk/BOOK/stylesheets/xhtml/lfs-sections.xsl	2006-05-10 22:15:06 UTC (rev 1556)
+++ trunk/BOOK/stylesheets/xhtml/lfs-sections.xsl	2006-05-10 22:51:37 UTC (rev 1557)
@@ -53,7 +53,45 @@
   <xsl:param name="section.autolabel" select="1"/>
   <xsl:param name="section.label.includes.component.label" select="1"/>
 
-    <!-- Skip numeraration for sections with empty title -->
+    <!-- Use lowercase roman numbers for sect1 in preface -->
+  <xsl:template match="sect1" mode="label.markup">
+    <!-- if the parent is a component, maybe label that too -->
+    <xsl:variable name="parent.is.component">
+      <xsl:call-template name="is.component">
+        <xsl:with-param name="node" select=".."/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:variable name="component.label">
+      <xsl:if test="$section.label.includes.component.label != 0
+                    and $parent.is.component != 0">
+        <xsl:variable name="parent.label">
+          <xsl:apply-templates select=".." mode="label.markup"/>
+        </xsl:variable>
+        <xsl:if test="$parent.label != ''">
+          <xsl:apply-templates select=".." mode="label.markup"/>
+          <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
+        </xsl:if>
+      </xsl:if>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="@label">
+        <xsl:value-of select="@label"/>
+      </xsl:when>
+      <xsl:when test="$section.autolabel != 0">
+        <xsl:copy-of select="$component.label"/>
+        <xsl:choose>
+          <xsl:when test="ancestor::preface">
+            <xsl:number format="i" count="sect1"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:number format="1" count="sect1"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
+    <!-- Skip numeration for sect2 with empty title -->
   <xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup">
     <xsl:if test="string-length(title) > 0">
       <!-- label the parent -->
@@ -102,4 +140,4 @@
     </xsl:if>
   </xsl:template>
 
-</xsl:stylesheet>
+</xsl:stylesheet>
\ No newline at end of file

Modified: trunk/BOOK/stylesheets/xhtml/lfs-titles.xsl
===================================================================
--- trunk/BOOK/stylesheets/xhtml/lfs-titles.xsl	2006-05-10 22:15:06 UTC (rev 1556)
+++ trunk/BOOK/stylesheets/xhtml/lfs-titles.xsl	2006-05-10 22:51:37 UTC (rev 1557)
@@ -78,8 +78,10 @@
             <a id="{@id}" name="{@id}"/>
           </xsl:if>
           <h2 class="{name(.)}">
-            <xsl:apply-templates select="." mode="label.markup"/>
-            <xsl:text>. </xsl:text>
+            <xsl:if test="not(ancestor::preface)">
+              <xsl:apply-templates select="." mode="label.markup"/>
+              <xsl:text>. </xsl:text>
+            </xsl:if>
             <xsl:value-of select="title"/>
           </h2>
         </div>




More information about the cross-lfs mailing list