* Merged newxml into HEAD

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3434 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Matthew Burgess 2004-05-03 10:33:11 +00:00
parent caa08b6106
commit 287ea55da7
20 changed files with 1152 additions and 338 deletions

59
INSTALL
View File

@ -11,62 +11,29 @@ website at http://www.linuxfromscratch.org for more information.
-------------------------------------------------------------------------------
If all you want to do is convert XML to HTML perform the following:
First, let's handle some dependencies:
* Unzip
- http://www.linuxfromscratch.org/blfs/view/cvs/general/unzip.html
* SGML Common
- http://www.linuxfromscratch.org/blfs/view/cvs/pst/sgml-common.html
* libxml2
- http://www.linuxfromscratch.org/blfs/view/cvs/general/libxml2.html
Now install the following:
* libxslt
- http://www.linuxfromscratch.org/blfs/view/cvs/general/libxslt.html
* DocBook DTD
- http://www.linuxfromscratch.org/blfs/view/cvs/pst/DocBook.html
* DSSSL DocBook Stylesheets
- http://www.linuxfromscratch.org/blfs/view/cvs/pst/docbook-dsssl.html
* OpenSP
- http://www.linuxfromscratch.org/blfs/view/cvs/pst/opensp.html
* OpenJade
- http://www.linuxfromscratch.org/blfs/view/cvs/pst/openjade.html
Once you have followed the installation instructions for all these packages
from the BLFS Book, then you have a basic DocBook setup. Below are some
alternate packages that you can use to convert to other formats.
* DocBook XSL Stylesheets
- http://www.linuxfromscratch.org/blfs/view/cvs/pst/docbook-xsl.html
-------------------------------------------------------------------------------
If you want to be able to convert the book into PS and PDF as well, then you
will need the Htmldoc package. This takes a HTML file (created with openjade
which you already installed) and converts it to PS or PDF:
If you want to be able to convert the book into PDF as well, then you will need
the FOP package. This takes an XSL-FO file (created with libxslt which you
already installed) and converts it to PDF:
- http://www.easysw.com/htmldoc/
Install HTMLDOC by running:
./configure --prefix=/usr
make
make install
- http://www.apache.org/dist/xml/fop/fop-0.20.5-bin.tar.gz
An excellent X front-end for HTMLDOC is FLTK. If you will be doing rendering
in X, then you will probably want this package.
Install FOP by running:
- http://sourceforge.net/projects/fltk
Install FLTK bt running:
./configure --prefix=/usr
make
make install
If you want to be able to convert the book into TXT as well, then you need the
lynx browser. Conversion is handled via the -dump option.
- http://www.linuxfromscratch.org/blfs/view/cvs/basicnet/lynx.html
You are finished installing everything. Read the README file for some examples
how to convert this XML to the various other formats.
cd /opt &&
tar -xzvf /usr/src/fop-0.20.5-bin.tar.gz &&
mv fop-0.20.5 fop
Now set JAVA_HOME, FOP_HOME and PATH to values appropriate to your system.

29
Makefile Normal file
View File

@ -0,0 +1,29 @@
BASEDIR=~/lfs-book/
lfs:
xsltproc --xinclude --nonet -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
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@../stylesheets@stylesheets@" \
index.html part1.html part2.html part3.html longindex.html
cd $(BASEDIR); sed -i -e "s@../images@images@g" \
index.html part1.html part2.html part3.html longindex.html
pdf:
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
validate:
xmllint --noout --nonet --xinclude --postvalid index.xml

48
README
View File

@ -2,49 +2,19 @@ LFS Book Readme
This document is meant to instruct the user on how to convert the book's XML
source to other formats (e.g. HTML, PDF, PS and TXT). First, if you have not
already done so, please read the INSTALL file how to install the required
software. If you have already completed the steps outlined in the INSTALL
file, then continue reading for examples how to convert these files into
already done so, please read the INSTALL file for instructions on how to install
the required software. If you have already completed the steps outlined in the
INSTALL file, then continue reading for examples how to convert these files into
various other formats.
XML to HTML:
------------
Create a directory in which you want to store the HTML files and cd into
that directory. Now run:
XML to XHTML:
-------------
mkdir -p chapter0{1,2,3,4,5,6,7,8,9} preface appendix{a,b} &&
/usr/bin/openjade -t xml \
-d /usr/share/dsssl/docbook/html/lfs.dsl \
/usr/share/dsssl/docbook/dtds/decls/xml.dcl \
/path/to/index.xml
BASEDIR=/path/to/output/location make
XML to NOCHUNKS-HTML:
--------------------
The NOCHUNKS HTML version is one big HTML file:
/usr/bin/openjade -t sgml \
-V nochunks \
-d /usr/share/dsssl/docbook/html/lfs.dsl \
/usr/share/dsssl/docbook/dtds/decls/xml.dcl \
/path/to/index.xml > nochunks.html
XML to TXT:
XML to PDF:
-----------
First create the NOCHUNKS HTML file, then convert by running:
/usr/bin/lynx -dump nochunks.html > output.txt
XML to PS and PDF:
------------------
First create the NOCHUNKS HTML file, then convert by starting
htmldoc. You can use the GUI and select the options. If you're
satisfied with the default options you can run this command:
/usr/bin/htmldoc --book --firstpage p1 -v -t <type> \
-f <output> nochunks.html
replace <type> by pdf13 to create a pdf file or replace <type> by ps3 to
create a ps file. There are other pdf and ps levels, see the man page for
possible other options. Replace <output> with the filename of the ps or
pdf file that is to be generated.
make pdf &&
cp lfs.pdf /path/to/output/location

View File

@ -1,36 +0,0 @@
&bookinfo;
<dedication>
<title>Dedication</title>
<para>This book is dedicated to my loving and supportive wife
<emphasis>Beverly Beekmans</emphasis>.</para>
</dedication>
&preface;
<part id="part1">
<title>Part I - Introduction</title>
&chapter01;
</part>
<part id="part2">
<title>Part II - Preparing for the build</title>
&chapter02;
&chapter03;
&chapter04;
&chapter05;
</part>
<part id="part3">
<title>Part III - Building the LFS system</title>
&chapter06;
&chapter07;
&chapter08;
&chapter09;
</part>
<part id="part4">
<title>Part IV - Appendices</title>
&appendixa;
&appendixb;
</part>

29
contrib/entResolver Normal file
View File

@ -0,0 +1,29 @@
#!/bin/bash
###############################################################################
# #
# File: entResolver #
# #
# Description: Works around libxml2 bug 135713 by preprocessing entity #
# references before performing any stylesheet processing. #
# #
# Author: Manuel Canales Esparcia #
# #
###############################################################################
NAME=`basename "$0"`
DESTDIR="$1"
if [ -z "$1" ]; then
echo "USAGE: $NAME destdir"
exit
fi
mkdir -p ../"$DESTDIR"/chapter0{1,2,3,4,5,6,7,8,9}
mkdir -p ../"$DESTDIR"/prologue
mkdir -p ../"$DESTDIR"/appendix{a,b}
for i in `find . -name "*.xml"`; do
xmllint --nonet --noent "${i}" > ../"$DESTDIR"/"${i}";
done
cp -a stylesheets ../"$DESTDIR"

73
general.ent Normal file
View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!ENTITY version "CVS-2004-05-02">
<!ENTITY releasedate "May 2, 2004">
<!ENTITY milestone "5.1">
<!ENTITY lfs-root "http://www.linuxfromscratch.org/">
<!ENTITY blfs-root "&lfs-root;blfs/">
<!ENTITY faq-root "&lfs-root;faq/">
<!ENTITY hints-root "&lfs-root;hints/downloads/files/">
<!ENTITY hints-index "&lfs-root;hints/list.html">
<!ENTITY patches-root "&lfs-root;patches/lfs/cvs/">
<!ENTITY wiki-root "http://wiki.linuxfromscratch.org/">
<!ENTITY http-down "http://downloads.linuxfromscratch.org/">
<!ENTITY freshmeat "http://freshmeat.net/projects/">
<!ENTITY buildtime "Approximate build time: ">
<!ENTITY diskspace "Required disk space: ">
<!ENTITY autoconf-version "2.59">
<!ENTITY automake-version "1.8.4">
<!ENTITY bash-version "2.05b">
<!ENTITY binutils-version "2.14">
<!ENTITY bison-version "1.875">
<!ENTITY bootscripts-version "2.0.4">
<!ENTITY bzip2-version "1.0.2">
<!ENTITY coreutils-version "5.2.1">
<!ENTITY dejagnu-version "1.4.4">
<!ENTITY diffutils-version "2.8.1">
<!ENTITY e2fsprogs-version "1.35">
<!ENTITY ed-version "0.2">
<!ENTITY expect-version "5.41.0">
<!ENTITY file-version "4.09">
<!ENTITY findutils-version "4.1.20">
<!ENTITY flex-version "2.5.4a">
<!ENTITY gawk-version "3.1.3">
<!ENTITY gcc-2953-version "2.95.3">
<!ENTITY gcc-version "3.3.3">
<!ENTITY gettext-version "0.14.1">
<!ENTITY glibc-version "2.3.3">
<!ENTITY grep-version "2.5.1">
<!ENTITY groff-version "1.19">
<!ENTITY grub-version "0.94">
<!ENTITY gzip-version "1.3.5">
<!ENTITY iana-etc-version "1.00">
<!ENTITY inetutils-version "1.4.2">
<!ENTITY kbd-version "1.12">
<!ENTITY less-version "382">
<!ENTITY libtool-version "1.5.6">
<!ENTITY linux-version "2.4.26">
<!ENTITY m4-version "1.4">
<!ENTITY makedev-version "1.2">
<!ENTITY make-version "3.80">
<!ENTITY man-version "1.5m2">
<!ENTITY man-pages-version "1.66">
<!ENTITY mktemp-version "1.5">
<!ENTITY modutils-version "2.4.27">
<!ENTITY ncurses-version "5.4">
<!ENTITY net-tools-version "1.60">
<!ENTITY patch-version "2.5.4">
<!ENTITY perl-version "5.8.4">
<!ENTITY procinfo-version "18">
<!ENTITY procps-version "3.2.1">
<!ENTITY psmisc-version "21.4">
<!ENTITY sed-version "4.0.9">
<!ENTITY shadow-version "4.0.4.1">
<!ENTITY sysklogd-version "1.4.1">
<!ENTITY sysvinit-version "2.85">
<!ENTITY tar-version "1.13.94">
<!ENTITY tcl-version "8.4.6">
<!ENTITY texinfo-version "4.7">
<!ENTITY util-linux-version "2.12a">
<!ENTITY vim-version "6.2">
<!ENTITY zlib-version "1.2.1">

195
index.xml
View File

@ -1,151 +1,56 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"/usr/share/docbook/docbookx.dtd" [
<!ENTITY version "CVS-2004-03-21">
<!ENTITY releasedate "March 14th, 2004">
<!ENTITY milestone "5.2">
<!ENTITY nbsp " ">
<!ENTITY lfs-root "http://www.linuxfromscratch.org/">
<!ENTITY blfs-root "&lfs-root;blfs/">
<!ENTITY faq-root "&lfs-root;faq/">
<!ENTITY hints-root "&lfs-root;hints/downloads/files/">
<!ENTITY hints-index "&lfs-root;hints/list.html">
<!ENTITY patches-root "&lfs-root;patches/lfs/cvs/">
<!ENTITY wiki-root "http://wiki.linuxfromscratch.org/">
<!ENTITY http-down "http://downloads.linuxfromscratch.org/">
<!ENTITY tldp-root "http://www.tldp.org/">
<!ENTITY all-size-version "cvs-2003-10-06">
<!ENTITY all-size-mb "134 MB">
<!ENTITY buildtime "Approximate build time: ">
<!ENTITY diskspace "Required disk space: ">
<!ENTITY book SYSTEM "book.xml">
<!ENTITY bookinfo SYSTEM "bookinfo.xml">
<!ENTITY % bookstructure SYSTEM "entities/book-structure.xml">
<!ENTITY % autoconf-entities SYSTEM "entities/autoconf.ent">
<!ENTITY % automake-entities SYSTEM "entities/automake.ent">
<!ENTITY % bash-entities SYSTEM "entities/bash.ent">
<!ENTITY % binutils-entities SYSTEM "entities/binutils.ent">
<!ENTITY % bison-entities SYSTEM "entities/bison.ent">
<!ENTITY % bootscripts-entities SYSTEM "entities/bootscripts.ent">
<!ENTITY % bzip2-entities SYSTEM "entities/bzip2.ent">
<!ENTITY % coreutils-entities SYSTEM "entities/coreutils.ent">
<!ENTITY % dejagnu-entities SYSTEM "entities/dejagnu.ent">
<!ENTITY % diffutils-entities SYSTEM "entities/diffutils.ent">
<!ENTITY % e2fsprogs-entities SYSTEM "entities/e2fsprogs.ent">
<!ENTITY % ed-entities SYSTEM "entities/ed.ent">
<!ENTITY % expect-entities SYSTEM "entities/expect.ent">
<!ENTITY % file-entities SYSTEM "entities/file.ent">
<!ENTITY % findutils-entities SYSTEM "entities/findutils.ent">
<!ENTITY % flex-entities SYSTEM "entities/flex.ent">
<!ENTITY % gawk-entities SYSTEM "entities/gawk.ent">
<!ENTITY % gcc-entities SYSTEM "entities/gcc.ent">
<!ENTITY % gcc-2953-entities SYSTEM "entities/gcc-2953.ent">
<!ENTITY % gettext-entities SYSTEM "entities/gettext.ent">
<!ENTITY % glibc-entities SYSTEM "entities/glibc.ent">
<!ENTITY % grep-entities SYSTEM "entities/grep.ent">
<!ENTITY % groff-entities SYSTEM "entities/groff.ent">
<!ENTITY % grub-entities SYSTEM "entities/grub.ent">
<!ENTITY % gzip-entities SYSTEM "entities/gzip.ent">
<!ENTITY % inetutils-entities SYSTEM "entities/inetutils.ent">
<!ENTITY % kbd-entities SYSTEM "entities/kbd.ent">
<!ENTITY % kernel-entities SYSTEM "entities/kernel.ent">
<!ENTITY % less-entities SYSTEM "entities/less.ent">
<!ENTITY % lfs-utils-entities SYSTEM "entities/lfs-utils.ent">
<!ENTITY % libtool-entities SYSTEM "entities/libtool.ent">
<!ENTITY % m4-entities SYSTEM "entities/m4.ent">
<!ENTITY % make-entities SYSTEM "entities/make.ent">
<!ENTITY % makedev-entities SYSTEM "entities/makedev.ent">
<!ENTITY % man-entities SYSTEM "entities/man.ent">
<!ENTITY % manpages-entities SYSTEM "entities/manpages.ent">
<!ENTITY % modutils-entities SYSTEM "entities/modutils.ent">
<!ENTITY % ncurses-entities SYSTEM "entities/ncurses.ent">
<!ENTITY % nettools-entities SYSTEM "entities/nettools.ent">
<!ENTITY % patch-entities SYSTEM "entities/patch.ent">
<!ENTITY % perl-entities SYSTEM "entities/perl.ent">
<!ENTITY % procinfo-entities SYSTEM "entities/procinfo.ent">
<!ENTITY % procps-entities SYSTEM "entities/procps.ent">
<!ENTITY % psmisc-entities SYSTEM "entities/psmisc.ent">
<!ENTITY % sed-entities SYSTEM "entities/sed.ent">
<!ENTITY % shadow-entities SYSTEM "entities/shadow.ent">
<!ENTITY % sysklogd-entities SYSTEM "entities/sysklogd.ent">
<!ENTITY % sysvinit-entities SYSTEM "entities/sysvinit.ent">
<!ENTITY % tar-entities SYSTEM "entities/tar.ent">
<!ENTITY % tcl-entities SYSTEM "entities/tcl.ent">
<!ENTITY % texinfo-entities SYSTEM "entities/texinfo.ent">
<!ENTITY % utillinux-entities SYSTEM "entities/utillinux.ent">
<!ENTITY % vim-entities SYSTEM "entities/vim.ent">
<!ENTITY % zlib-entities SYSTEM "entities/zlib.ent">
%bookstructure;
%autoconf-entities;
%automake-entities;
%bash-entities;
%binutils-entities;
%bison-entities;
%bootscripts-entities;
%bzip2-entities;
%coreutils-entities;
%dejagnu-entities;
%diffutils-entities;
%e2fsprogs-entities;
%ed-entities;
%expect-entities;
%file-entities;
%findutils-entities;
%flex-entities;
%gawk-entities;
%gcc-entities;
%gcc-2953-entities;
%gettext-entities;
%glibc-entities;
%grep-entities;
%groff-entities;
%grub-entities;
%gzip-entities;
%inetutils-entities;
%kbd-entities;
%kernel-entities;
%less-entities;
%lfs-utils-entities;
%libtool-entities;
%m4-entities;
%make-entities;
%makedev-entities;
%man-entities;
%manpages-entities;
%modutils-entities;
%ncurses-entities;
%nettools-entities;
%patch-entities;
%perl-entities;
%procinfo-entities;
%procps-entities;
%psmisc-entities;
%sed-entities;
%shadow-entities;
%sysklogd-entities;
%sysvinit-entities;
%tcl-entities;
%tar-entities;
%texinfo-entities;
%utillinux-entities;
%vim-entities;
%zlib-entities;
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "general.ent">
%general-entities;
]>
<book>
&book;
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/bookinfo.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/dedication.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/preface.xml"/>
<part id="part1">
<title>Introduction</title>
<?dbhtml filename="part1.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter01/chapter01.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter02/chapter02.xml"/>
</part>
<part id="part2">
<title>Preparing for the build</title>
<?dbhtml filename="part2.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter03/chapter03.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter04/chapter04.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter05/chapter05.xml"/>
</part>
<part id="part3">
<title>Building the LFS system</title>
<?dbhtml filename="part3.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter06/chapter06.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter07/chapter07.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter08/chapter08.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter09/chapter09.xml"/>
</part>
<index/>
</book>

68
lfs.dsl
View File

@ -1,68 +0,0 @@
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY docbook.dsl SYSTEM "docbook.dsl" CDATA dsssl>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
(define %generate-legalnotice-link%
;; put the legal notice in a separate file
#t)
(define ($legalnotice-link-file$ legalnotice)
;; filename of the legalnotice file
(string-append "legalnotice"%html-ext%))
(define %html-ext%
;; html extenstion
".html")
(define %root-filename%
;; index file of the book
"index")
(define %use-id-as-filename%
;; filenames same as id attribute in title tags
#t)
(define %body-attr%
;; html body settings
(list
(list "BGCOLOR" "#FFFFFF")
(list "TEXT" "#000000")
(list "LINK" "#0000FF")
(list "VLINK" "#840084")
(list "ALINK" "#006000")))
(define (chunk-skip-first-element-list)
;; forces the Table of Contents on separate page
'())
(define (list-element-list)
;; fixes bug in Table of Contents generation
'())
(define %shade-verbatim%
;; verbatim sections will be shaded if t(rue)
#t)
;;(define %section-autolabel%
;; For enumerated sections (1.1, 1.1.1, 1.2, etc.)
;;#t)
(element emphasis
;; make role=strong equate to bold for emphasis tag
(if (equal? (attribute-string "role") "strong")
(make element gi: "STRONG" (process-children))
(make element gi: "EM" (process-children))))
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="docbook.dsl">
</style-sheet>

View File

@ -0,0 +1,306 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="ch-scatter-acknowledgments">
<title>Acknowledgments</title>
<?dbhtml filename="acknowledgements.html"?>
<para>We would like to thank the following people and organizations for their
contributions to the Linux From Scratch Project.</para>
<sect2>
<title>Current Project Team Members</title>
<itemizedlist>
<listitem><para><ulink url="mailto:gerard@linuxfromscratch.org">Gerard
Beekmans</ulink> &lt;gerard@linuxfromscratch.org&gt; -- Linux-From-Scratch
initiator, LFS Project organizer.</para></listitem>
<listitem><para><ulink url="mailto:matthew@linuxfromscratch.org">Matthew
Burgess</ulink> &lt;matthew@linuxfromscratch.org&gt; -- LFS General Package
maintainer, LFS Book editor.</para></listitem>
<listitem><para><ulink url="mailto:meerkats@bellsouth.net">Craig
Colton</ulink> &lt;meerkats@bellsouth.net&gt; -- LFS, ALFS, BLFS and Hints
Project logo creator.</para></listitem>
<listitem><para><ulink url="mailto:jeroen@linuxfromscratch.org">Jeroen
Coumans</ulink> &lt;jeroen@linuxfromscratch.org&gt; -- Website developer, FAQ
maintainer.</para></listitem>
<listitem><para><ulink url="mailto:bdubbs@linuxfromscratch.org">Bruce
Dubbs</ulink> &lt;bdubbs@linuxfromscratch.org&gt; -- LFS Quality Assurance Team
leader, BLFS Book editor.</para></listitem>
<listitem><para><ulink url="mailto:alex@linuxfromscratch.org">Alex
Groenewoud</ulink> &lt;alex@linuxfromscratch.org&gt; -- LFS Book
editor.</para></listitem>
<listitem><para><ulink url="mailto:markh@linuxfromscratch.org">Mark
Hymers</ulink> &lt;markh@linuxfromscratch.org&gt; -- CVS maintainer, BLFS Book
creator, former LFS Book editor.</para></listitem>
<listitem><para><ulink url="mailto:iwanek@linuxfromscratch.org">James
Iwanek</ulink> &lt;iwanek@linuxfromscratch.org&gt; -- System Administration
Team member.</para></listitem>
<listitem><para><ulink url="mailto:nicholas@linuxfromscratch.org">Nicholas
Leippe</ulink> &lt;nicholas@linuxfromscratch.org&gt; -- Wiki
maintainer.</para></listitem>
<listitem><para><ulink url="mailto:lizardo@linuxfromscratch.org">Anderson
Lizardo</ulink> &lt;lizardo@linuxfromscratch.org&gt; -- Website backend scripts
creator and maintainer.</para></listitem>
<listitem><para><ulink url="mailto:bill@linuxfromscratch.org">Bill
Maltby</ulink> &lt;bill@linuxfromscratch.org&gt; -- LFS Project
organizer.</para></listitem>
<listitem><para><ulink url="mailto:scot@linuxfromscratch.org">Scot Mc
Pherson</ulink> &lt;scot@linuxfromscratch.org&gt; -- LFS NNTP gateway
maintainer.</para></listitem>
<listitem><para><ulink url="mailto:ryan@linuxfromscratch.org">Ryan
Oliver</ulink> &lt;ryan@linuxfromscratch.org&gt; -- Testing Team leader,
Toolchain maintainer, co-creator of PLFS.</para></listitem>
<listitem><para><ulink url="mailto:jwrober@linuxfromscratch.org">James
Robertson</ulink> &lt;jwrober@linuxfromscratch.org&gt; -- Bugzilla maintainer,
Wiki developer, LFS Book editor.</para></listitem>
<listitem><para><ulink url="mailto:greg@linuxfromscratch.org">Greg
Schafer</ulink> &lt;greg@linuxfromscratch.org&gt; -- Toolchain maintainer,
LFS Book editor, co-creator of PLFS.</para></listitem>
<listitem><para><ulink url="mailto:tushar@linuxfromscratch.org">Tushar
Teredesai</ulink> &lt;tushar@linuxfromscratch.org&gt; -- BLFS Book editor,
Hints and Patches Projects maintainer.</para></listitem>
<listitem><para><ulink url="mailto:jeremy@linuxfromscratch.org">Jeremy
Utley</ulink> &lt;jeremy@linuxfromscratch.org&gt; -- LFS Book editor, Bugzilla
maintainer.</para></listitem>
<listitem><para>Countless other people on the various LFS and BLFS
mailing lists who are making this book happen by giving their suggestions,
testing the book and submitting bug reports, instructions and their
experiences with installing various packages.</para></listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Translators</title>
<itemizedlist>
<listitem><para><ulink url="mailto:macana@lfs-es.org">Manuel Canales
Esparcia</ulink> &lt;macana@lfs-es.org&gt; -- Spanish LFS translation
project.</para></listitem>
<listitem><para><ulink url="mailto:johan@linuxfromscratch.org">Johan
Lenglet</ulink> &lt;johan@linuxfromscratch.org&gt; -- French LFS translation
project.</para></listitem>
<listitem><para><ulink url="mailto:lizardo@linuxfromscratch.org">Anderson
Lizardo</ulink> &lt;lizardo@linuxfromscratch.org&gt; -- Portuguese LFS
translation project.</para></listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Mirror Maintainers</title>
<itemizedlist>
<listitem><para><ulink url="mailto:jason@dstc.edu.au">Jason Andrade</ulink>
&lt;jason@dstc.edu.au&gt; -- au.linuxfromscratch.org mirror.</para></listitem>
<listitem><para><ulink url="mailto:lost@l-w.net">William Astle</ulink>
&lt;lost@l-w.net&gt; -- ca.linuxfromscratch.org mirror.</para></listitem>
<listitem><para><ulink url="mailto:baque@cict.fr">Baque</ulink>
&lt;baque@cict.fr&gt; -- lfs.cict.fr mirror.</para></listitem>
<listitem><para><ulink url="mailto:stevie@stevie20.de">Stephan Brendel</ulink>
&lt;stevie@stevie20.de&gt; -- lfs.netservice-neuss.de
mirror.</para></listitem>
<listitem><para><ulink url="mailto:ian@ichilton.co.uk">Ian Chilton</ulink>
&lt;ian@ichilton.co.uk&gt; -- us.linuxfromscratch.org, linuxfromscratch.co.uk
mirrors.</para></listitem>
<listitem><para><ulink url="mailto:fredan-lfs@fredan.org">Fredrik
Danerklint</ulink> &lt;fredan-lfs@fredan.org&gt; -- se.linuxfromscratch.org
mirror.</para></listitem>
<listitem><para><ulink url="mailto:pgpkeys@aeternamtech.com">David D.W.
Downey</ulink> &lt;pgpkeys@aeternamtech.com&gt; -- lfs.learnbyexample.com
mirror.</para></listitem>
<listitem><para><ulink url="mailto:ebf@aedsolucoes.com.br">Eduardo B.
Fonseca</ulink> &lt;ebf@aedsolucoes.com.br&gt; -- br.linuxfromscratch.org
mirror.</para></listitem>
<listitem><para><ulink url="mailto:hrx@hrxnet.de">Hagen Herrschaft</ulink>
&lt;hrx@hrxnet.de&gt; -- de.linuxfromscratch.org mirror.</para></listitem>
<listitem><para><ulink url="mailto:tim@idge.net">Tim Jackson</ulink>
&lt;tim@idge.net&gt; -- linuxfromscratch.idge.net mirror.</para></listitem>
<listitem><para><ulink url="mailto:barna@siker.hu">Barna Koczka</ulink>
&lt;barna@siker.hu&gt; -- hu.linuxfromscratch.org mirror.</para></listitem>
<listitem><para><ulink url="mailto:lfs-mirror@linuxfromscratch.rave.org">Roel
Neefs</ulink> -- linuxfromscratch.rave.org mirror.</para></listitem>
<listitem><para><ulink url="mailto:sime@dot-sime.com">Simon Nicoll</ulink>
&lt;sime@dot-sime.com&gt; -- uk.linuxfromscratch.org mirror.</para></listitem>
<listitem><para><ulink url="mailto:ervin@activalink.net">Ervin S.
Odisho</ulink> &lt;ervin@activalink.net&gt; -- lfs.activalink.net
mirror.</para></listitem>
<listitem><para><ulink url="mailto:guido@primerelay.net">Guido Passet</ulink>
&lt;guido@primerelay.net&gt; -- nl.linuxfromscratch.org
mirror.</para></listitem>
<listitem><para><ulink url="mailto:miha@xuy.biz">Mikhail Pastukhov</ulink>
&lt;miha@xuy.biz&gt; -- lfs.130th.net mirror.</para></listitem>
<listitem><para><ulink url="mailto:jpolen@rackspace.com">Jeremy Polen</ulink>
&lt;jpolen@rackspace.com&gt; -- us2.linuxfromscratch.org
mirror.</para></listitem>
<listitem><para><ulink url="http://www.mirror.ac.uk">UK Mirror Service</ulink>
-- linuxfromscratch.mirror.co.uk mirror.</para></listitem>
<listitem><para><ulink url="mailto:thomas@sofagang.dk">Thomas Skyt</ulink>
&lt;thomas@sofagang.dk&gt; -- dk.linuxfromscratch.org mirror.</para></listitem>
<listitem><para><ulink url="mailto:Antonin.Sprinzl@tuwien.ac.at">Antonin
Sprinzl</ulink> &lt;Antonin.Sprinzl@tuwien.ac.at&gt; -- at.linuxfromscratch.org
mirror.</para></listitem>
<listitem><para><ulink url="mailto:dag@stenstad.net">Dag Stenstad</ulink>
&lt;dag@stenstad.net&gt; for providing no.linuxfromscratch.org and
<ulink url="mailto:ian@ichilton.co.uk">Ian Chilton</ulink> for running
it.</para></listitem>
<listitem><para><ulink url="mailto:archive@doc.cs.univ-paris8.fr">Parisian
sysadmins</ulink> &lt;archive@doc.cs.univ-paris8.fr&gt; --
www2.fr.linuxfromscratch.org mirror.</para></listitem>
<listitem><para><ulink url="mailto:highos@linuxfromscratch.org">Jesse
Tie-Ten-Quee</ulink> &lt;highos@linuxfromscratch.org&gt; for providing and
running the linuxfromscratch.org server.</para></listitem>
<listitem><para><ulink url="mailto:velin@zadnik.org">Alexander Velin</ulink>
&lt;velin@zadnik.org&gt; -- bg.linuxfromscratch.org mirror.</para></listitem>
<listitem><para><ulink url="mailto:Martin.Voss@ada.de">Martin Voss</ulink>
&lt;Martin.Voss@ada.de&gt; -- lfs.linux-matrix.net mirror.</para></listitem>
<listitem><para><ulink url="mailto:pyng@spam.averse.net">Pui Yong</ulink>
&lt;pyng@spam.averse.net&gt; -- sg.linuxfromscratch.org
mirror.</para></listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Donators</title>
<itemizedlist>
<listitem><para><ulink url="mailto:dean@vipersoft.co.uk">Dean Benson</ulink>
&lt;dean@vipersoft.co.uk&gt; for several monetary
contributions.</para></listitem>
<listitem><para><ulink url="http://www.dreamwvr.com">DREAMWVR.COM</ulink> for
their past sponsorship of donating various resources to the LFS and related
sub projects.</para></listitem>
<listitem><para><ulink url="mailto:hrx@hrxnet.de">Hagen Herrschaft</ulink>
&lt;hrx@hrxnet.de&gt; for donating a 2.2 GHz P4 system, now running under the
name of <emphasis>lorien</emphasis>.</para></listitem>
<listitem><para><ulink url="http://www.oreilly.com">O'Reilly</ulink> for
donating books on SQL and PHP.</para></listitem>
<listitem><para><ulink url="http://www.vasoftware.com">VA Software</ulink>
who, on behalf of <ulink url="http://www.linux.com">Linux.com</ulink>, donated
a VA Linux 420 (former StartX SP2) workstation.</para></listitem>
<listitem><para><ulink url="mailto:strider@linux.com">Mark Stone</ulink> for
donating <emphasis>shadowfax</emphasis>, the first linuxfromscratch.org
server, a 750 MHz P3 with 512 MB RAM and two 9 GB SCSI drives. When the server
moved it was renamed to <emphasis>belgarath</emphasis>.</para></listitem>
<listitem><para><ulink url="mailto:highos@linuxfromscratch.org">Jesse
Tie-Ten-Quee</ulink> &lt;highos@linuxfromscratch.org&gt; for donating a Yamaha
CDRW 8824E CD-writer.</para></listitem>
<listitem><para>Countless other people on the various LFS mailing lists who are
making this book better by giving their suggestions, submitting bug reports,
and throwing in their criticism.</para></listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Former Team Members and Contributors</title>
<itemizedlist>
<listitem><para><ulink url="mailto:timothy@linuxfromscratch.org">Timothy
Bauscher</ulink> &lt;timothy@linuxfromscratch.org&gt; -- LFS Book editor, Hints
Project maintainer.</para></listitem>
<listitem><para>Robert Briggs for originally donating the
<emphasis>linuxfromscratch.org</emphasis> and
<emphasis>linuxfromscratch.com</emphasis> domain names.</para></listitem>
<listitem><para><ulink url="mailto:ian@ichilton.co.uk">Ian Chilton</ulink>
&lt;ian@ichilton.co.uk&gt; for maintaining the Hints project.</para></listitem>
<listitem><para><ulink url="mailto:gimli@linuxfromscratch.org">Marc
Heerdink</ulink> &lt;gimli@linuxfromscratch.org&gt; -- LFS Book
editor.</para></listitem>
<listitem><para><ulink url="mailto:sklein@linuxfromscratch.org">Seth W.
Klein</ulink> &lt;sklein@linuxfromscratch.org&gt; -- LFS FAQ
creator.</para></listitem>
<listitem><para><ulink url="mailto:garrett@linuxart.com">Garrett
LeSage</ulink> &lt;garrett@linuxart.com&gt; -- Original LFS banner
creator.</para></listitem>
<listitem><para><ulink url="mailto:nomis80@videotron.ca">Simon
Perreault</ulink> &lt;nomis80@videotron.ca&gt; -- Hints Project
maintainer.</para></listitem>
<listitem><para><ulink url="mailto:Geert.Poels@skynet.be">Geert Poels</ulink>
&lt;Geert.Poels@skynet.be&gt; -- Original BLFS banner creator; based on the
LFS banner by Garrett LeSage.</para></listitem>
<listitem><para><ulink url="mailto:bkenoah@oswd.org">Frank Skettino</ulink>
&lt;bkenoah@oswd.org&gt; for the initial design of the old website -- have a
look at <ulink url="http://www.oswd.org/"/>.</para></listitem>
<listitem><para><ulink url="mailto:highos@linuxfromscratch.org">Jesse
Tie-Ten-Quee</ulink> &lt;highos@linuxfromscratch.org&gt; for answering
countless questions on IRC and having a great deal of patience.</para></listitem>
</itemizedlist>
</sect2>
</sect1>

96
prologue/audience.xml Normal file
View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="pre-audience">
<title>Audience</title>
<?dbhtml filename="audience.html"?>
<sect2>
<title>Who would want to read this book</title>
<para>There are many reasons why somebody would want to read this book. The
principal reason being to install a Linux system straight from the source
code. A question many people raise is <quote>Why go through all the hassle of
manually building a Linux system from scratch when you can just download and
install an existing one?</quote>. That is a good question and is the impetus for
this section of the book.</para>
<para>One important reason for LFS's existence is to help people learn how a
Linux system works from the inside out. Building an LFS system helps demonstrate
to you what makes Linux tick, how things work together and depend on each
other. One of the best things that this learning experience provides is the
ability to customize Linux to your own tastes and needs.</para>
<para>A key benefit of LFS is that you have more control of your system
without relying on someone else's Linux implementation. With LFS, you are
in the driver's seat and dictate every aspect of your system, such as the
directory layout and bootscript setup. You also dictate where, why and how
programs are installed.</para>
<para>Another benefit of LFS is the ability to create a very compact Linux
system. When installing a regular distribution, you are usually forced to
install several programs which you are likely never to use. They're just
sitting there wasting precious disk space (or worse, CPU cycles). It isn't
difficult to build an LFS system of less than 100 MB. Does that still sound like a
lot? A few of us have been working on creating a very small embedded LFS
system. We successfully built a system that was just enough to run the Apache
web server with approximately 8MB of disk space used. Further stripping could
bring that down to 5 MB or less. Try that with a regular distribution.</para>
<para>We could compare Linux distributions to a hamburger you buy at a
fast-food restaurant -- you have no idea what you are eating. LFS, on the
other hand, doesn't give you a hamburger, but the recipe to make a hamburger.
This allows you to review it, to omit unwanted ingredients, and to
add your own ingredients which enhance the flavor of your burger. When you
are satisfied with the recipe, you go on to preparing it. You make it just
the way you like it: broil it, bake it, deep-fry it, barbecue it, or eat it
tar-tar (raw).</para>
<para>Another analogy that we can use is that of comparing LFS with a
finished house. LFS will give you the skeletal plan of a house, but it's up
to you to build it. You have the freedom to adjust your plans as you
go.</para>
<para>One last advantage of a custom built Linux system is security.
By compiling the entire system from source code, you are empowered to audit
everything and apply all the security patches you feel are needed. You don't
have to wait for somebody else to compile binary packages that fix a security
hole. Unless you examine the patch and implement it yourself you have no
guarantee that the new binary package was built correctly and actually fixes the
problem (adequately).</para>
<para>There are too many good reasons to build your own LFS system for them all
to be listed here. This section is only the tip of the iceberg. As you
continue in your LFS experience, you will find on your own the power that
information and knowledge truly bring.</para>
</sect2>
<sect2>
<title>Who would not want to read this book</title>
<para>There are probably some who, for whatever reason, would feel that they do not
want to read this book. If you do not wish to build your own Linux system from
scratch, then you probably don't want to read this book. Our goal is to help
you build a complete and usable foundation-level system. If you only want to
know what happens while your computer boots, then we recommend the <quote>From
Power Up To Bash Prompt</quote> HOWTO. The HOWTO builds a bare system which is
similar to that of this book, but it focuses strictly on creating a system
capable of booting to a BASH prompt.</para>
<para>While you decide which to read, consider your objective. If you wish
to build a Linux system while learning a bit along the way, then this book
is probably your best choice. If your objective is strictly educational and
you do not have any plans for your finished system, then the
<quote>From Power Up To Bash Prompt</quote> HOWTO is probably a better choice.</para>
<para>The <quote>From Power Up To Bash Prompt</quote> HOWTO is located at
<ulink url="http://axiom.anu.edu.au/~okeefe/p2b/"/> or on The Linux
Documentation Project's website at
<ulink url="http://www.tldp.org/HOWTO/From-PowerUp-To-Bash-Prompt-HOWTO.html"/>.</para>
</sect2>
</sect1>

View File

@ -1,3 +1,8 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<bookinfo>
<title>Linux From Scratch</title>
<subtitle>Version &version;</subtitle>
@ -34,12 +39,12 @@ met:</para>
<listitem><para>Redistributions in any form must retain the above copyright
notice, this list of conditions and the following disclaimer.</para></listitem>
<listitem><para>Neither the name of "Linux From Scratch" nor the names of
its contributors may be used to endorse or promote products derived from
this material without specific prior written permission.</para></listitem>
<listitem><para>Neither the name of <quote>Linux From Scratch</quote> nor the
names of its contributors may be used to endorse or promote products derived
from this material without specific prior written permission.</para></listitem>
<listitem><para>Any material derived from Linux From Scratch must contain
a reference to the "Linux From Scratch" project.</para></listitem>
a reference to the <quote>Linux From Scratch</quote> project.</para></listitem>
</itemizedlist>

10
prologue/dedication.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE dedication PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<dedication>
<title>Dedication</title>
<para>This book is dedicated to my loving and supportive wife
<emphasis>Beverly Beekmans</emphasis>.</para>
</dedication>

34
prologue/foreword.xml Normal file
View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="pf-foreword">
<title>Foreword</title>
<?dbhtml filename="foreword.html"?>
<para>Having used a number of different Linux distributions, I was never
fully satisfied with any of them. I didn't like the arrangement of
the bootscripts. I didn't like the way certain programs were configured by
default. Much more of that sort of thing bothered me. Finally I realized
that if I wanted full satisfaction from my Linux system I would have to
build my own system from scratch, using only the source code. I resolved
not to use pre-compiled packages of any kind, nor CD-ROM or boot disk that
would install some basic utilities. I would use my current Linux system to
develop my own.</para>
<para>This wild idea seemed very difficult at the time and often seemed
an impossible task. After sorting out all kinds of problems, such as
dependencies and compile-time errors, a custom-built Linux system was
created that was fully operational. I called this system a Linux From Scratch
system, or LFS for short.</para>
<para>I hope you will have a great time working on your own LFS!</para>
<literallayout>
--
Gerard Beekmans
gerard@linuxfromscratch.org
</literallayout>
</sect1>

38
prologue/organization.xml Normal file
View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="pre-organization">
<title>Structure</title>
<?dbhtml filename="organization.html"?>
<para>This book is divided into the following four parts:</para>
<sect2>
<title>Part I - Introduction</title>
<para>Part I explains a few important things on how to proceed with the
installation, and gives meta-information about the book (version, changelog,
acknowledgments, associated mailing lists, and so on).</para>
</sect2>
<sect2>
<title>Part II - Preparing for the build</title>
<para>Part II describes how to prepare for the building process: making a
partition, downloading the packages, and compiling temporary tools.</para>
</sect2>
<sect2>
<title>Part III - Building the LFS system</title>
<para>Part III guides you through the building of the LFS system: compiling and
installing all the packages one by one, setting up the boot scripts, and
installing the kernel. The resulting basic Linux system is the foundation upon
which you can build other software, to extend your system in the way you like.
At the end of the book you'll find a list of all of the programs, libraries and
important files that have been installed as an easy to use reference.</para>
</sect2>
</sect1>

18
prologue/preface.xml Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<preface id="preface">
<?dbhtml dir="prologue"?>
<title>Preface</title>
<?dbhtml filename="preface.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="foreword.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="audience.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prerequisites.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="typography.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="acknowledgments.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="organization.xml"/>
</preface>

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="pf-prerequisites">
<title>Prerequisites</title>
<?dbhtml filename="prerequisites.html"?>
<para>This book assumes that its reader has a good deal of knowledge about
using and installing Linux software. Before you begin building your LFS
system, you should read the following HOWTOs:</para>
<itemizedlist>
<listitem><para>Software-Building-HOWTO</para>
<para>This is a comprehensive guide to building and installing
<quote>generic</quote> Unix software distributions under Linux. This HOWTO is
available at <ulink
url="http://www.tldp.org/HOWTO/Software-Building-HOWTO.html"/>.</para>
</listitem>
<listitem><para>The Linux Users' Guide</para>
<para>This guide covers the usage of assorted Linux software and is
available at
<ulink url="http://espc22.murdoch.edu.au/~stewart/guide/guide.html"/>.</para></listitem>
<listitem><para>The Essential Pre-Reading Hint</para>
<para>This is an LFS Hint written specifically for new users of Linux. It is
mostly a list of links to excellent sources of information on a wide range of
topics. Any person attempting to install LFS, should at least have an
understanding of many of the topics in this hint. It is available at
<ulink url="&hints-root;essential_prereading.txt"/></para></listitem>
</itemizedlist>
</sect1>

52
prologue/typography.xml Normal file
View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="pre-typography">
<title>Typography</title>
<?dbhtml filename="typography.html"?>
<para>To make things easier to follow, there are a few typographical
conventions used throughout the book. Following are some examples:</para>
<screen><userinput>./configure --prefix=/usr</userinput></screen>
<blockquote><para>This form of text is designed to be typed exactly
as seen unless otherwise noted in the surrounding text. It is also used
in the explanation sections to identify which of the commands is being
referenced.</para></blockquote>
<para><filename>install-info: unknown option
`--dir-file=/mnt/lfs/usr/info/dir'</filename></para>
<blockquote><para>This form of text (fixed width text) is showing screen
output, probably as the result of commands issued, and is also used to
show filenames, such as <filename>/etc/ld.so.conf</filename>.</para></blockquote>
<para><emphasis>Emphasis</emphasis></para>
<blockquote><para>This form of text is used for several purposes in the
book, mainly to emphasize important points, and to give examples of
what to type.</para></blockquote>
<para><ulink url="&lfs-root;"/></para>
<blockquote><para>This form of text is used for hyperlinks, both within the
book and to external pages such as HOWTOs, download locations and
websites.</para></blockquote>
<screen><userinput>cat &gt; $LFS/etc/group &lt;&lt; "EOF"</userinput>
root:x:0:
bin:x:1:
......
<userinput>EOF</userinput>
</screen>
<blockquote><para>This type of section is used mainly when creating
configuration files. The first command tells the system to create
the file $LFS/etc/group from whatever is typed on the following lines until
the sequence EOF is encountered. Therefore, this whole section is generally
typed as seen.</para></blockquote>
</sect1>

View File

@ -0,0 +1,92 @@
<?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/1.65.1/xhtml/chunk.xsl"/>
<xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
<!-- The CSS Stylesheet -->
<xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
<!-- Include our customised templates -->
<xsl:include href="xhtml/lfs-toc.xsl"/>
<xsl:include href="xhtml/lfs-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>
</xsl:stylesheet>

130
stylesheets/lfs-pdf.xsl Normal file
View File

@ -0,0 +1,130 @@
<?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/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'"/>
<!-- Include our customised templates -->
<xsl:include href="pdf/lfs-index.xsl"/>
<!-- 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',@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>
<!-- Prevent duplicate e-mails in the Acknowledgments pages-->
<xsl:param name="ulink.show" select="0"/>
</xsl:stylesheet>

124
stylesheets/lfs.css Normal file
View File

@ -0,0 +1,124 @@
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;
}
.item {
width: 15em;
float: left;
}
.secitem {
font-weight: normal;
width: 12.5em;
float: left;
}
.toc ul, .index ul, .navheader ul, .navfooter ul {
list-style: none;
}