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

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Tue May 9 12:54:11 PDT 2006


Author: manuel
Date: 2006-05-09 13:54:09 -0600 (Tue, 09 May 2006)
New Revision: 642

Modified:
   trunk/BOOK/stylesheets/lfs-l10n.xml
   trunk/BOOK/stylesheets/lfs-nochunks.xsl
   trunk/BOOK/stylesheets/lfs-pdf.xsl
   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
   trunk/BOOK/stylesheets/xhtml/lfs-toc.xsl
Log:
Stylesheets updates.

Modified: trunk/BOOK/stylesheets/lfs-l10n.xml
===================================================================
--- trunk/BOOK/stylesheets/lfs-l10n.xml	2006-04-28 18:17:23 UTC (rev 641)
+++ trunk/BOOK/stylesheets/lfs-l10n.xml	2006-05-09 19:54:09 UTC (rev 642)
@@ -15,6 +15,7 @@
 
   </l:l10n>
 
+
     <!-- English -->
   <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
           language="en" english-language-name="English">
@@ -28,6 +29,19 @@
 
   </l:l10n>
 
+    <!-- Italian -->
+  <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
+          language="it" english-language-name="Italian">
+
+    <l:gentext key="description" text="descrizione"/>
+    <l:gentext key="Libraries" text="Librerie"/>
+    <l:gentext key="Others" text="Altri"/>
+    <l:gentext key="Packages" text="Pacchetti"/>
+    <l:gentext key="Programs" text="Programmi"/>
+    <l:gentext key="Scripts" text="Script"/>
+
+  </l:l10n>
+
     <!-- Spanish -->
   <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
           language="es" english-language-name="Spanish">

Modified: trunk/BOOK/stylesheets/lfs-nochunks.xsl
===================================================================
--- trunk/BOOK/stylesheets/lfs-nochunks.xsl	2006-04-28 18:17:23 UTC (rev 641)
+++ trunk/BOOK/stylesheets/lfs-nochunks.xsl	2006-05-09 19:54:09 UTC (rev 642)
@@ -11,7 +11,6 @@
   <xsl:output method="html" encoding="ISO-8859-1" indent="no" />
 
    <!-- Including our others customized templates -->
-  <xsl:include href="xhtml/lfs-admon.xsl"/>
   <xsl:include href="xhtml/lfs-index.xsl"/>
   <xsl:include href="xhtml/lfs-mixed.xsl"/>
   <xsl:include href="xhtml/lfs-sections.xsl"/>
@@ -28,6 +27,23 @@
   <xsl:param name="ulink.target" select="''"></xsl:param>
   <xsl:param name="css.decoration" select="0"></xsl:param>
 
+    <!-- Don't use graphics in admonitions -->
+  <xsl:param name="admon.graphics" select="0"/>
+
+    <!-- Changing the admonitions output tagging -->
+  <xsl:template name="nongraphical.admonition">
+    <div class="{name(.)}">
+      <div class ="admonhead">
+        <h3 class="admontitle">
+          <xsl:apply-templates select="." mode="object.title.markup"/>
+        </h3>
+      </div>
+      <div class="admonbody">
+        <xsl:apply-templates/>
+      </div>
+    </div>
+  </xsl:template>
+
     <!-- To drop the remainig dot when title is empty (from lfs-titles.xsl)-->
   <xsl:template name="sect2.titlepage">
     <xsl:choose>
@@ -153,10 +169,6 @@
   color: #900;
 }
 
-div.admonhead img {
-  display: none;
-}
-
 h3.admontitle {
   padding-left: 2.5em;
   padding-top: 1em;

Modified: trunk/BOOK/stylesheets/lfs-pdf.xsl
===================================================================
--- trunk/BOOK/stylesheets/lfs-pdf.xsl	2006-04-28 18:17:23 UTC (rev 641)
+++ trunk/BOOK/stylesheets/lfs-pdf.xsl	2006-05-09 19:54:09 UTC (rev 642)
@@ -29,7 +29,8 @@
     -->
 
     <!-- Printing Style -->
-  <xsl:param name="double.sided" select="1"/>
+    <!-- Change "double.sided" to "1" for published versions -->
+  <xsl:param name="double.sided" select="0"/>
   <xsl:param name="hyphenate">false</xsl:param>
   <xsl:param name="alignment">justify</xsl:param>
 

Modified: trunk/BOOK/stylesheets/lfs.css
===================================================================
--- trunk/BOOK/stylesheets/lfs.css	2006-04-28 18:17:23 UTC (rev 641)
+++ trunk/BOOK/stylesheets/lfs.css	2006-05-09 19:54:09 UTC (rev 642)
@@ -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,36 @@
   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 {
+  text-align: center;
+}
+
+div.table table {
+  margin-left: auto;
+  margin-right: auto;
+  text-align: center;
+}
+
+div.table table th, div.table table td {
+  padding: 0.2em 2em 0.2em 2em;
+}
+
 /* Indented blocks */
 p, ul, dl, code, blockquote {
   padding-left: 1em;
@@ -265,6 +312,10 @@
   font-family: monospace;
 }
 
+tt.systemitem {
+  font-style: italic;
+}
+
 pre.userinput {
   color: #101310;
   background-color: #e5e5e5;

Modified: trunk/BOOK/stylesheets/patcheslist.xsl
===================================================================
--- trunk/BOOK/stylesheets/patcheslist.xsl	2006-04-28 18:17:23 UTC (rev 641)
+++ trunk/BOOK/stylesheets/patcheslist.xsl	2006-05-09 19:54:09 UTC (rev 642)
@@ -15,20 +15,33 @@
   </xsl:param>
 
   <xsl:template match="/">
-    <xsl:text>#! /bin/bash&#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>  mkdir -p </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()"/>
@@ -45,8 +58,8 @@
         <xsl:text>-</xsl:text>
         <xsl:value-of select="$cut"/>
       </xsl:variable>
-      <xsl:text>  cp /home/httpd/www.linuxfromscratch.org/patches/downloads/</xsl:text>
-      <xsl:value-of select="substring-before($patch.name2, '-0')"/>
+      <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"/>
       <xsl:text> . &#x0a;</xsl:text>

Modified: trunk/BOOK/stylesheets/pdf/lfs-mixed.xsl
===================================================================
--- trunk/BOOK/stylesheets/pdf/lfs-mixed.xsl	2006-04-28 18:17:23 UTC (rev 641)
+++ trunk/BOOK/stylesheets/pdf/lfs-mixed.xsl	2006-05-09 19:54:09 UTC (rev 642)
@@ -5,14 +5,15 @@
                 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"/>
   </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>
@@ -217,31 +227,31 @@
 
     <!-- Addibg a bullet, and left alignament, for packages and paches list. -->
 
-<xsl:template match="varlistentry" mode="vl.as.blocks">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-  <xsl:choose>
-    <xsl:when test="ancestor::variablelist/@role = 'materials'">
-      <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
-          keep-together.within-column="always"
-          keep-with-next.within-column="always" text-align="left">
-        <xsl:text>&#x2022;   </xsl:text>
-        <xsl:apply-templates select="term"/>
-      </fo:block>
-      <fo:block margin-left="1.4pc" text-align="left">
-        <xsl:apply-templates select="listitem"/>
-      </fo:block>
-    </xsl:when>
-    <xsl:otherwise>
-      <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
-          keep-together.within-column="always"
-          keep-with-next.within-column="always">
-        <xsl:apply-templates select="term"/>
-      </fo:block>
-      <fo:block margin-left="0.25in">
-        <xsl:apply-templates select="listitem"/>
-      </fo:block>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
+  <xsl:template match="varlistentry" mode="vl.as.blocks">
+    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+    <xsl:choose>
+      <xsl:when test="ancestor::variablelist/@role = 'materials'">
+        <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
+            keep-together.within-column="always"
+            keep-with-next.within-column="always" text-align="left">
+          <xsl:text>&#x2022;   </xsl:text>
+          <xsl:apply-templates select="term"/>
+        </fo:block>
+        <fo:block margin-left="1.4pc" text-align="left">
+          <xsl:apply-templates select="listitem"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
+            keep-together.within-column="always"
+            keep-with-next.within-column="always">
+          <xsl:apply-templates select="term"/>
+        </fo:block>
+        <fo:block margin-left="0.25in">
+          <xsl:apply-templates select="listitem"/>
+        </fo:block>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
 
 </xsl:stylesheet>

Modified: trunk/BOOK/stylesheets/xhtml/lfs-sections.xsl
===================================================================
--- trunk/BOOK/stylesheets/xhtml/lfs-sections.xsl	2006-04-28 18:17:23 UTC (rev 641)
+++ trunk/BOOK/stylesheets/xhtml/lfs-sections.xsl	2006-05-09 19:54:09 UTC (rev 642)
@@ -48,12 +48,50 @@
       <xsl:call-template name="process.chunk.footnotes"/>
     </div>
   </xsl:template>
-    
+
     <!-- Sections numbering -->
   <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 -->

Modified: trunk/BOOK/stylesheets/xhtml/lfs-titles.xsl
===================================================================
--- trunk/BOOK/stylesheets/xhtml/lfs-titles.xsl	2006-04-28 18:17:23 UTC (rev 641)
+++ trunk/BOOK/stylesheets/xhtml/lfs-titles.xsl	2006-05-09 19:54:09 UTC (rev 642)
@@ -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>

Modified: trunk/BOOK/stylesheets/xhtml/lfs-toc.xsl
===================================================================
--- trunk/BOOK/stylesheets/xhtml/lfs-toc.xsl	2006-04-28 18:17:23 UTC (rev 641)
+++ trunk/BOOK/stylesheets/xhtml/lfs-toc.xsl	2006-05-09 19:54:09 UTC (rev 642)
@@ -3,11 +3,11 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns="http://www.w3.org/1999/xhtml"
                 version="1.0">
-                
+
     <!-- General settings -->
   <xsl:param name="generate.toc">
     appendix  nop
-    book      toc,title,figure,table,example,equation
+    book      toc,title
     chapter   nop
     part      toc
     preface   nop
@@ -26,7 +26,7 @@
   <xsl:param name="toc.section.depth">1</xsl:param>
 
   <xsl:param name="toc.max.depth">3</xsl:param>
-  
+
     <!-- Making the TOC -->
   <xsl:template name="make.toc">
     <xsl:param name="toc-context" select="."/>
@@ -46,7 +46,7 @@
       </div>
     </xsl:if>
   </xsl:template>
-  
+
     <!-- Making the subtocs -->
   <xsl:template name="subtoc">
     <xsl:param name="toc-context" select="."/>
@@ -70,7 +70,7 @@
       <xsl:call-template name="toc.line">
         <xsl:with-param name="toc-context" select="$toc-context"/>
       </xsl:call-template>
-      <xsl:if test="$toc.section.depth > $depth and count($nodes)>0 
+      <xsl:if test="$toc.section.depth > $depth and count($nodes)>0
               and $toc.max.depth > $depth.from.context">
         <xsl:copy-of select="$subtoc"/>
       </xsl:if>




More information about the hlfs-book mailing list