cvs commit: LFS/newxml/stylesheets lfs-chunked.xsl lfs-pdf.xsl lfs.css

matthew at linuxfromscratch.org matthew at linuxfromscratch.org
Tue Mar 16 15:10:54 PST 2004


matthew     04/03/16 16:10:54

  Modified:    newxml   Makefile
               newxml/stylesheets lfs-chunked.xsl lfs-pdf.xsl lfs.css
  Log:
  * Updated the import hrefs in the stylesheets to point to the canonical
    DocBook-XSL location.  With a correctly set up catalog they'll resolve to the
    correct local path (just like the DTDs do).
  * Updated the PDF stylesheet to incorporate Manuel's suggestions.
  * Updated the CSS stylesheet to incorporate James' suggestions.
  
  Revision  Changes    Path
  1.7       +1 -1      LFS/newxml/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvsroot/LFS/newxml/Makefile,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Makefile	11 Mar 2004 22:10:05 -0000	1.6
  +++ Makefile	16 Mar 2004 23:10:54 -0000	1.7
  @@ -13,7 +13,7 @@
   	if [ ! -e $(BASEDIR)images ]; then \
   	  mkdir -p $(BASEDIR)images; \
   	fi;
  -	cp /usr/share/xml/docbook/xsl-stylesheets-1.65.0/images/*.png \
  +	cp /usr/share/xml/docbook/xsl-stylesheets-1.65.1/images/*.png \
   	  $(BASEDIR)images
   	sed -i -e "s at ../stylesheets at stylesheets@" \
   	  $(BASEDIR){index,part1,part2,part3,part4}.html
  
  
  
  1.8       +1 -1      LFS/newxml/stylesheets/lfs-chunked.xsl
  
  Index: lfs-chunked.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/newxml/stylesheets/lfs-chunked.xsl,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- lfs-chunked.xsl	11 Mar 2004 22:10:05 -0000	1.7
  +++ lfs-chunked.xsl	16 Mar 2004 23:10:54 -0000	1.8
  @@ -4,7 +4,7 @@
                   version="1.0">
   
     <!-- We use XHTML -->
  -  <xsl:import href="/usr/share/xml/docbook/xsl-stylesheets-1.65.1/xhtml/chunk.xsl"/>
  +  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/html/chunk.xsl"/>
     <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
   
     <!-- The CSS Stylesheet -->
  
  
  
  1.2       +98 -2     LFS/newxml/stylesheets/lfs-pdf.xsl
  
  Index: lfs-pdf.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/newxml/stylesheets/lfs-pdf.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- lfs-pdf.xsl	11 Mar 2004 22:34:45 -0000	1.1
  +++ lfs-pdf.xsl	16 Mar 2004 23:10:54 -0000	1.2
  @@ -1,16 +1,26 @@
   <?xml version='1.0'?>
   <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="/usr/share/xml/docbook/xsl-stylesheets-1.65.0/fo/docbook.xsl"/>
  +  <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="'A4'"/>
   
  -  <!--TOC stuff-->
  +
  +  <!-- 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>
  +
  +  <!-- TOC stuff -->
     <xsl:param name="generate.toc">
       book      toc
       part      nop
  @@ -24,8 +34,94 @@
       <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>
  +
  +  <!-- 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', at 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', at 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>
  +
  +  <!-- Prevent duplicate e-mails in the Acknowledgments pages-->
  +  <xsl:param name="ulink.show" select="0"/>
   
   </xsl:stylesheet>
  
  
  
  1.2       +79 -34    LFS/newxml/stylesheets/lfs.css
  
  Index: lfs.css
  ===================================================================
  RCS file: /home/cvsroot/LFS/newxml/stylesheets/lfs.css,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- lfs.css	3 Jan 2004 19:01:10 -0000	1.1
  +++ lfs.css	16 Mar 2004 23:10:54 -0000	1.2
  @@ -1,60 +1,105 @@
  +body {
  +  font-weight: normal;
  +  font-size: normal;
  +  font-family: verdana, tahoma, helvetica, arial, sans-serif;
  +  text-align: left;
  +}
  +
  +div.navheader table {
  +    font-size: smaller;
  +}
  +
  +div.navfooter table {
  +    font-size: smaller;
  +}
  +
  +div.navheader img {
  +    border: medium none;
  +}
  +
  +div.navfooter img {
  +    border: medium none;
  +}
  +
   div.book div.titlepage h1.title {
  -  font-family: arial, sans-serif;
  -  font-size: 16pt;
  -  font-weight: bold;
  -  text-align: center;
  +    font-weight: bold;
  +    font-size: xx-large;
  +    text-align: center;
   }
   
   div.book div.titlepage h2.subtitle {
  -  font-family: arial, sans-serif;
  -  font-size: 14pt;
  -  font-weight: bold;
  -  text-align: center;
  -} 
  +    font-weight: bold;
  +    font-size: x-large;
  +    text-align: center;
  +}
  +
  +div.book div.titlepage h3.author {
  +    font-size: large;
  +}
  +
  +div.book div.dedication div.titlepage h2.title {
  +    font-weight: normal;
  +    font-size: x-large;
  +}
   
   div.chapter div.titlepage h2.title {
  -  font-family: arial, sans-serif;
  -  font-size: 16pt;
  -  font-weight: bold;
  -  text-align: left;
  +    font-weight: bold;
  +    font-size: x-large;
  +    text-align: left;
   }
   
   div.sect1 div.titlepage h2.title {
  -  font-family: arial, sans-serif;
  -  font-size: 14pt;
  -  font-weight: bold;
  -  text-align: left;
  +    font-weight: bold;
  +    font-size: x-large;
  +    text-align: left;
   }
   
  +tt {
  +    font-family: courier, monospace;
  +}
   
  -div.navheader img, div.navfooter img {
  -  border: none;
  +pre.screen {
  +    color: black;
  +    background-color: #dddddd;
   }
   
  -div.sect1 {
  -  font-family: arial, sans-serif;
  -  font-size: 11pt;
  -  font-weight: normal;
  -  text-align: left;
  +pre.synopsis {
  +    color: black;
  +    background-color: #dddddd;
   }
   
  -tt {
  -  font-family: courier, monospace;
  +div.warning {
  +    border: 1px solid;
   }
   
  -pre.screen {
  -  background-color: #DDDDDD;
  -  color: black;
  +div.note {
  +    border: 1px solid;
   }
   
  -div.warning, div.note, div.important, div.caution {
  -  border: 1px solid black;
  +div.important {
  +    border: 1px solid;
  +}
  +
  +div.caution {
  +    border: 1px solid;
   }
   
   div.warning h3.title {
  -  text-align: center;
  +    text-align: center
  +}
  +
  +div.warning p {
  +    padding-left: 0.2in
  +}
  +
  +div.note {
  +    padding-left: 0.2in
  +}
  +
  +div.important {
  +    padding-left: 0.2in
   }
   
  -div.warning p, div.note, div.important, div.caution {
  -  padding-left: 0.2in;
  +div.caution {
  +    padding-left: 0.2in
   }
  
  
  



More information about the lfs-book mailing list