cvs commit: LFS/BOOK/stylesheets lfs-print.css lfs-chunked2.xsl lfs-nochunks.xsl lfs.css

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun May 30 03:54:18 PDT 2004


manuel      04/05/30 04:54:18

  Modified:    BOOK     Makefile
               BOOK/stylesheets lfs-chunked2.xsl lfs-nochunks.xsl lfs.css
  Added:       BOOK/stylesheets lfs-print.css
  Log:
  Added a CSS to can print the HTMLs.
  Hardoded a CSS code into the nuchunk output to make it full stand alone.
  Updated the Makefile.
  
  Revision  Changes    Path
  1.8       +13 -8     LFS/BOOK/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/Makefile,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Makefile	18 May 2004 20:45:56 -0000	1.7
  +++ Makefile	30 May 2004 10:54:18 -0000	1.8
  @@ -1,20 +1,25 @@
   BASEDIR=~/lfs-book
  +CHUNK_QUIET=0
  +PDF_OUTPUT=LFS-BOOK.pdf
  +PRINT_OUTPUT=LFS-BOOK-PRINTABLE.pdf
  +NOCHUNKS_OUTPUT=LFS-BOOK.html
   
   lfs:
  -	xsltproc --xinclude --nonet -stringparam base.dir $(BASEDIR)/ \
  -	  stylesheets/lfs-chunked.xsl index.xml
  +	xsltproc --xinclude --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
  +	  -stringparam base.dir $(BASEDIR)/ stylesheets/lfs-chunked.xsl \
  +	  index.xml
   
   	if [ ! -e $(BASEDIR)/stylesheets ]; then \
   	  mkdir -p $(BASEDIR)/stylesheets; \
   	fi;
  -	cp stylesheets/lfs.css $(BASEDIR)/stylesheets
  +	cp stylesheets/*.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@" \
  +	cd $(BASEDIR)/; sed -i -e "s at ../stylesheets at stylesheets@g" \
   	  index.html part1.html part2.html part3.html longindex.html
   	cd $(BASEDIR)/; sed -i -e "s at ../images at images@g" \
   	  index.html part1.html part2.html part3.html longindex.html
  @@ -25,18 +30,18 @@
   	xsltproc --xinclude --nonet --output lfs.fo stylesheets/lfs-pdf.xsl \
   	  index.xml
   	sed -i -e "s/inherit/all/" lfs.fo
  -	fop.sh lfs.fo lfs.pdf
  +	fop.sh lfs.fo $(PDF_OUTPUT)
   
   print:
   	xsltproc --xinclude --nonet --output lfs-print.fo \
   	  stylesheets/lfs-print.xsl index.xml
   	sed -i -e "s/inherit/all/" lfs-print.fo
  -	fop.sh lfs-print.fo lfs-print.pdf
  +	fop.sh lfs-print.fo $(PRINT_OUTPUT)
   
   nochunks:
  -	xsltproc --xinclude --nonet --output lfs.html \
  +	xsltproc --xinclude --nonet --output $(NOCHUNKS_OUTPUT) \
   	  stylesheets/lfs-nochunks.xsl index.xml
  -	tidy -config tidy.conf lfs.html || true
  +	tidy -config tidy.conf $(NOCHUNKS_OUTPUT) || true
   
   validate:
   	xmllint --noout --nonet --xinclude --postvalid index.xml
  
  
  
  1.2       +3 -0      LFS/BOOK/stylesheets/lfs-chunked2.xsl
  
  Index: lfs-chunked2.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/lfs-chunked2.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- lfs-chunked2.xsl	20 May 2004 21:48:55 -0000	1.1
  +++ lfs-chunked2.xsl	30 May 2004 10:54:18 -0000	1.2
  @@ -16,6 +16,9 @@
   
       <!-- The CSS Stylesheet -->
     <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
  +  <xsl:template name='user.head.content'>
  +     <link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css" media="print"/>
  +  </xsl:template>
   
       <!-- Dropping some unwanted style attributes -->
     <xsl:param name="ulink.target" select="''"></xsl:param>
  
  
  
  1.5       +256 -9    LFS/BOOK/stylesheets/lfs-nochunks.xsl
  
  Index: lfs-nochunks.xsl
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/lfs-nochunks.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- lfs-nochunks.xsl	26 May 2004 20:22:28 -0000	1.4
  +++ lfs-nochunks.xsl	30 May 2004 10:54:18 -0000	1.5
  @@ -4,26 +4,273 @@
                   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/docbook.xsl"/>
   
     <!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet -->
     <xsl:output method="html" encoding="ISO-8859-1" indent="no" />
     
  - 	<!-- Including our others customized templates -->
  +   <!-- Including our others customized templates -->
     <xsl:include href="xhtml/lfs-admon.xsl"/>
     <xsl:include href="xhtml/lfs-index.xsl"/>
     <xsl:include href="xhtml/lfs-mixed.xsl"/>
     <xsl:include href="xhtml/lfs-navigational.xsl"/>
  -  <!-- The following breaks hyperlinks in the TOC -->
  -  <!--  <xsl:include href="xhtml/lfs-titles.xsl"/> -->
     <xsl:include href="xhtml/lfs-toc.xsl"/>
   
  -  	<!-- The CSS Stylesheet -->
  -  <xsl:param name="html.stylesheet" select="'lfs.css'"/>
  -
  -  	<!-- Dropping some unwanted style attributes -->
  +    <!-- Dropping some unwanted style attributes -->
     <xsl:param name="ulink.target" select="''"></xsl:param>
     <xsl:param name="css.decoration" select="0"></xsl:param>
  -  
  +
  +    <!-- The CSS Stylesheet -->
  +  <xsl:template name='user.head.content'>
  +    <style type="text/css">
  +      <xsl:text>
  +/* Global settings */
  +body {
  +  font-family: sans-serif;
  +  text-align: left;
  +  background: #fff;
  +  color: #333;
  +  margin: 1em;
  +  padding: 0;
  +  font-size: 1em;
  +  line-height: 1.2em
  +}
  +
  +a:link { color: #22b; }
  +a:visited { color: #7e4988; }
  +a:hover, a:focus { color: #d30e08; }
  +a:active { color: #6b77b1;}
  +
  +/* Headers */
  +h1, h2, b, strong {
  +  color: #000;
  +  font-weight: bold;
  +}
  +
  +h3, h4, h5, h6 {
  +  color: #222;
  +}
  +
  +h1 { font-size: 173%; text-align: center; }
  +h2 { font-size: 144%; }
  +h2.subtitle { text-align: center; }
  +h3 { font-size: 120%; padding-top: 0.2em; margin-top: 0.3em; }
  +h4 { font-size: 110%;}
  +h5, h6 { font-size: 110%; font-style: italic; }
  +
  +/* TOC and Index*/
  +
  +div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
  +  list-style: none;
  +}
  +
  +div.toc, div.dedication {
  +  padding-left: 1em;
  +}
  +
  +li.preface {
  +  margin-left: 1em;
  +}
  +
  +div.toc ul li h3, div.toc ul li h4 {
  +  margin: .4em;
  +}
  +
  +.item {
  +    width: 15em;
  +    float: left;
  +}
  +
  +.secitem {
  +    font-weight: normal;
  +    width: 14em;
  +    float: left;
  +}
  +
  +/* Admonitions */
  +div.note, div.tip {
  +  background-color: #fffff6;
  +  border: 2px solid #dbddec;
  +  width: 90%;
  +  margin: .5em auto;
  +}
  +
  +div.important, div.warning, div.caution {
  +  background-color: #fffff6;
  +  border: medium solid #400;
  +  width: 90%;
  +  margin: 1.5em auto;
  +  color: #600;
  +  font-size: larger;
  +}
  +
  +div.important h3, div.warning h3, div.caution h3 {
  +  color: #900;
  +}
  +
  +div.admonhead img {
  +  display: none;
  +}
  +
  +h3.admontitle {
  +  padding-left: 2.5em;
  +  padding-top: 1em;
  +}
  +
  +div.admonbody {
  +  margin: .5em;
  +}
  +
  +div.important em, div.warning em, div.caution em {
  +  color: #000;
  +  font-weight: bold;
  +}
  +
  +div.important tt, div.warning tt, div.caution tt {
  +  font-weight: bold;
  +}
  +
  +/* variablelist and segmentedlist */
  +dl {
  +  margin: 0;
  +  padding: 0;
  +}
  +
  +dt {
  +  display: list-item;
  +  font-weight: bold;
  +  margin: .33em 0 0 1em;
  +  padding: 0;
  +}
  +
  +div.content dt {
  +  list-style: none;
  +}
  +
  +dd  {
  +  margin: 0 0 1em 3em;
  +  padding: 0;
  +}
  +
  +div.variablelist dd {
  +  margin-bottom: 1em;
  +}
  +
  +div.variablelist dd p {
  +  margin-top: 0px;
  +}
  +
  +dl.materials dd {
  +  margin-left: 0px;
  +}
  +
  +div.segmentedlist {
  +  margin-top: 1em;
  +}
  +
  +div.segmentedlist p {
  +  margin: 0px auto;
  +}
  +
  +/* Indented blocks */
  +p, ul, dl, code, blockquote {
  +  padding-left: 1em;
  +}
  +
  +/* Monospaced elements */
  +tt, code, kbd, pre, .command {
  +  font-family: monospace;
  +}
  +
  +pre.userinput {
  +  color: #101310;
  +  background-color: #e5e5e5;
  +  border: 1px solid #050505;
  +  padding: .5em 1em;
  +  margin: 0 2em;
  +  font-weight: bold;
  +}
  +
  +pre.screen {
  +  background-color: #e9e9e9;
  +  border: 1px solid #050505;
  +  padding: .5em 1em;
  +  margin: 0 2em;
  +}
  +
  +/* Sections */
  +div.package {
  +  background: #f5f6f7;
  +  border-bottom: 0.2em solid #dbddec;
  +  padding: 0.5em 0.5em 0.3em 0.5em;
  +  margin: 0px auto;
  +}
  +
  +div.installation {
  +  padding: 0 0.5em 0.3em 0.5em;
  +  margin: 0.5em 0 0.5em 0;
  +}
  +
  +div.configuration {
  +  background:   #fefefe;
  +  border-top: 0.2em solid #dbddec;
  +  padding: 0.5em;
  +  margin: 0.5em 0 .5em 0;
  +}
  +
  +div.content {
  +  background: #f5f6f7;
  +  border-top: 0.2em solid #dbddec;
  +  border-bottom: 0.2em solid #dbddec;
  +  padding: 0.5em 0.5em 1em 0.5em;
  +  margin: 0.5em 0 .5em 0;
  +}
  +
  +div.installation h3.title, div.content h3.title {
  +  padding-top: 0.3em;
  +  margin: 0;
  +}
  +
  +div.book, div.preface, div.part, div.chapter, div.sect1, div.index {
  +  padding-bottom: 0.5em;
  +}
  +
  +div.preface h2, div.part h1, div.chapter h2.title, div.sect1 h2.title, div.index h1 {
  +  background: #f5f6f7;
  +  border-bottom: .2em solid #dbddec;
  +  border-top: .2em solid #dbddec;
  +  margin-top 1em;
  +  padding: .5em;
  +  text-align: center;
  +}
  +
  +div.book h1 {
  +  background: #f5f6f7;
  +  margin: 0px auto;
  +  padding: 0.5em;
  +}
  +
  +div.book h2.subtitle {
  +  background: #dbddec;
  +  margin: 0px auto;
  +  padding: 0.2em;
  +}
  +div.authorgroup, div p.copyright, div.abstract {
  +  background: #f5f6f7;
  +  margin: 0px auto;
  +  padding:  1em 0.5em;
  +}
  +
  +hr {
  +  background: #dbddec;
  +  height: .3em;
  +  border: 0px;
  +  margin: 0px auto;
  +  padding: 0;
  +}
  +      </xsl:text>
  +    </style>
  +  </xsl:template>
  +
   </xsl:stylesheet>
  
  
  
  1.14      +5 -4      LFS/BOOK/stylesheets/lfs.css
  
  Index: lfs.css
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/stylesheets/lfs.css,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- lfs.css	29 May 2004 20:24:53 -0000	1.13
  +++ lfs.css	30 May 2004 10:54:18 -0000	1.14
  @@ -178,11 +178,16 @@
   }
   
   dt {
  +  display: list-item;
     font-weight: bold;
     margin: .33em 0 0 1em;
     padding: 0;
   }
   
  +div.content dt {
  +  list-style: none;
  +}
  +
   dd  {
     margin: 0 0 1em 3em;
     padding: 0;
  @@ -196,10 +201,6 @@
     margin-top: 0px;
   }
   
  -dl.materials dt, div.installation dt, div.configuration dt, div.sect2 dt {
  -  display: list-item;
  -}
  -
   dl.materials dd {
     margin-left: 0px;
   }
  
  
  
  1.1                  LFS/BOOK/stylesheets/lfs-print.css
  
  Index: lfs-print.css
  ===================================================================
  
  @import url(lfs.css);
  
  .navfooter, .headerlinks {
     display: none;
  } 
  
  
  



More information about the lfs-book mailing list