1 | LFS Book Conversion Tools Installation Instructions
|
---|
2 |
|
---|
3 | After downloading the SVN source, there are some things that need to be set up
|
---|
4 | on your computer if you want to convert the XML source into something easier to
|
---|
5 | read (e.g. HTML, TXT, PS or PDF). If you are interested in this, then keep
|
---|
6 | reading. If you are only interested in editing the XML source for re-
|
---|
7 | submission to the lfs-book or lfs-dev mailing lists, then you do not need this
|
---|
8 | document. Instead, you need to read the LFS Editor's Manual. See the LFS
|
---|
9 | website at http://www.linuxfromscratch.org for more information.
|
---|
10 |
|
---|
11 | -------------------------------------------------------------------------------
|
---|
12 | If all you want to do is convert XML to HTML perform the following:
|
---|
13 |
|
---|
14 | * libxml2
|
---|
15 | - http://www.linuxfromscratch.org/blfs/view/cvs/general/libxml2.html
|
---|
16 |
|
---|
17 | * libxslt
|
---|
18 | - http://www.linuxfromscratch.org/blfs/view/cvs/general/libxslt.html
|
---|
19 |
|
---|
20 | * DocBook DTD
|
---|
21 | - http://www.linuxfromscratch.org/blfs/view/cvs/pst/xml.html
|
---|
22 |
|
---|
23 | * DocBook XSL Stylesheets
|
---|
24 | - http://www.linuxfromscratch.org/blfs/view/cvs/pst/docbook-xsl.html
|
---|
25 | - additionally create a link from
|
---|
26 | /usr/share/xml/docbook/xsl-stylesheets-1.67.0 to
|
---|
27 | /usr/share/xml/docbook/xsl-stylesheets-current
|
---|
28 |
|
---|
29 | ln -s xsl-stylesheets-1.67.0 /usr/share/xml/docbook/xsl-stylesheets-current
|
---|
30 |
|
---|
31 | * HTMLTidy
|
---|
32 | - http://www.linuxfromscratch.org/blfs/view/cvs/general/tidy.html
|
---|
33 | - you'll also need the patch at http://linuxfromscratch.org/~matthew/tidy-041026-prevent_PRE_newlines-1.patch as well.
|
---|
34 |
|
---|
35 | -------------------------------------------------------------------------------
|
---|
36 | If you want to be able to convert the book into PDF as well, then you will need
|
---|
37 | the FOP package. This takes an XSL-FO file (created with libxslt which you
|
---|
38 | already installed) and converts it to PDF. FOP is dependent on ANT
|
---|
39 | (Another Neat Tool) and the Java Advanced Imaging (JAI) API.
|
---|
40 |
|
---|
41 | First we need the Java SDK installed. See
|
---|
42 | http://www.linuxfromscratch.org/blfs/view/cvs/general/j2sdk.html.
|
---|
43 |
|
---|
44 | Now install JAI:
|
---|
45 | - Download jai-1_1_2_01-lib-linux-i586-jdk.bin from
|
---|
46 | http://java.sun.com/products/java-media/jai/downloads/download-1_1_2_01.html
|
---|
47 | (download the version for the JDK Install).
|
---|
48 | - chmod +x jai-1_1_2_01-lib-linux-i586-jdk.bin
|
---|
49 | - cd /opt/j2sdk && /path/to/jai-1_1_2_01-lib-linux-i586-jdk.bin
|
---|
50 |
|
---|
51 | Next install ANT:
|
---|
52 | - download http://www.apache.org/dist/ant/source/apache-ant-1.6.2-src.tar.bz2
|
---|
53 | - tar -xjvf apache-ant-1.6.2-src.tar.bz2
|
---|
54 | (recent versions of tar will warn about "A lone zero block at 33476" but
|
---|
55 | this can be safely ignored)
|
---|
56 | - cd apache-ant-1.6.2 && \
|
---|
57 | ./boostrap.sh && \
|
---|
58 | ./build && \
|
---|
59 | install -d /opt/ant && \
|
---|
60 | cp -r dist/* /opt/ant
|
---|
61 | - edit your bash profile to set ANT_HOME=/opt/ant and PATH=$PATH:/opt/ant/bin
|
---|
62 |
|
---|
63 | And finally install FOP:
|
---|
64 | - download http://www.apache.org/dist/xml/fop/fop-0.20.5-src.tar.gz
|
---|
65 | - tar -xzvf fop-0.20.5-src.tar.gz
|
---|
66 | (recent versions of tar will warn about "A lone zero block at 33476" but
|
---|
67 | this can be safely ignored)
|
---|
68 | - cd fop-0.20.5 &&
|
---|
69 | ./build.sh &&
|
---|
70 | install -d /opt/fop/{bin,lib} &&
|
---|
71 | cp lib/{avalon-framework-cvs-20020806.jar,batik.jar} build/fop.jar \
|
---|
72 | /opt/fop/lib &&
|
---|
73 | cp fop.sh /opt/fop/bin
|
---|
74 | - edit your bash profile to set FOP_HOME=/opt/fop and PATH=$PATH:/opt/fop/bin
|
---|