Index: Makefile
===================================================================
--- Makefile	(revision 64f2cb5d9f9b265e13c4ca48603c13170bed640a)
+++ Makefile	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -46,6 +46,5 @@
 	  mkdir -p $(BASEDIR)images; \
 	fi;
-	cp /usr/share/xml/docbook/xsl-stylesheets-1.65.1/images/*.png \
-	  $(BASEDIR)images
+	cp images/*.png $(BASEDIR)/images
 	cd $(BASEDIR); sed -i -e "s@../stylesheets@stylesheets@" \
 	  index.html 
@@ -57,5 +56,12 @@
 	stylesheets/blfs-pdf.xsl \
 	  index.xml
+	sed -i -e "s/inherit/all/" blfs.fo
 	fop.sh blfs.fo blfs.pdf
+
+print:
+	xsltproc --xinclude --nonet --output blfs-print.fo \
+	stylesheets/blfs-print.xsl index.xml
+	sed -i -e "s/inherit/all/" blfs-print.fo
+	fop.sh blfs-print.fo blfs-print.pdf
 
 tex:
@@ -74,5 +80,5 @@
 	index.xml
 	@cd $(TEXBASEDIR) && xsltproc --nonet -o blfs-book.tex \
-	$(SRCDIR)/stylesheets/blfs-tex.xsl index.xml
+	$(SRCDIR)/stylesheets/lfs-tex.xsl index.xml
 
 validate:
Index: stylesheets/blfs-chunked.xsl
===================================================================
--- stylesheets/blfs-chunked.xsl	(revision 64f2cb5d9f9b265e13c4ca48603c13170bed640a)
+++ stylesheets/blfs-chunked.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -1,92 +1,33 @@
-<?xml version='1.0'?>
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org>
+Based on the original lfs-chunked.xsl created by Matthew Burgess -->
+
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns="http://www.w3.org/1999/xhtml"
                 version="1.0">
 
-  <!-- We use XHTML -->
+  	<!-- We use XHTML -->
   <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk.xsl"/>
   <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
+  
+  	<!-- Including our others customized templates -->
+  <xsl:include href="xhtml/lfs-admon.xsl"/>
+  <xsl:include href="xhtml/lfs-index.xsl"/>
+  <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
+  <xsl:include href="xhtml/lfs-mixed.xsl"/>
+  <xsl:include href="xhtml/lfs-navigational.xsl"/>
+  <xsl:include href="xhtml/lfs-titles.xsl"/>
+  <xsl:include href="xhtml/lfs-toc.xsl"/>
 
-  <!-- The CSS Stylesheet -->
-  <xsl:param name="html.stylesheet" select="'../stylesheets/blfs.css'"/>
+  	<!-- The CSS Stylesheet -->
+  <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
 
-  <!-- Include our customised templates -->
-  <xsl:include href="xhtml/blfs-toc.xsl"/>
-  <xsl:include href="xhtml/blfs-index.xsl"/>
-
-  <!-- Use graphics in admonitions -->
-  <xsl:param name="admon.graphics" select="1"/>
-  <xsl:param name="admon.graphics.path">../images/</xsl:param>
-  <xsl:param name="admon.graphics.extension" select="'.png'"/>
-
-  <!-- Legal Notice stuff -->
-  <xsl:param name="generate.legalnotice.link" select="1"/>
-  <xsl:template match="legalnotice" mode="titlepage.mode">
-    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-    <xsl:choose>
-      <xsl:when test="$generate.legalnotice.link != 0">
-        <xsl:variable name="filename">
-          <xsl:call-template name="make-relative-filename">
-            <xsl:with-param name="base.dir" select="''"/>
-            <xsl:with-param name="base.name" select="concat($base.dir, 'prologue/legalnotice.html')"/>
-          </xsl:call-template>
-        </xsl:variable>
-        <xsl:variable name="title">
-          <xsl:apply-templates select="." mode="title.markup"/>
-        </xsl:variable>
-        <xsl:element name="a">
-          <xsl:attribute name="href">
-            <xsl:value-of select="'prologue/legalnotice.html'"/>
-          </xsl:attribute>
-          <xsl:copy-of select="$title"/>
-        </xsl:element>
-        <xsl:call-template name="write.chunk">
-          <xsl:with-param name="filename" select="$filename"/>
-          <xsl:with-param name="quiet" select="$chunk.quietly"/>
-          <xsl:with-param name="content">
-            <html>
-              <head>
-                <xsl:call-template name="system.head.content"/>
-                <xsl:call-template name="head.content"/>
-                <xsl:call-template name="user.head.content"/>
-              </head>
-              <body>
-                <xsl:call-template name="body.attributes"/>
-                <div class="{local-name(.)}">
-                  <xsl:apply-templates mode="titlepage.mode"/>
-                </div>
-              </body>
-            </html>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <div class="{local-name(.)}">
-          <xsl:apply-templates mode="titlepage.mode"/>
-        </div>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <!--TOC stuff-->
-  <xsl:param name="generate.toc">
-    appendix  toc
-    book      toc,title,figure,table,example,equation
-    chapter   nop
-    part      toc
-    preface   nop
-    qandadiv  nop
-    qandaset  nop  
-    reference nop
-    sect1     nop
-    sect2     nop
-    sect3     nop
-    sect4     nop
-    sect5     nop
-    section   nop
-    set       nop
-  </xsl:param>
-  <xsl:param name="toc.section.depth">1</xsl:param>
-  <xsl:param name="toc.max.depth">3</xsl:param>
+  	<!-- Dropping some unwanted style attributes -->
+  <xsl:param name="ulink.target" select="''"></xsl:param>
+  <xsl:param name="css.decoration" select="0"></xsl:param>
+  
+  	<!-- No XML declaration -->
+	<xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
 
 </xsl:stylesheet>
Index: stylesheets/blfs-pdf.xsl
===================================================================
--- stylesheets/blfs-pdf.xsl	(revision 64f2cb5d9f9b265e13c4ca48603c13170bed640a)
+++ stylesheets/blfs-pdf.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -1,26 +1,38 @@
-<?xml version='1.0'?>
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org>
+Based on the original lfs-pdf.xsl created by Matthew Burgess -->
+
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                xmlns="http://www.w3.org/1999/xhtml"
                 version="1.0">
 
-  <!-- We use FO and FOP as the processor -->
-  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
+  	<!-- We use FO and FOP as the processor -->
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/fo/docbook.xsl"/>
   <xsl:param name="fop.extensions" select="1"/>
   <xsl:param name="draft.mode" select="'no'"/>
-  <!-- Probably want to make the paper size configurable -->
-  <xsl:param name="paper.type" select="'Letter'"/>
 
+  	<!-- Including our others customized templates -->
+  <xsl:include href="pdf/lfs-index.xsl"/>
+  <xsl:include href="pdf/lfs-pagesetup.xsl"/>
 
-  <!-- Font size -->
+  	<!-- Probably want to make the paper size configurable -->
+  <xsl:param name="paper.type" select="'letter'"/>
+
+		<!-- Don't hyphenate -->
+  <xsl:param name="hyphenate">false</xsl:param>
+  <xsl:param name="alignment">left</xsl:param>
+
+  	<!-- Font size -->
   <xsl:param name="body.font.master">8</xsl:param>
   <xsl:param name="body.font.size">10pt</xsl:param>
 
-  <!-- Margins -->
-  <xsl:param name="page.margin.inner">1in</xsl:param>
-  <xsl:param name="page.margin.outer">0.5in</xsl:param>
-  <xsl:param name="title.margin.left">-1pc</xsl:param>
+  	<!-- Graphics in admonitions -->
+	<xsl:param name="admon.graphics" select="1"/>
 
-  <!-- TOC stuff -->
+		<!-- Shade screen -->
+	<xsl:param name="shade.verbatim" select="1"/>
+
+  	<!-- TOC generation -->
   <xsl:param name="generate.toc">
     book      toc
@@ -28,98 +40,17 @@
   </xsl:param>
   <xsl:param name="toc.section.depth">1</xsl:param>
-  <xsl:param name="generate.section.toc.level" select="-1"></xsl:param>
-  <xsl:param name="toc.indent.width" select="18"></xsl:param>
-
-  <!-- Force section1's onto a new page -->
-  <xsl:attribute-set name="section.level1.properties">
-    <xsl:attribute name="break-after">page</xsl:attribute>
-  </xsl:attribute-set>
-
-  <!-- Columns in appendix -->
-  <xsl:param name="column.count.back" select="2"/>
-
-  <!-- Don't hyphenate -->
-  <xsl:param name="hyphenate">false</xsl:param>
-  <xsl:param name="alignment">left</xsl:param>
+  <xsl:param name="generate.section.toc.level" select="-1"/>
+  <xsl:param name="toc.indent.width" select="18"/>
 
   <!-- Page number in Xref-->
   <xsl:param name="insert.xref.page.number">yes</xsl:param>
-  <xsl:template match="xref" name="xref">
-    <xsl:variable name="targets" select="key('id',@linkend)"/>
-    <xsl:variable name="target" select="$targets[1]"/>
-    <xsl:variable name="refelem" select="local-name($target)"/>
-    <xsl:call-template name="check.id.unique">
-      <xsl:with-param name="linkend" select="@linkend"/>
-    </xsl:call-template>
-    <xsl:choose>
-      <xsl:when test="$refelem=''">
-        <xsl:message>
-          <xsl:text>XRef to nonexistent id: </xsl:text>
-          <xsl:value-of select="@linkend"/>
-        </xsl:message>
-        <xsl:text>???</xsl:text>
-      </xsl:when>
-      <xsl:when test="@endterm">
-        <fo:basic-link internal-destination="{@linkend}"
-                       xsl:use-attribute-sets="xref.properties">
-          <xsl:variable name="etargets" select="key('id',@endterm)"/>
-          <xsl:variable name="etarget" select="$etargets[1]"/>
-          <xsl:choose>
-            <xsl:when test="count($etarget) = 0">
-              <xsl:message>
-                <xsl:value-of select="count($etargets)"/>
-                <xsl:text>Endterm points to nonexistent ID: </xsl:text>
-                <xsl:value-of select="@endterm"/>
-              </xsl:message>
-              <xsl:text>???</xsl:text>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:apply-templates select="$etarget" mode="endterm"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </fo:basic-link>
-      </xsl:when>
-      <xsl:when test="$target/@xreflabel">
-        <fo:basic-link internal-destination="{@linkend}"
-                       xsl:use-attribute-sets="xref.properties">
-          <xsl:call-template name="xref.xreflabel">
-            <xsl:with-param name="target" select="$target"/>
-          </xsl:call-template>
-        </fo:basic-link>
-      </xsl:when>
-      <xsl:otherwise>
-        <fo:basic-link internal-destination="{@linkend}"
-                       xsl:use-attribute-sets="xref.properties">
-          <xsl:apply-templates select="$target" mode="xref-to">
-            <xsl:with-param name="referrer" select="."/>
-            <xsl:with-param name="xrefstyle">
-              <xsl:choose>
-                <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
-                  <xsl:value-of select="@role"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:value-of select="@xrefstyle"/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:with-param>
-          </xsl:apply-templates>
-        </fo:basic-link>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:if test="not(starts-with(normalize-space(@xrefstyle), 'select:') != ''
-                  and (contains(@xrefstyle, 'page')
-                   or contains(@xrefstyle, 'Page')))
-                  and ( $insert.xref.page.number = 'yes'
-                   or $insert.xref.page.number = '1')
-                   or local-name($target) = 'para'">
-      <fo:basic-link internal-destination="{@linkend}"
-                     xsl:use-attribute-sets="xref.properties">
-      	<xsl:text>, p. </xsl:text>
-        <xsl:apply-templates select="$target" mode="page.citation">
-          <xsl:with-param name="id" select="@linkend"/>
-        </xsl:apply-templates>
-      </fo:basic-link>
-    </xsl:if>
-  </xsl:template>
+	<xsl:template match="*" mode="page.citation">
+  	<xsl:param name="id" select="'???'"/>
+  	<fo:inline keep-together.within-line="always">
+  		<xsl:text>[p.</xsl:text>
+      <fo:page-number-citation ref-id="{$id}"/>
+  		<xsl:text>]</xsl:text>
+  	</fo:inline>
+	</xsl:template>
 
   <!-- Prevent duplicate e-mails in the Acknowledgments pages-->
Index: stylesheets/blfs-print.xsl
===================================================================
--- stylesheets/blfs-print.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/blfs-print.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,57 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org>
+Based on the original lfs-pdf.xsl created by Matthew Burgess -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+  	<!-- We use FO and FOP as the processor -->
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/fo/docbook.xsl"/>
+  <xsl:param name="fop.extensions" select="1"/>
+  <xsl:param name="draft.mode" select="'no'"/>
+
+  	<!-- Including our others customized templates -->
+  <xsl:include href="print/lfs-index.xsl"/>
+  <xsl:include href="print/lfs-pagesetup.xsl"/>
+
+  	<!-- 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="hyphenate">true</xsl:param>
+  <xsl:param name="alignment">justify</xsl:param>
+  
+  	<!-- Hyphenate links -->
+  <xsl:param name="ulink.hyphenate" select="' '"></xsl:param>
+
+  	<!-- Font size -->
+  <xsl:param name="body.font.master">8</xsl:param>
+  <xsl:param name="body.font.size">10pt</xsl:param>
+
+  	<!-- TOC stuff -->
+  <xsl:param name="generate.toc">
+    book      toc
+    part      nop
+  </xsl:param>
+  <xsl:param name="toc.section.depth">1</xsl:param>
+  <xsl:param name="generate.section.toc.level" select="-1"></xsl:param>
+  <xsl:param name="toc.indent.width" select="18"></xsl:param>
+
+  	<!-- Page number in Xref-->
+  <xsl:param name="insert.xref.page.number">yes</xsl:param>
+	<xsl:template match="*" mode="page.citation">
+  	<xsl:param name="id" select="'???'"/>
+  	<fo:inline keep-together.within-line="always">
+  		<xsl:text>[p</xsl:text>
+      <fo:page-number-citation ref-id="{$id}"/>
+  		<xsl:text>]</xsl:text>
+  	</fo:inline>
+	</xsl:template>
+
+  	<!-- Prevent duplicate e-mails in the Acknowledgments pages-->
+  <xsl:param name="ulink.show" select="0"/>
+
+</xsl:stylesheet>
Index: stylesheets/blfs.css
===================================================================
--- stylesheets/blfs.css	(revision 64f2cb5d9f9b265e13c4ca48603c13170bed640a)
+++ stylesheets/blfs.css	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -1,23 +1,25 @@
 body {
   font-weight: normal;
-  font-size: normal;
+  font-size: medium;
   font-family: verdana, tahoma, helvetica, arial, sans-serif;
   text-align: left;
 }
 
-div.navheader table {
-    font-size: smaller;
+.toc ul, .index ul {
+	list-style: none;
 }
 
-div.navfooter table {
-    font-size: smaller;
+.navheader, .navfooter {
+  font-size: smaller;
+  text-align: center;
 }
 
-div.navheader img {
-    border: medium none;
+div.navheader ul li, div.navfooter ul li {
+	display: inline;
+  padding: 4em;
 }
 
-div.navfooter img {
-    border: medium none;
+li.preface {
+	margin-left: 2.5em;
 }
 
@@ -69,38 +71,17 @@
 }
 
-div.warning {
-    border: 1px solid;
+div.admonition {
+  border: medium solid;
+  width: 90%;
+  margin: .5em auto;
 }
 
-div.note {
-    border: 1px solid;
+div.admonhead h3 {
+	display: inline;
+	margin-left: 1.5em;
 }
 
-div.important {
-    border: 1px solid;
-}
-
-div.caution {
-    border: 1px solid;
-}
-
-div.warning h3.title {
-    text-align: center
-}
-
-div.warning p {
-    padding-left: 0.2in
-}
-
-div.note {
-    padding-left: 0.2in
-}
-
-div.important {
-    padding-left: 0.2in
-}
-
-div.caution {
-    padding-left: 0.2in
+div.admonbody {
+	margin: .5em;
 }
 
@@ -119,12 +100,2 @@
     float: left;
 }
-
-.toc ul, .index ul, .navheader ul, .navfooter ul {
-	list-style: none;
-}
-
-h3, h4 {
-   margin: .3em 0em;
-}
-
-
Index: stylesheets/pdf/lfs-index.xsl
===================================================================
--- stylesheets/pdf/lfs-index.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/pdf/lfs-index.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,196 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
+<!ENTITY sep '" "'>
+]> 
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+  	<!--Only one column to fit the table layout-->
+  <xsl:param name="column.count.index" select="1"/>
+
+    <!--Title-->
+  <xsl:template match="index" mode="title.markup">
+    <xsl:text>Index of packages and important installed files</xsl:text>
+	</xsl:template>
+
+  	<!-- Divisions-->
+  <xsl:template match="indexterm" mode="index-div">
+    <xsl:param name="scope" select="."/>
+    <xsl:variable name="key"
+                  select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+    <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
+    <xsl:if test="key('letter', $key)[&scope;]
+                  [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+      <fo:block>
+        <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
+          <xsl:call-template name="indexdiv.title">
+            <xsl:with-param name="titlecontent">
+              <xsl:choose>
+                <xsl:when test="$divtitle = 'A'">
+                  <xsl:text>Packages</xsl:text>
+                </xsl:when>
+                <xsl:when test="$divtitle = 'B'">
+                    <xsl:text>Programs</xsl:text>
+                </xsl:when>
+                <xsl:when test="$divtitle = 'C'">
+                    <xsl:text>Libraries</xsl:text>
+                </xsl:when>
+                <xsl:when test="$divtitle = 'D'">
+                    <xsl:text>Scripts</xsl:text>
+                </xsl:when>
+                <xsl:when test="$divtitle = 'E'">
+                    <xsl:text>Others</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:value-of select="$divtitle"/>
+                </xsl:otherwise>
+            	</xsl:choose>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:if>
+        <fo:table table-layout="fixed" width="100%">
+      		<fo:table-column column-number="1" column-width="11em"/>
+      		<fo:table-column column-number="2" column-width="19em"/>
+      		<fo:table-column column-number="3"/>
+          <fo:table-body>
+            <xsl:apply-templates select="key('letter', $key)[&scope;]
+                                        [count(.|key('primary', &primary;)[&scope;][1])=1]"
+                                mode="index-primary">
+              <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+              <xsl:with-param name="scope" select="$scope"/>
+            </xsl:apply-templates>
+	        </fo:table-body>
+        </fo:table>
+      </fo:block>
+    </xsl:if>
+  </xsl:template>
+
+  	<!-- Dropping the separator from here -->
+  <xsl:template match="indexterm" mode="reference">
+    <xsl:param name="scope" select="."/>
+    	<xsl:call-template name="reference">
+        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+  </xsl:template>
+
+  	<!-- Changing the output tags and re-addind the separator-->
+  <xsl:template match="indexterm" mode="index-primary">
+    <xsl:param name="scope" select="."/>
+    <xsl:variable name="key" select="&primary;"/>
+    <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
+    <fo:table-row>
+    	<fo:table-cell>
+      	<fo:block>
+          <xsl:value-of select="primary"/>
+          <xsl:text>: </xsl:text>
+				</fo:block>
+      </fo:table-cell>
+      <xsl:for-each select="$refs[not(see) and not(seealso)
+                            and not(secondary)]">
+        <xsl:apply-templates select="." mode="reference">
+          <xsl:with-param name="scope" select="$scope"/>
+        </xsl:apply-templates>
+      </xsl:for-each>
+		</fo:table-row>
+		<xsl:if test="$refs/secondary">
+      <xsl:apply-templates select="$refs[secondary and count(.|key('secondary',
+      				concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary">
+				<xsl:with-param name="scope" select="$scope"/>
+				<xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
+			</xsl:apply-templates>
+		</xsl:if>
+  </xsl:template>
+
+  <xsl:template match="indexterm" mode="index-secondary">
+    <xsl:param name="scope" select="."/>
+ 		<xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
+    <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
+    <fo:table-row>
+    	<fo:table-cell>
+		    <fo:block start-indent="1pc">
+          <xsl:value-of select="secondary"/>
+          <xsl:text>: </xsl:text>
+        </fo:block>
+    	</fo:table-cell>
+      <xsl:for-each select="$refs[not(see) and not(seealso) and not(tertiary)]">
+        <xsl:apply-templates select="." mode="reference">
+          <xsl:with-param name="scope" select="$scope"/>
+        </xsl:apply-templates>
+      </xsl:for-each>
+		</fo:table-row>
+  </xsl:template>
+  
+  	<!-- Targets titles and bookmarks-->
+  <xsl:template name="reference">
+    <xsl:param name="scope" select="."/>
+    <xsl:param name="zones"/>
+    <xsl:choose>
+      <xsl:when test="contains($zones, ' ')">
+        <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+        <xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
+        <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
+        <xsl:variable name="target2" select="key('id', $zone2)[&scope;]"/>
+        <xsl:variable name="id">
+          <xsl:call-template name="object.id">
+            <xsl:with-param name="object" select="$target[1]"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="id2">
+          <xsl:call-template name="object.id">
+            <xsl:with-param name="object" select="$target2[1]"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <fo:table-cell>
+        	<fo:block>
+            <fo:basic-link internal-destination="{$id}">
+              <xsl:value-of select="$target/title"/>
+              <xsl:apply-templates select="$target" mode="page.citation">
+                <xsl:with-param name="id" select="$id"/>
+              </xsl:apply-templates>
+            </fo:basic-link>
+        	</fo:block>
+				</fo:table-cell>
+        <fo:table-cell>
+        	<fo:block>
+            <fo:basic-link internal-destination="{$id2}">
+              <xsl:text>description</xsl:text>
+              <xsl:apply-templates select="$target2" mode="page.citation">
+                <xsl:with-param name="id" select="$id2"/>
+              </xsl:apply-templates>
+            </fo:basic-link>
+        	</fo:block>
+				</fo:table-cell>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name="zone" select="$zones"/>
+        <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
+        <xsl:variable name="id">
+          <xsl:call-template name="object.id">
+            <xsl:with-param name="object" select="$target[1]"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <fo:table-cell>
+        	<fo:block>
+            <fo:basic-link internal-destination="{$id}">
+              <xsl:value-of select="$target/title"/>
+              <xsl:apply-templates select="$target" mode="page.citation">
+                <xsl:with-param name="id" select="$id"/>
+              </xsl:apply-templates>
+            </fo:basic-link>
+        	</fo:block>
+				</fo:table-cell>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: stylesheets/pdf/lfs-pagesetup.xsl
===================================================================
--- stylesheets/pdf/lfs-pagesetup.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/pdf/lfs-pagesetup.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,115 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+  	<!-- Force section1's onto a new page -->
+  <xsl:attribute-set name="section.level1.properties">
+  	<xsl:attribute name="break-after">
+    	<xsl:choose>
+  			<xsl:when test="not(position()=last())">
+      		<xsl:text>page</xsl:text>
+    		</xsl:when>
+        <xsl:otherwise>
+      		<xsl:text>auto</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+  </xsl:attribute-set>
+
+		<!-- Header -->
+  <xsl:attribute-set name="header.content.properties">
+    <xsl:attribute name="font-family">
+      <xsl:value-of select="$body.fontset"/>
+    </xsl:attribute>
+    <xsl:attribute name="text-align">right</xsl:attribute>
+  </xsl:attribute-set>
+
+  <xsl:template name="header.content">
+    <xsl:value-of select="/book/bookinfo/title"/>
+    <xsl:text> - </xsl:text>
+    <xsl:value-of select="/book/bookinfo/subtitle"/>
+  </xsl:template>
+
+  <xsl:template name="header.table">
+    <xsl:param name="gentext-key" select="''"/>
+    <xsl:choose>
+      <xsl:when test="$gentext-key = 'book'"/>
+      <xsl:otherwise>
+      	<xsl:call-template name="header.content"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+		<!-- Centered titles for book and part -->
+  <xsl:template name="book.titlepage">
+    <fo:block space-before="2in">
+      <fo:block>
+        <xsl:call-template name="book.titlepage.before.recto"/>
+        <xsl:call-template name="book.titlepage.recto"/>
+      </fo:block>
+      <fo:block>
+        <xsl:call-template name="book.titlepage.before.verso"/>
+        <xsl:call-template name="book.titlepage.verso"/>
+      </fo:block>
+      <xsl:call-template name="book.titlepage.separator"/>
+    </fo:block>
+  </xsl:template>
+
+  <xsl:template name="part.titlepage">
+    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:block space-before="2.5in">
+        <xsl:call-template name="part.titlepage.before.recto"/>
+        <xsl:call-template name="part.titlepage.recto"/>
+      </fo:block>
+      <fo:block>
+        <xsl:call-template name="part.titlepage.before.verso"/>
+        <xsl:call-template name="part.titlepage.verso"/>
+      </fo:block>
+      <xsl:call-template name="part.titlepage.separator"/>
+    </fo:block>
+  </xsl:template>
+
+  	<!-- Margins -->
+  <xsl:param name="page.margin.inner">0.75in</xsl:param>
+  <xsl:param name="page.margin.outer">0.75in</xsl:param>
+  <xsl:param name="title.margin.left">-1pc</xsl:param>
+  <xsl:attribute-set name="normal.para.spacing">
+    <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="list.block.spacing">
+    <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="list.item.spacing">
+    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="verbatim.properties">
+    <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
+  </xsl:attribute-set>
+
+  	<!-- Others-->
+  <xsl:param name="header.rule" select="0"></xsl:param>
+  <xsl:param name="footer.rule" select="0"></xsl:param>
+	<xsl:param name="marker.section.level" select="-1"></xsl:param>
+
+  	<!-- Dropping a blank page -->
+	<xsl:template name="book.titlepage.separator"/>
+
+</xsl:stylesheet>
Index: stylesheets/print/lfs-index.xsl
===================================================================
--- stylesheets/print/lfs-index.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/print/lfs-index.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,127 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
+]> 
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+    <!--Title-->
+  <xsl:template match="index" mode="title.markup">
+  	<xsl:param name="allow-anchors" select="0"/>
+    <xsl:text>Index of packages and important installed files</xsl:text>
+	</xsl:template>
+
+  	<!-- Divisions-->
+  <xsl:template match="indexterm" mode="index-div">
+    <xsl:param name="scope" select="."/>
+    <xsl:variable name="key"
+                  select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+    <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
+    <xsl:if test="key('letter', $key)[&scope;]
+                  [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+      <fo:block>
+        <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
+          <xsl:call-template name="indexdiv.title">
+            <xsl:with-param name="titlecontent">
+              <xsl:choose>
+                <xsl:when test="$divtitle = 'A'">
+                  <xsl:text>Packages</xsl:text>
+              </xsl:when>
+              <xsl:when test="$divtitle = 'B'">
+                  <xsl:text>Programs</xsl:text>
+              </xsl:when>
+              <xsl:when test="$divtitle = 'C'">
+                  <xsl:text>Libraries</xsl:text>
+              </xsl:when>
+              <xsl:when test="$divtitle = 'D'">
+                  <xsl:text>Scripts</xsl:text>
+              </xsl:when>
+              <xsl:when test="$divtitle = 'E'">
+                  <xsl:text>Others</xsl:text>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="$divtitle"/>
+              </xsl:otherwise>
+            </xsl:choose>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:if>
+        <fo:block>
+          <xsl:apply-templates select="key('letter', $key)[&scope;]
+                                      [count(.|key('primary', &primary;)[&scope;][1])=1]"
+                              mode="index-primary">
+            <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+            <xsl:with-param name="scope" select="$scope"/>
+          </xsl:apply-templates>
+        </fo:block>
+      </fo:block>
+    </xsl:if>
+  </xsl:template>
+
+  	<!-- The separator -->
+  <xsl:template match="indexterm" mode="reference">
+    <xsl:param name="scope" select="."/>
+    <xsl:text>:   </xsl:text>
+    	<xsl:call-template name="reference">
+        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+  </xsl:template>
+  
+  	<!--Bookmarks-->
+  <xsl:template name="reference">
+    <xsl:param name="scope" select="."/>
+    <xsl:param name="zones"/>
+    <xsl:choose>
+      <xsl:when test="contains($zones, ' ')">
+        <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+        <xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
+        <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
+        <xsl:variable name="target2" select="key('id', $zone2)[&scope;]"/>
+        <xsl:variable name="id">
+          <xsl:call-template name="object.id">
+            <xsl:with-param name="object" select="$target[1]"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="id2">
+          <xsl:call-template name="object.id">
+            <xsl:with-param name="object" select="$target2[1]"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <fo:basic-link internal-destination="{$id}">
+          <xsl:apply-templates select="$target" mode="page.citation">
+          	<xsl:with-param name="id" select="$id"/>
+          </xsl:apply-templates>
+        </fo:basic-link>
+          <xsl:text> ,  </xsl:text>
+        <fo:basic-link internal-destination="{$id2}">
+          <xsl:apply-templates select="$target2" mode="page.citation">
+          	<xsl:with-param name="id" select="$id2"/>
+          </xsl:apply-templates>
+        </fo:basic-link>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name="zone" select="$zones"/>
+        <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
+        <xsl:variable name="id">
+          <xsl:call-template name="object.id">
+            <xsl:with-param name="object" select="$target[1]"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <fo:basic-link internal-destination="{$id}">
+          <xsl:apply-templates select="$target" mode="page.citation">
+          	<xsl:with-param name="id" select="$id"/>
+          </xsl:apply-templates>
+        </fo:basic-link>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: stylesheets/print/lfs-pagesetup.xsl
===================================================================
--- stylesheets/print/lfs-pagesetup.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/print/lfs-pagesetup.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,120 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+  	<!-- Force section1's onto a new page -->
+  <xsl:attribute-set name="section.level1.properties">
+  	<xsl:attribute name="break-after">
+    	<xsl:choose>
+  			<xsl:when test="not(position()=last())">
+      		<xsl:text>page</xsl:text>
+    		</xsl:when>
+        <xsl:otherwise>
+      		<xsl:text>auto</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+  </xsl:attribute-set>
+
+		<!-- Header -->
+  <xsl:template name="header.content">
+  	<xsl:param name="sequence" select="''"/>
+		<fo:block>
+      <xsl:attribute name="text-align">
+        <xsl:choose>
+          <xsl:when test="$sequence = 'first' or $sequence = 'odd'">right</xsl:when>
+          <xsl:otherwise>left</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+      <xsl:value-of select="/book/bookinfo/title"/>
+      <xsl:text> - </xsl:text>
+      <xsl:value-of select="/book/bookinfo/subtitle"/>
+    </fo:block>
+  </xsl:template>
+
+  <xsl:template name="header.table">
+  	<xsl:param name="sequence" select="''"/>
+    <xsl:param name="gentext-key" select="''"/>
+    <xsl:choose>
+      <xsl:when test="$gentext-key = 'book' or $sequence = 'blank'"/>
+      <xsl:otherwise>
+      	<xsl:call-template name="header.content">
+					<xsl:with-param name="sequence" select="$sequence"/>
+				</xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+		<!-- Centered titles for book and part -->
+  <xsl:template name="book.titlepage">
+    <fo:block space-before="2in">
+      <fo:block>
+        <xsl:call-template name="book.titlepage.before.recto"/>
+        <xsl:call-template name="book.titlepage.recto"/>
+      </fo:block>
+      <fo:block>
+        <xsl:call-template name="book.titlepage.before.verso"/>
+        <xsl:call-template name="book.titlepage.verso"/>
+      </fo:block>
+      <xsl:call-template name="book.titlepage.separator"/>
+    </fo:block>
+  </xsl:template>
+
+  <xsl:template name="part.titlepage">
+    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:block space-before="2.5in">
+        <xsl:call-template name="part.titlepage.before.recto"/>
+        <xsl:call-template name="part.titlepage.recto"/>
+      </fo:block>
+      <fo:block>
+        <xsl:call-template name="part.titlepage.before.verso"/>
+        <xsl:call-template name="part.titlepage.verso"/>
+      </fo:block>
+      <xsl:call-template name="part.titlepage.separator"/>
+    </fo:block>
+  </xsl:template>
+
+  	<!-- Margins -->
+  <xsl:param name="page.margin.inner">1in</xsl:param>
+  <xsl:param name="page.margin.outer">0.5in</xsl:param>
+  <xsl:param name="title.margin.left">-1pc</xsl:param>
+  <xsl:attribute-set name="normal.para.spacing">
+    <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="list.block.spacing">
+    <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="list.item.spacing">
+    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="verbatim.properties">
+    <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
+  </xsl:attribute-set>
+
+  	<!-- Others-->
+  <xsl:param name="header.rule" select="0"></xsl:param>
+  <xsl:param name="footer.rule" select="0"></xsl:param>
+	<xsl:param name="marker.section.level" select="-1"></xsl:param>
+
+  	<!-- Dropping a blank page -->
+	<xsl:template name="book.titlepage.separator"/>
+
+</xsl:stylesheet>
Index: ylesheets/xhtml/blfs-index.xsl
===================================================================
--- stylesheets/xhtml/blfs-index.xsl	(revision 64f2cb5d9f9b265e13c4ca48603c13170bed640a)
+++ 	(revision )
@@ -1,177 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
-<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
-<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
-<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
-]>
-
-<!-- Version 0.8.0 - Manuel Canales Esparcia <macana@lfs-es.org> -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-	<!--Index Stuff-->
-
-    <!--Filename-->
-  <xsl:template match="index" mode="recursive-chunk-filename">
-    <xsl:text>longindex.html</xsl:text>
-  </xsl:template>
-
-    <!--Title-->
-  <xsl:template match="index" mode="title.markup">
-  	<xsl:param name="allow-anchors" select="0"/>
-    <xsl:text>Index of packages and important installed files</xsl:text>
-	</xsl:template>
-
-  	<!--Divisions-->
-  <xsl:template match="indexterm" mode="index-div">
-    <xsl:param name="scope" select="."/>
-    <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
-    <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
-    	<!-- Make sure that we don't generate a div if there are no terms in scope -->
-    <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
-      <div class="indexdiv">
-        <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
-          <h2>
-          	<xsl:choose>
-            	<xsl:when test="$divtitle = 'A'">
-              	<xsl:text>Packages</xsl:text>
-             </xsl:when>
-             <xsl:when test="$divtitle = 'B'">
-              	<xsl:text>Programs</xsl:text>
-             </xsl:when>
-             <xsl:when test="$divtitle = 'C'">
-              	<xsl:text>Libraries</xsl:text>
-             </xsl:when>
-             <xsl:when test="$divtitle = 'D'">
-              	<xsl:text>Scripts</xsl:text>
-             </xsl:when>
-              <xsl:when test="$divtitle = 'E'">
-                  <xsl:text>Others</xsl:text>
-              </xsl:when>
-             <xsl:otherwise>
-          		<xsl:value-of select="$divtitle"/>
-						</xsl:otherwise>
-           </xsl:choose>
-          </h2>
-        </xsl:if>
-        <ul>
-          <xsl:apply-templates select="key('letter', $key)[&scope;]
-          				[count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary">
-            <xsl:with-param name="scope" select="$scope"/>
-            <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
-          </xsl:apply-templates>
-        </ul>
-      </div>
-    </xsl:if>
-  </xsl:template>
-
-  	<!-- Dropping the separator from here-->
-  <xsl:template match="indexterm" mode="reference">
-    <xsl:param name="scope" select="."/>
-      <xsl:call-template name="reference">
-        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
-        <xsl:with-param name="scope" select="$scope"/>
-      </xsl:call-template>
-	</xsl:template>
-
-  	<!-- Changing the output tags and re-addind the separator-->
-  <xsl:template match="indexterm" mode="index-primary">
-    <xsl:param name="scope" select="."/>
-    <xsl:variable name="key" select="&primary;"/>
-    <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
-    <li>
-    	<strong class="item">
-      	<xsl:value-of select="primary"/>
-        <xsl:text>: </xsl:text>
-			</strong>
-      <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section',
-      				concat($key, &#34; &#34;, generate-id((ancestor-or-self::book |ancestor-or-self::part
-              |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface
-              |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3
-              |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]">
-        <xsl:apply-templates select="." mode="reference">
-          <xsl:with-param name="scope" select="$scope"/>
-        </xsl:apply-templates>
-      </xsl:for-each>
-    	<xsl:if test="$refs/secondary">
-        <ul>
-          <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', 
-          				concat($key, &#34; &#34;, normalize-space(concat(secondary/@sortas,
-                  secondary[not(@sortas)]))))[&scope;][1]) = 1]" mode="index-secondary">
-            <xsl:with-param name="scope" select="$scope"/>
-            <xsl:sort select="translate(normalize-space(concat(secondary/@sortas, 
-            				secondary[not(@sortas)])), &lowercase;, &uppercase;)"/>
-          </xsl:apply-templates>
-     		</ul>
-    	</xsl:if>
-    </li>
-  </xsl:template>
-  <xsl:template match="indexterm" mode="index-secondary">
-    <xsl:param name="scope" select="."/>
-    <xsl:variable name="key" select="concat(&primary;, &#34; &#34;,
-    				normalize-space(concat(secondary/@sortas, secondary[not(@sortas)])))"/>
-    <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
-    <li>
-    	<strong class="secitem">
-      	<xsl:value-of select="secondary"/>
-        <xsl:text>: </xsl:text>
-			</strong>
-      <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section',
-      				concat($key, &#34; &#34;, generate-id((ancestor-or-self::book |ancestor-or-self::part
-              |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface
-              |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3
-              |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]">
-        <xsl:apply-templates select="." mode="reference">
-          <xsl:with-param name="scope" select="$scope"/>
-        </xsl:apply-templates>
-      </xsl:for-each>
-    </li>
-  </xsl:template>
-
-    <!--Links (This template also fix a bug in the original code)-->
-  <xsl:template name="reference">
-    <xsl:param name="scope" select="."/>
-    <xsl:param name="zones"/>
-    <xsl:choose>
-      <xsl:when test="contains($zones, ' ')">
-        <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
-        <xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
-        <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
-        <xsl:variable name="target2" select="key('sections', $zone2)[&scope;]"/>
-        <a>
-          <xsl:attribute name="href">
-            <xsl:call-template name="href.target.uri">
-              <xsl:with-param name="object" select="$target[1]"/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
-        </a>
-        <xsl:text> -- </xsl:text>
-        <a>
-          <xsl:attribute name="href">
-            <xsl:call-template name="href.target.uri">
-              <xsl:with-param name="object" select="$target2[1]"/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:text>description</xsl:text>
-        </a>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:variable name="zone" select="$zones"/>
-        <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
-        <a>
-          <xsl:attribute name="href">
-            <xsl:call-template name="href.target.uri">
-              <xsl:with-param name="object" select="$target[1]"/>
-            </xsl:call-template>
-          </xsl:attribute>
-          <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
-        </a>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: ylesheets/xhtml/blfs-toc.xsl
===================================================================
--- stylesheets/xhtml/blfs-toc.xsl	(revision 64f2cb5d9f9b265e13c4ca48603c13170bed640a)
+++ 	(revision )
@@ -1,110 +1,0 @@
-<?xml version='1.0' encoding='ISO-8859-1'?>
-
-<!-- Version 0.8.0 - Manuel Canales Esparcia <macana@lfs-es.org> -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns="http://www.w3.org/1999/xhtml"
-                version="1.0">
-
-
-<!--TOC stuff-->
-  <xsl:param name="generate.toc">
-    appendix  toc
-    book      toc,title,figure,table,example,equation
-    chapter   nop
-    part      toc
-    preface   nop
-    qandadiv  nop
-    qandaset  nop
-    reference nop
-    sect1     nop
-    sect2     nop
-    sect3     nop
-    sect4     nop
-    sect5     nop
-    section   nop
-    set       nop
-  </xsl:param>
-
-  <xsl:param name="toc.section.depth">1</xsl:param>
-
-  <xsl:param name="toc.max.depth">3</xsl:param>
-
-    <!-- Type of list-->
-  <xsl:param name="toc.list.type">ul</xsl:param>
-
-    <!--Adding the h* tags and dropping redundats links-->
-  <xsl:template name="toc.line">
-    <xsl:param name="toc-context" select="."/>
-    <xsl:param name="depth" select="1"/>
-    <xsl:param name="depth.from.context" select="8"/>
-    <xsl:choose>
-      <xsl:when test="local-name(.) = 'sect1'">
-        <span>
-          <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
-          <a>
-            <xsl:attribute name="href">
-              <xsl:call-template name="href.target">
-                <xsl:with-param name="context" select="$toc-context"/>
-              </xsl:call-template>
-            </xsl:attribute>
-            <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-          </a>
-        </span>
-      </xsl:when>
-      <xsl:when test="local-name(.) = 'chapter' or local-name(.) = 'preface'">
-        <h4>
-          <span>
-            <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
-            <xsl:variable name="label">
-              <xsl:apply-templates select="." mode="label.markup"/>
-            </xsl:variable>
-            <xsl:copy-of select="$label"/>
-            <xsl:if test="$label != ''">
-              <xsl:value-of select="$autotoc.label.separator"/>
-            </xsl:if>
-            <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-          </span>
-        </h4>
-      </xsl:when>
-      <xsl:when test="local-name(.) = 'part'">
-        <h3>
-          <span>
-            <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
-            <xsl:variable name="label">
-              <xsl:apply-templates select="." mode="label.markup"/>
-            </xsl:variable>
-            <xsl:copy-of select="$label"/>
-            <xsl:if test="$label != ''">
-              <xsl:value-of select="$autotoc.label.separator"/>
-            </xsl:if>
-            <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-          </span>
-        </h3>
-      </xsl:when>
-      <xsl:otherwise>
-        <h3>
-          <span>
-            <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
-            <a>
-              <xsl:attribute name="href">
-                <xsl:call-template name="href.target">
-                  <xsl:with-param name="context" select="$toc-context"/>
-                </xsl:call-template>
-              </xsl:attribute>
-              <xsl:variable name="label">
-                <xsl:apply-templates select="." mode="label.markup"/>
-              </xsl:variable>
-              <xsl:copy-of select="$label"/>
-              <xsl:if test="$label != ''">
-                <xsl:value-of select="$autotoc.label.separator"/>
-              </xsl:if>
-              <xsl:apply-templates select="." mode="titleabbrev.markup"/>
-            </a>
-          </span>
-        </h3>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: stylesheets/xhtml/lfs-admon.xsl
===================================================================
--- stylesheets/xhtml/lfs-admon.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/xhtml/lfs-admon.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,47 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+  	<!-- Use graphics in admonitions -->
+  <xsl:param name="admon.graphics" select="1"/>
+  <xsl:param name="admon.graphics.path">../images/</xsl:param>
+  <xsl:param name="admon.graphics.extension" select="'.png'"/>
+
+  	<!-- Changing the output tagging -->
+  <xsl:template name="graphical.admonition">
+    <xsl:variable name="admon.type">
+      <xsl:choose>
+        <xsl:when test="local-name(.)='note'">Note</xsl:when>
+        <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
+        <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
+        <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
+        <xsl:when test="local-name(.)='important'">Important</xsl:when>
+        <xsl:otherwise>Note</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <div class="admonition">
+    	<div class ="admonhead">
+        <img alt="[{$admon.type}]">
+          <xsl:attribute name="src">
+            <xsl:call-template name="admon.graphic"/>
+          </xsl:attribute>
+        </img>
+        <h3 class="{name(.)}">
+          <xsl:value-of select="$admon.type"/>
+          <xsl:if test="title">
+            <xsl:text>: </xsl:text>
+            <xsl:value-of select="title"/>
+          </xsl:if>
+        </h3>
+      </div>
+      <div class="admonbody">
+				<xsl:apply-templates/>
+      </div>
+    </div>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: stylesheets/xhtml/lfs-index.xsl
===================================================================
--- stylesheets/xhtml/lfs-index.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/xhtml/lfs-index.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,188 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
+]>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!--Filename-->
+  <xsl:template match="index" mode="recursive-chunk-filename">
+    <xsl:text>longindex.html</xsl:text>
+  </xsl:template>
+
+    <!--Title-->
+  <xsl:param name="index-title">Index of packages and important installed files</xsl:param>
+  
+  <xsl:template match="index" mode="title.markup">
+    <xsl:value-of select="$index-title"/>
+	</xsl:template>
+  
+  <xsl:template name="index.titlepage">
+    <div class="titlepage">
+    	<h1 class="index">
+    		<xsl:value-of select="$index-title"/>
+			</h1>
+    </div>
+  </xsl:template>
+
+  	<!--Divisions-->
+  <xsl:template match="indexterm" mode="index-div">
+    <xsl:param name="scope" select="."/>
+    <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+    <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
+    	<!-- Make sure that we don't generate a div if there are no terms in scope -->
+    <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+      <div class="indexdiv">
+        <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
+          <h2>
+          	<xsl:choose>
+            	<xsl:when test="$divtitle = 'A'">
+              	<xsl:text>Packages</xsl:text>
+             </xsl:when>
+             <xsl:when test="$divtitle = 'B'">
+              	<xsl:text>Programs</xsl:text>
+             </xsl:when>
+             <xsl:when test="$divtitle = 'C'">
+              	<xsl:text>Libraries</xsl:text>
+             </xsl:when>
+             <xsl:when test="$divtitle = 'D'">
+              	<xsl:text>Scripts</xsl:text>
+             </xsl:when>
+              <xsl:when test="$divtitle = 'E'">
+                  <xsl:text>Others</xsl:text>
+              </xsl:when>
+             <xsl:otherwise>
+          		<xsl:value-of select="$divtitle"/>
+						</xsl:otherwise>
+           </xsl:choose>
+          </h2>
+        </xsl:if>
+        <ul>
+          <xsl:apply-templates select="key('letter', $key)[&scope;]
+          				[count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary">
+            <xsl:with-param name="scope" select="$scope"/>
+            <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+          </xsl:apply-templates>
+        </ul>
+      </div>
+    </xsl:if>
+  </xsl:template>
+
+  	<!-- Dropping the separator from here-->
+  <xsl:template match="indexterm" mode="reference">
+    <xsl:param name="scope" select="."/>
+      <xsl:call-template name="reference">
+        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+        <xsl:with-param name="scope" select="$scope"/>
+      </xsl:call-template>
+	</xsl:template>
+
+  	<!-- Changing the output tags and re-addind the separator-->
+  <xsl:template match="indexterm" mode="index-primary">
+    <xsl:param name="scope" select="."/>
+    <xsl:variable name="key" select="&primary;"/>
+    <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
+    <li>
+    	<strong class="item">
+      	<xsl:value-of select="primary"/>
+        <xsl:text>: </xsl:text>
+			</strong>
+      <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section',
+      				concat($key, &#34; &#34;, generate-id((ancestor-or-self::book |ancestor-or-self::part
+              |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface
+              |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3
+              |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]">
+        <xsl:apply-templates select="." mode="reference">
+          <xsl:with-param name="scope" select="$scope"/>
+        </xsl:apply-templates>
+      </xsl:for-each>
+    	<xsl:if test="$refs/secondary">
+        <ul>
+          <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', 
+          				concat($key, &#34; &#34;, normalize-space(concat(secondary/@sortas,
+                  secondary[not(@sortas)]))))[&scope;][1]) = 1]" mode="index-secondary">
+            <xsl:with-param name="scope" select="$scope"/>
+            <xsl:sort select="translate(normalize-space(concat(secondary/@sortas, 
+            				secondary[not(@sortas)])), &lowercase;, &uppercase;)"/>
+          </xsl:apply-templates>
+     		</ul>
+    	</xsl:if>
+    </li>
+  </xsl:template>
+
+  <xsl:template match="indexterm" mode="index-secondary">
+    <xsl:param name="scope" select="."/>
+    <xsl:variable name="key" select="concat(&primary;, &#34; &#34;,
+    				normalize-space(concat(secondary/@sortas, secondary[not(@sortas)])))"/>
+    <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
+    <li>
+    	<strong class="secitem">
+      	<xsl:value-of select="secondary"/>
+        <xsl:text>: </xsl:text>
+			</strong>
+      <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section',
+      				concat($key, &#34; &#34;, generate-id((ancestor-or-self::book |ancestor-or-self::part
+              |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface
+              |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3
+              |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::index)[last()])))[&scope;][1])]">
+        <xsl:apply-templates select="." mode="reference">
+          <xsl:with-param name="scope" select="$scope"/>
+        </xsl:apply-templates>
+      </xsl:for-each>
+    </li>
+  </xsl:template>
+
+    <!--Links (This template also fix a bug in the original code)-->
+  <xsl:template name="reference">
+    <xsl:param name="scope" select="."/>
+    <xsl:param name="zones"/>
+    <xsl:choose>
+      <xsl:when test="contains($zones, ' ')">
+        <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+        <xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
+        <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
+        <xsl:variable name="target2" select="key('sections', $zone2)[&scope;]"/>
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target.uri">
+              <xsl:with-param name="object" select="$target[1]"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+        </a>
+        <xsl:text> -- </xsl:text>
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target.uri">
+              <xsl:with-param name="object" select="$target2[1]"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:text>description</xsl:text>
+        </a>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name="zone" select="$zones"/>
+        <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target.uri">
+              <xsl:with-param name="object" select="$target[1]"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+        </a>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+    <!-- Dropping unneeded anchors -->
+  <xsl:template match="indexterm"/>
+
+</xsl:stylesheet>
Index: stylesheets/xhtml/lfs-legalnotice.xsl
===================================================================
--- stylesheets/xhtml/lfs-legalnotice.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/xhtml/lfs-legalnotice.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,76 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+  	<!-- Generating the page -->
+  <xsl:template match="legalnotice" mode="titlepage.mode">
+    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+      <xsl:variable name="filename" select="concat($base.dir, 'prologue/legalnotice.html')"/>
+    <xsl:variable name="title">
+      <xsl:apply-templates select="." mode="title.markup"/>
+    </xsl:variable>
+    <xsl:call-template name="write.chunk">
+      <xsl:with-param name="filename" select="$filename"/>
+      <xsl:with-param name="quiet" select="$chunk.quietly"/>
+      <xsl:with-param name="content">
+        <html>
+          <head>
+            <xsl:call-template name="system.head.content"/>
+            <xsl:call-template name="head.content"/>
+            <xsl:call-template name="user.head.content"/>
+          </head>
+          <body>
+            <xsl:call-template name="body.attributes"/>
+            <div class="{local-name(.)}">
+              <xsl:apply-templates mode="titlepage.mode"/>
+            </div>
+            <hr/>
+            <div class="navfooter">
+              <ul class="footerlinks">
+                <li>
+                  <a accesskey="h">
+                    <xsl:attribute name="href">
+                      <xsl:text>../index.html</xsl:text>
+                    </xsl:attribute>
+                    <xsl:text>Home</xsl:text>
+                  </a>
+                </li>
+              </ul>
+            </div>
+          </body>
+        </html>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+
+    <!-- Making the link-->
+  <xsl:template match="copyright" mode="titlepage.mode">
+    <p class="{name(.)}">
+      <a>
+        <xsl:attribute name="href">
+          <xsl:value-of select="'prologue/legalnotice.html'"/>
+        </xsl:attribute>
+        <xsl:call-template name="gentext">
+          <xsl:with-param name="key" select="'Copyright'"/>
+        </xsl:call-template>
+      </a>
+      <xsl:call-template name="gentext.space"/>
+      <xsl:call-template name="dingbat">
+        <xsl:with-param name="dingbat">copyright</xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="gentext.space"/>
+      <xsl:call-template name="copyright.years">
+        <xsl:with-param name="years" select="year"/>
+        <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
+        <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/>
+      </xsl:call-template>
+      <xsl:call-template name="gentext.space"/>
+      <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+    </p>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: stylesheets/xhtml/lfs-mixed.xsl
===================================================================
--- stylesheets/xhtml/lfs-mixed.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/xhtml/lfs-mixed.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,39 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+  <xsl:template match="screen">
+    <xsl:choose>
+    		<!-- Temporally hack -->
+      <xsl:when test="child::* = userinput">
+        <pre class="{name(.)}">
+          <kbd class="command">
+            <xsl:value-of select="."/>
+          </kbd>
+        </pre>
+      </xsl:when>
+      <!-- This should be fixed in the XML code -->
+      <!--
+      <xsl:when test="contains(text() , 'SBU')">
+        <p class="sbu">
+          <tt>
+            <xsl:value-of select="substring-before(text() , 'R')"/>
+            <br/>
+            <xsl:value-of select="substring-after(text() , 'U')"/>
+          </tt>
+        </p>
+      </xsl:when>
+      -->
+      <xsl:otherwise>
+        <pre class="{name(.)}">
+          <xsl:apply-templates/>
+        </pre>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: stylesheets/xhtml/lfs-navigational.xsl
===================================================================
--- stylesheets/xhtml/lfs-navigational.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/xhtml/lfs-navigational.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,156 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+    <!-- Dropping the HEAD links -->
+  <xsl:template name="html.head">
+    <head>
+      <xsl:call-template name="system.head.content"/>
+      <xsl:call-template name="head.content"/>
+      <xsl:call-template name="user.head.content"/>
+    </head>
+  </xsl:template>
+
+  	<!-- Header Navigation-->
+  <xsl:template name="header.navigation">
+    <xsl:param name="prev" select="/foo"/>
+    <xsl:param name="next" select="/foo"/>
+    <xsl:param name="nav.context"/>
+    <xsl:variable name="home" select="/*[1]"/>
+    <xsl:variable name="up" select="parent::*"/>
+    <xsl:variable name="row" select="count($prev) &gt; 0 or (count($up) &gt; 0
+            and generate-id($up) != generate-id($home)) or count($next) &gt; 0"/>
+    <xsl:if test="$row and $home != .">
+      <div class="navheader">
+        <xsl:if test="$home != .">
+          <div class="headertitles">
+            <p>
+              <xsl:apply-templates select="$home" mode="object.title.markup"/>
+              <xsl:text> - </xsl:text>
+              <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
+            </p>
+            <xsl:if test="$up != $home">
+              <p><b>
+                <xsl:apply-templates select="$up" mode="object.title.markup"/>
+              </b></p>
+            </xsl:if>
+          </div>
+        </xsl:if>
+        <ul class="headerlinks">
+          <xsl:if test="count($prev)&gt;0 and $prev != $home">
+            <li>
+              <a accesskey="p">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="$prev"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:text>Prev</xsl:text>
+              </a>
+            </li>
+          </xsl:if>
+          <li>
+            <a accesskey="h">
+              <xsl:attribute name="href">
+                <xsl:call-template name="href.target">
+                  <xsl:with-param name="object" select="$home"/>
+                </xsl:call-template>
+              </xsl:attribute>
+              <xsl:text>Home</xsl:text>
+            </a>
+          </li>
+          <xsl:if test="count($next)&gt;0">
+            <li>
+              <a accesskey="n">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="$next"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:text>Next</xsl:text>
+              </a>
+            </li>
+          </xsl:if>
+        </ul>
+      </div>
+      <hr/>
+    </xsl:if>
+  </xsl:template>
+
+  	<!-- Footer Navigation-->
+  <xsl:template name="footer.navigation">
+    <xsl:param name="prev" select="/foo"/>
+    <xsl:param name="next" select="/foo"/>
+    <xsl:param name="nav.context"/>
+    <xsl:variable name="home" select="/*[1]"/>
+    <xsl:variable name="up" select="parent::*"/>
+    <xsl:variable name="row" select="count($prev) &gt; 0 or count($up) &gt; 0
+            or count($next) &gt; 0 or generate-id($home) != generate-id(.)"/>
+    <xsl:if test="$row">
+      <hr/>
+      <div class="navfooter">
+        <ul>
+          <xsl:if test="count($prev)&gt;0 and $prev != $home">
+            <li>
+              <a accesskey="p">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="$prev"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:text>Prev</xsl:text>
+              </a>
+              <xsl:text> </xsl:text>
+              <xsl:apply-templates select="$prev" mode="object.title.markup"/>
+            </li>
+          </xsl:if>
+          <xsl:if test="count($up)&gt;0 and $up != $home">
+            <li>
+              <a accesskey="u">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="$up"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:text>Up</xsl:text>
+              </a>
+            </li>
+          </xsl:if>
+          <xsl:if  test="$home != .">
+            <li>
+              <a accesskey="h">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="$home"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:text>Home</xsl:text>
+              </a>
+            </li>
+          </xsl:if>
+          <xsl:if test="count($next)&gt;0">
+            <li>
+              <a accesskey="n">
+                <xsl:attribute name="href">
+                  <xsl:call-template name="href.target">
+                    <xsl:with-param name="object" select="$next"/>
+                  </xsl:call-template>
+                </xsl:attribute>
+                <xsl:text>Next</xsl:text>
+              </a>
+              <xsl:text> </xsl:text>
+              <xsl:apply-templates select="$next" mode="object.title.markup"/>
+            </li>
+          </xsl:if>
+        </ul>
+      </div>
+    </xsl:if>
+  </xsl:template>
+
+</xsl:stylesheet>
+
+
Index: stylesheets/xhtml/lfs-titles.xsl
===================================================================
--- stylesheets/xhtml/lfs-titles.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/xhtml/lfs-titles.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,80 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9- Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://www.w3.org/1999/xhtml"
+                version="1.0">
+
+  <xsl:template name="part.titlepage">
+    <div class="titlepage">
+      <h1 class="{name(.)}">
+        <xsl:value-of select="title"/>
+      </h1>
+    </div>
+  </xsl:template>
+
+  <xsl:template name="chapter.titlepage">
+    <div class="titlepage">
+      <h1 class="{name(.)}">
+        <xsl:value-of select="title"/>
+      </h1>
+    </div>
+  </xsl:template>
+
+  <xsl:template name="preface.titlepage">
+    <div class="titlepage">
+      <h1 class="{name(.)}">
+        <xsl:value-of select="title"/>
+      </h1>
+    </div>
+  </xsl:template>
+
+  <xsl:template name="sect1.titlepage">
+    <xsl:choose>
+    		<!-- I should find a better test -->
+      <xsl:when test="position() = 4">
+        <div class="titlepage">
+          <xsl:if test="@id">
+            <a id="{@id}" name="{@id}"/>
+          </xsl:if>
+          <h2 class="{name(.)}">
+            <xsl:value-of select="title"/>
+          </h2>
+        </div>
+      </xsl:when>
+      <xsl:otherwise>
+        <div class="titlepage">
+          <h1 class="{name(.)}">
+            <xsl:value-of select="title"/>
+          </h1>
+        </div>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name="sect2.titlepage">
+    <xsl:choose>
+      <xsl:when test="string-length(title) = 0"/>
+      <xsl:otherwise>
+        <div class="titlepage">
+          <xsl:if test="@id">
+            <a id="{@id}" name="{@id}"/>
+          </xsl:if>
+          <h3 class="{name(.)}">
+            <xsl:value-of select="title"/>
+          </h3>
+        </div>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name="dedication.titlepage">
+    <div class="titlepage">
+      <h2 class="{name(.)}">
+        <xsl:value-of select="title"/>
+      </h2>
+    </div>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: stylesheets/xhtml/lfs-toc.xsl
===================================================================
--- stylesheets/xhtml/lfs-toc.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
+++ stylesheets/xhtml/lfs-toc.xsl	(revision 5d4975d2503e4cf915c85c0f7e0cf4af754d0af7)
@@ -0,0 +1,144 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<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  toc
+    book      toc,title,figure,table,example,equation
+    chapter   nop
+    part      toc
+    preface   nop
+    qandadiv  nop
+    qandaset  nop
+    reference nop
+    sect1     nop
+    sect2     nop
+    sect3     nop
+    sect4     nop
+    sect5     nop
+    section   nop
+    set       nop
+  </xsl:param>
+
+  <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="."/>
+    <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
+    <xsl:if test="$nodes">
+      <div class="toc">
+        <h3>
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key">TableofContents</xsl:with-param>
+          </xsl:call-template>
+        </h3>
+        <ul>
+          <xsl:apply-templates select="$nodes" mode="toc">
+            <xsl:with-param name="toc-context" select="$toc-context"/>
+          </xsl:apply-templates>
+        </ul>
+      </div>
+    </xsl:if>
+  </xsl:template>
+	
+    <!-- Making the subtocs -->
+  <xsl:template name="subtoc">
+    <xsl:param name="toc-context" select="."/>
+    <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
+    <xsl:variable name="subtoc">
+      <ul>
+        <xsl:apply-templates mode="toc" select="$nodes">
+          <xsl:with-param name="toc-context" select="$toc-context"/>
+        </xsl:apply-templates>
+      </ul>
+    </xsl:variable>
+    <xsl:variable name="depth">
+      <xsl:choose>
+        <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
+        <xsl:otherwise>0</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="depth.from.context"
+            select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+    <li class="{name(.)}">
+      <xsl:call-template name="toc.line">
+        <xsl:with-param name="toc-context" select="$toc-context"/>
+      </xsl:call-template>
+      <xsl:if test="$toc.section.depth &gt; $depth and count($nodes)&gt;0 
+      				and $toc.max.depth &gt; $depth.from.context">
+        <xsl:copy-of select="$subtoc"/>
+      </xsl:if>
+    </li>
+  </xsl:template>
+
+    <!--Adding the h* tags and dropping redundats links-->
+  <xsl:template name="toc.line">
+    <xsl:param name="toc-context" select="."/>
+    <xsl:param name="depth" select="1"/>
+    <xsl:param name="depth.from.context" select="8"/>
+    <xsl:choose>
+      <xsl:when test="local-name(.) = 'sect1'">
+        <a>
+          <xsl:attribute name="href">
+            <xsl:call-template name="href.target">
+              <xsl:with-param name="context" select="$toc-context"/>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+        </a>
+      </xsl:when>
+      <xsl:when test="local-name(.) = 'chapter' or local-name(.) = 'preface'">
+        <h4>
+          <xsl:variable name="label">
+            <xsl:apply-templates select="." mode="label.markup"/>
+          </xsl:variable>
+          <xsl:copy-of select="$label"/>
+          <xsl:if test="$label != ''">
+            <xsl:value-of select="$autotoc.label.separator"/>
+          </xsl:if>
+          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+        </h4>
+      </xsl:when>
+      <xsl:when test="local-name(.) = 'part'">
+        <h3>
+          <xsl:variable name="label">
+            <xsl:apply-templates select="." mode="label.markup"/>
+          </xsl:variable>
+          <xsl:copy-of select="$label"/>
+          <xsl:if test="$label != ''">
+            <xsl:value-of select="$autotoc.label.separator"/>
+          </xsl:if>
+          <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+        </h3>
+      </xsl:when>
+      <xsl:otherwise>
+        <h3>
+            <a>
+            <xsl:attribute name="href">
+              <xsl:call-template name="href.target">
+                <xsl:with-param name="context" select="$toc-context"/>
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:variable name="label">
+              <xsl:apply-templates select="." mode="label.markup"/>
+            </xsl:variable>
+            <xsl:copy-of select="$label"/>
+            <xsl:if test="$label != ''">
+              <xsl:value-of select="$autotoc.label.separator"/>
+            </xsl:if>
+            <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+          </a>
+        </h3>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
