cvs commit: BLFS/BOOK/stylesheets blfs-chunked.xsl blfs-pdf.xsl blfs.css

larry at linuxfromscratch.org larry at linuxfromscratch.org
Mon Apr 12 18:59:18 PDT 2004


larry       04/04/12 19:59:18

  Modified:    BOOK     Makefile
               BOOK/introduction/welcome changelog.xml
               BOOK/preface foreword.xml organization.xml whoread.xml
               BOOK/server/mail/courier courier-inst.xml
  Added:       BOOK/stylesheets blfs-chunked.xsl blfs-pdf.xsl blfs.css
  Log:
  Added stylesheets for xsltproc processing
  
  Revision  Changes    Path
  1.2       +28 -0     BLFS/BOOK/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvsroot/BLFS/BOOK/Makefile,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile	1 Feb 2004 03:47:51 -0000	1.1
  +++ Makefile	13 Apr 2004 01:59:17 -0000	1.2
  @@ -22,3 +22,31 @@
   		multimedia pst preface appendices other
   	@cd $(OUTPUTDIR) && $(JADE) -t sgml -d $(DOCBOOK)/html/lfs.dsl \
   		$(DOCBOOK)/dtds/decls/xml.dcl $(SRCDIR)/index.xml
  +
  +BASEDIR=~/blfs-book/
  +
  +blfs:
  +	xsltproc --xinclude --nonet -stringparam base.dir $(BASEDIR) \
  +	  stylesheets/blfs-chunked.xsl index.xml
  +
  +	if [ ! -e $(BASEDIR)stylesheets ]; then \
  +	  mkdir -p $(BASEDIR)stylesheets; \
  +	fi;
  +	cp stylesheets/blfs.css $(BASEDIR)stylesheets
  +
  +	if [ ! -e $(BASEDIR)images ]; then \
  +	  mkdir -p $(BASEDIR)images; \
  +	fi;
  +	cp /usr/share/xml/docbook/xsl-stylesheets-1.65.1/images/*.png \
  +	  $(BASEDIR)images
  +	cd $(BASEDIR); sed -i -e "s at ../stylesheets at stylesheets@" \
  +	  index.html 
  +	cd $(BASEDIR); sed -i -e "s at ../images at images@g" \
  +	  index.html 
  +
  +pdf:
  +	xsltproc --xinclude --nonet --output lfs.fo
  +	stylesheets/blfs-pdf.xsl \
  +	  index.xml
  +	fop.sh lfs.fo lfs.pdf
  +
  
  
  
  1.1057    +5 -0      BLFS/BOOK/introduction/welcome/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/BOOK/introduction/welcome/changelog.xml,v
  retrieving revision 1.1056
  retrieving revision 1.1057
  diff -u -r1.1056 -r1.1057
  --- changelog.xml	12 Apr 2004 03:06:19 -0000	1.1056
  +++ changelog.xml	13 Apr 2004 01:59:17 -0000	1.1057
  @@ -11,6 +11,11 @@
   
   <itemizedlist>
   
  +<listitem><para>April 12th, 2004 [larry]: Added stylesheets for use with
  +xsltproc.  Removed "dir=" for dbhtml tag on children for processing to
  +work correctly for both.  Done on Preface only at this time, will
  +continue with remainder later.</para></listitem>
  +
   <listitem><para>April 11th, 2004 [larry]: Removed acme and updated to
   ggv-2.6.0, gconf-editor-2.6.0, gnome-utils-2.6.0,
   gnome-system-monitor-2.6.0, gnome-media-2.6.0, nautilus-media-0.8.0,
  
  
  
  1.5       +1 -1      BLFS/BOOK/preface/foreword.xml
  
  Index: foreword.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/BOOK/preface/foreword.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- foreword.xml	12 Sep 2003 03:09:56 -0000	1.4
  +++ foreword.xml	13 Apr 2004 01:59:17 -0000	1.5
  @@ -1,5 +1,5 @@
   <sect1 id="preface-foreword">
  -<?dbhtml filename="foreword.html" dir="preface"?>
  +<?dbhtml filename="foreword.html"?>
   <title>Foreword</title>
   
   <para>Having helped out with Linux From Scratch for a short time, I
  
  
  
  1.14      +1 -1      BLFS/BOOK/preface/organization.xml
  
  Index: organization.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/BOOK/preface/organization.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- organization.xml	4 Oct 2003 00:28:30 -0000	1.13
  +++ organization.xml	13 Apr 2004 01:59:17 -0000	1.14
  @@ -1,5 +1,5 @@
   <sect1 id="preface-organization">
  -<?dbhtml filename="organization.html" dir="preface"?>
  +<?dbhtml filename="organization.html"?>
   <title>Organization</title>
   
   <para>This book is divided into the following parts.</para>
  
  
  
  1.4       +1 -1      BLFS/BOOK/preface/whoread.xml
  
  Index: whoread.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/BOOK/preface/whoread.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- whoread.xml	21 Mar 2004 19:27:22 -0000	1.3
  +++ whoread.xml	13 Apr 2004 01:59:17 -0000	1.4
  @@ -1,5 +1,5 @@
   <sect1 id="preface-whoread">
  -<?dbhtml filename="whoread.html" dir="preface"?>
  +<?dbhtml filename="whoread.html"?>
   <title>Who would want to read this book</title>
   
   <para>This book is mainly aimed at those who have built a system based
  
  
  
  1.11      +1 -1      BLFS/BOOK/server/mail/courier/courier-inst.xml
  
  Index: courier-inst.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/BOOK/server/mail/courier/courier-inst.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- courier-inst.xml	11 Apr 2004 00:14:37 -0000	1.10
  +++ courier-inst.xml	13 Apr 2004 01:59:17 -0000	1.11
  @@ -22,7 +22,7 @@
   following commands to create
   <filename class="directory">/var/run/courier</filename>:</para>
   
  -<screen><userinput><command>mkdir /var/run/courier &amp&
  +<screen><userinput><command>mkdir /var/run/courier &&
   chown courier:courier /var/run/courier</command></userinput></screen>
   
   <para>Install <application>courier</application> by running the following commands:</para>
  
  
  
  1.1                  BLFS/BOOK/stylesheets/blfs-chunked.xsl
  
  Index: blfs-chunked.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns="http://www.w3.org/1999/xhtml"
                  version="1.0">
  
    <!-- We use XHTML -->
    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
    <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
  
    <!-- The CSS Stylesheet -->
    <xsl:param name="html.stylesheet" select="'../stylesheets/blfs.css'"/>
  
    <!-- 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>
  
  </xsl:stylesheet>
  
  
  
  1.1                  BLFS/BOOK/stylesheets/blfs-pdf.xsl
  
  Index: blfs-pdf.xsl
  ===================================================================
  <?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="http://docbook.sourceforge.net/release/xsl/current/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'"/>
  
  
    <!-- 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>
  
    <!-- 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>
  
    <!-- 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>
  
    <!-- 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.1                  BLFS/BOOK/stylesheets/blfs.css
  
  Index: blfs.css
  ===================================================================
  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-weight: bold;
      font-size: xx-large;
      text-align: center;
  }
  
  div.book div.titlepage h2.subtitle {
      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-weight: bold;
      font-size: x-large;
      text-align: left;
  }
  
  div.sect1 div.titlepage h2.title {
      font-weight: bold;
      font-size: x-large;
      text-align: left;
  }
  
  tt {
      font-family: courier, monospace;
  }
  
  pre.screen {
      color: black;
      background-color: #dddddd;
  }
  
  pre.synopsis {
      color: black;
      background-color: #dddddd;
  }
  
  div.warning {
      border: 1px solid;
  }
  
  div.note {
      border: 1px solid;
  }
  
  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
  }
  
  .command {
      font-family: courier, monospace;
  }
  
  
  



More information about the blfs-book mailing list