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