1 | LFS Book Readme
|
---|
2 |
|
---|
3 | This document is meant to instruct the user on how to convert the book's XML
|
---|
4 | source to other formats (e.g. HTML, PDF, PS and TXT). First, if you have not
|
---|
5 | already done so, please read the INSTALL file how to install the required
|
---|
6 | software. If you have already completed the steps outlined in the INSTALL
|
---|
7 | file, then continue reading for examples how to convert these files into
|
---|
8 | various other formats.
|
---|
9 |
|
---|
10 | XML to HTML:
|
---|
11 | ------------
|
---|
12 | Create a directory in which you want to store the HTML files and cd into
|
---|
13 | that directory. Now run:
|
---|
14 |
|
---|
15 | mkdir -p chapter0{1,2,3,4,5,6,7,8,9} preface appendixa &&
|
---|
16 | /usr/bin/openjade -t xml \
|
---|
17 | -d /usr/share/dsssl/docbook/html/lfs.dsl \
|
---|
18 | /usr/share/dsssl/docbook/dtds/decls/xml.dcl \
|
---|
19 | /path/to/index.xml
|
---|
20 |
|
---|
21 |
|
---|
22 |
|
---|
23 | XML to NOCHUNKS-HTML:
|
---|
24 | --------------------
|
---|
25 | The NOCHUNKS HTML version is one big HTML file:
|
---|
26 | /usr/bin/openjade -t sgml \
|
---|
27 | -V nochunks \
|
---|
28 | -d /usr/share/dsssl/docbook/html/lfs.dsl \
|
---|
29 | /usr/share/dsssl/docbook/dtds/decls/xml.dcl \
|
---|
30 | /path/to/index.xml > nochunks.html
|
---|
31 |
|
---|
32 | XML to TXT:
|
---|
33 | -----------
|
---|
34 | First create the NOCHUNKS HTML file, then convert by running:
|
---|
35 | /usr/bin/lynx -dump nochunks.html > output.txt
|
---|
36 |
|
---|
37 | XML to PS and PDF:
|
---|
38 | ------------------
|
---|
39 | First create the NOCHUNKS HTML file, then convert by starting
|
---|
40 | htmldoc. You can use the GUI and select the options. If you're
|
---|
41 | satisfied with the default options you can run this command:
|
---|
42 |
|
---|
43 | /usr/bin/htmldoc --book --firstpage p1 -v -t <type> \
|
---|
44 | -f <output> nochunks.html
|
---|
45 |
|
---|
46 | replace <type> by pdf13 to create a pdf file or replace <type> by ps3 to
|
---|
47 | create a ps file. There are other pdf and ps levels, see the man page for
|
---|
48 | possible other options. Replace <output> with the filename of the ps or
|
---|
49 | pdf file that is to be generated.
|
---|
50 |
|
---|