Initial commit

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@191 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Gerard Beekmans 2001-02-22 18:21:07 +00:00
parent fdf3283acb
commit 2fadfb6ff6
2 changed files with 197 additions and 0 deletions

126
INSTALL Normal file
View File

@ -0,0 +1,126 @@
Ok, so you have downloaded the XML source. Now what? You are probably
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.
If all you want to do is being able to convert XML to HTML download the
following:
OpenJade - http://openjade.sourceforge.net
DocBook-XML DTD - http://www.docbook.org/xml/4.1.2/
DSSSL DocBook Stylesheets - http://www.nwalsh.com/docbook/dsssl/
As the DocBook DTD and Stylesheets are made available as a zip achives you
may need to download the unzip package as well if your Linux system doesn't
have one:
Unzip - ftp://ftp.info-zip.org/pub/infozip/src/
If you want to be able to convert the book into PS and PDF as well I
recommend using the Htmldoc program. This takes a html file (created
with openjade which you already downloaded) and converts it to PS or
PDF:
HTMLDOC - http://www.easysw.com/htmldoc/
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
using lynx to convert HTML to TXT using the -dump option to lynx. There
are most likely better programs to do this, but Lynx is often installed
on systems anyways (as a console based web browser).
Lynx - http://lynx.browser.org
You have everything you need now. Let's install this stuff.
Create the /usr/share/docbook directory, cd into it and unpack the
docbook-xml dtd archive there.
Create the /usr/share/dsssl directory, cd into it and unpack the dsssl
stylesheet archive in there. 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 installed 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.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-catalot=/usr/share/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
HTMLDOC:
Edit the Makefile.in file and find these lines:
install:
$(MAKE) all
for dir in $(INSTALLDIRS); do\
echo Installing in $$dir...;\
(cd $$dir; $(MAKE) -$(MAKEFLAGS) clean) || break;\
done
Change this into:
install:
$(MAKE) all
for dir in $(INSTALLDIRS); do\
echo Installing in $$dir...;\
(cd $$dir; $(MAKE) -$(MAKEFLAGS) install) || break;\
done
This will fix that little bug that causes 'make install' to be
identical to 'make clean'. Now continue with:
./configure --prefix=/usr
make
make install
The last package is Lynx which will be used for the HTML to TXT
conversion. Install it by running:
./configure --prefix=/usr
make
make install
There, all set now. Go back to the README file for some examples how to
convert this XML to the various other formats.

71
README Normal file
View File

@ -0,0 +1,71 @@
How do I convert these XML files to other formats like HTML, PDF, PS
and TXT? You need to have some software installed that deal with these
conversions. Please read the INSTALL file how to install that software.
Then come back to this file 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:
/usr/bin/openjade -t sgml \
-d /usr/share/dsssl/docbook/html/lfs.dsl \
/usr/share/dsssl/docbook/dtds/decls/xml.dcl \
/path/to/intel.xml
While openjade is running you will see a lot of the following kind of
errors:
/usr/bin/openjade:/usr/share/docbook/ent/iso-lat1.ent:6:19:E: "X00E1"
is not a function name
/usr/bin/openjade:/usr/share/docbook/ent/iso-lat1.ent:7:19:E: "X00C1"
is not a function name
/usr/bin/openjade:/usr/share/docbook/ent/iso-lat1.ent:8:18:E: "X00E2"
is not a function name
/usr/bin/openjade:/usr/share/docbook/ent/iso-lat1.ent:9:18:E: "X00C2"
is not a function name
/usr/bin/openjade:/usr/share/docbook/ent/iso-lat1.ent:10:19:E: "X00E0"
is not a function name
They are normal in the sense of that it doens't affect the output
files. A fix hasn't been found yet so we'll just have to live with it.
XML to NOCHUNKS-HTML:
--------------------
The NOCHUNKS HTML version is one big HTML file:
/usr/bin/openjade -t xml \
-V nochunks \
-d /usr/share/dsssl/docbook/html/lfs.dsl \
/usr/share/dsssl/docbook/dtds/decls/xml.dcl \
/path/to/intel.xml > nochunks.html
XML to TXT:
-----------
First create the NOCHUNKS HTML file, then convert by running:
/usr/bin/lynx nochunks.html > output.txt
XML to PDF:
-----------
First create the NOCHUNKS HTML file, then convert by starting
/usr/bin/htmldoc. Personally I use the htmldoc GUI. It's easier to use
than the slew of command line options you can use.
In the GUI, click on the "Add Files..." button on the Input tab and
select the NOCHUNKS HTML file. Then click the "PDF" button on the
Output tab and enter the output file name in the "Output Path" box.
If you don't want to change other options, click on the "Generate"
button and wait a few seconds.
XML to PS:
----------
First create the NOCHUNKS HTML file, then convert by starting
/usr/bin/htmldoc. Personally I use the htmldoc GUI. It's easier to use
than the slew of command line options you can use.
In the GUI, click on the "Add Files..." button on the Input tab and
select the NOCHUNKS HTML file. Then click the "PS" button on the
Output tab and enter the output file name in the "Output Path" box.
If you don't want to change other options, click on the "Generate"
button and wait a few seconds.