Updated the INSTALL and README files with instructions from BLFS.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2761 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
James Robertson 2003-09-10 01:13:03 +00:00
parent fbb00ac78a
commit e8a0469d8b
2 changed files with 56 additions and 91 deletions

130
INSTALL
View File

@ -1,110 +1,72 @@
Ok, so you have downloaded the XML source. Now what? You are probably LFS Book Conversion Tools Installation Instructions
wanting to convert these XML files to easier to read HTML, PS, PDF, TXT
or other formatted files. All that can be read below.
Let's start by downloading some software. After downloading the CVS source, there are some things that need to be setup
on your computer if you want to convert the XML source into something easier to
read (e.g. HTML, TXT, PS or PDF). If you are interested in this, then keep
reading. If you are only interested in editing the XML source for re-
submission to the lfs-book or lfs-dev mailing lists, then you do not need this
document. Instead, you need to read the LFS Editor's Manual. See the LFS
website at http://linuxfromscratch.org for more information.
If all you want to do is being able to convert XML to HTML download the -------------------------------------------------------------------------------
following: If all you want to do is convert XML to HTML perform the following:
OpenJade - http://openjade.sourceforge.net/ First, let's handle some dependancies:
DocBook-XML DTD - http://www.docbook.org/xml/4.1.2/
Modified DocBook Entities -
http://linuxfromscratch.org/~gerard/docbook-4.1.2-newent.tar.bz2
DSSSL DocBook Stylesheets - http://www.nwalsh.com/docbook/dsssl/
As the DocBook DTD and Stylesheets are made available as zip archives you * Unzip
may need to download the unzip package as well if your Linux system doesn't - http://www.linuxfromscratch.org/blfs/view/cvs/general/unzip.html
have one:
Unzip - ftp://ftp.uu.net/pub/archiving/zip/src/ * SGML Common
- http://www.linuxfromscratch.org/blfs/view/cvs/pst/sgml-common.html
If you want to be able to convert the book into PS and PDF as well I * libxml2
recommend using the Htmldoc program. This takes a html file (created - http://www.linuxfromscratch.org/blfs/view/cvs/general/libxml2.html
with openjade which you already downloaded) and converts it to PS or
PDF:
HTMLDOC - http://www.easysw.com/htmldoc/ Now install the following:
FLTK (X front-end) - http://sourceforge.net/projects/fltk
If you want to be able to convert the book into TXT as well I recommend * DocBook DTD
using lynx to convert HTML to TXT using the -dump option to lynx. - http://www.linuxfromscratch.org/blfs/view/cvs/pst/DocBook.html
Lynx - http://lynx.browser.org * 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
You have everything you need now. Let's install this stuff. * OpenJade
- http://www.linuxfromscratch.org/blfs/view/cvs/pst/openjade.html
Create the /usr/share/docbook directory, cd into it and unpack the Once you have followed the installation instructions for all these packages
docbook-xml dtd archive there. Move all the files and directories from from the BLFS Book, then you have a basic DocBook setup. Below are some
the newly created subdirectory to the current directory alternate packages that you can use to convert to other formats.
(/usr/share/docbook). We don't really need a
/usr/share/docbook/docbook-<version> subdir for our purposes.
Remove the ent directory and unpack the docbook-4.1.2-newent.tar.bz2 file. -------------------------------------------------------------------------------
This will create a new ent directory with entity files that work better If you want to be able to convert the book into PS and PDF as well, then you
with XML. will need the Htmldoc package. This takes a HTML file (created with openjade
which you already installed) and converts it to PS or PDF:
Create the /usr/share/dsssl directory, cd into it and unpack the dsssl - http://www.easysw.com/htmldoc/
stylesheet archive in there. Rename the directory that's created by tar
into 'docbook'. Now copy the lfs.dsl file you will find in
the LFS-BOOK XML archive into /usr/share/dsssl/docbook/html
The last step is installing OpenJade.
In order for openjade to be able to convert the DocBook based documents
into other formats, it needs to know where the DocBook DTD related
files are located. This is sort of the DocBook equivalent for the $PATH
variable. You have two ways of doing this:
1) You can set the $SGML_CATALOG_FILES variable and include the full
paths to the catalog files in it
or
2) You can hard-code the paths into the openjade binary.
If you choose option 1, add the following to your bash configuration
file, system wide profile or wherever you wish to include it:
export SGML_CATALOG_FILES=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog
Followed by installing openjade by running:
./configure --prefix=/usr
make
make install
cp -av dsssl /usr/share/dsssl/openjade
If you choose option 2, install OpenJade as follows:
./configure --prefix=/usr \
> --enable-default-catalog=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog
make
make install
cp -av dsssl /usr/share/dsssl/openjade
And you don't have to worry about the $SGML_CATALOG_FILES variable in
this case.
You're all set to convert XML to HTML (among a few other formats
supported by openjade) now. If you want to convert to PS and PDF as
well, install the following two packages.
FLTK (you can skip this one if you don't want the X front-end):
./configure --prefix=/usr
make
make install
Install HTMLDOC by running: Install HTMLDOC by running:
./configure --prefix=/usr ./configure --prefix=/usr
make make
make install make install
An excellent X front-end for HTMLDOC is FLTK. If you will be doing rendering
in X, then you will probably want this package.
The last package is Lynx which will be used for the HTML to TXT - http://sourceforge.net/projects/fltk
conversion. Install it by running:
Install FLTK bt running:
./configure --prefix=/usr ./configure --prefix=/usr
make make
make install make install
There, all set now. Go back to the README file for some examples how to If you want to be able to convert the book into TXT as well, then you need the
convert this XML to the various other formats. 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.

13
README
View File

@ -1,8 +1,11 @@
How do I convert these XML files to other formats like HTML, PF, PS LFS Book Readme
and TXT? You need to have some software installed that deal with these
conversions. Please read the INSTALL file how to install the software. This document is meant to instruct the user on how to convert the book's XML
Then come back to this file for examples how to convert these files source to other formats (e.g. HTML, PDF, PS and TXT). First, if you have not
into various other formats. 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
various other formats.
XML to HTML: XML to HTML:
------------ ------------