[e8a0469] | 1 | LFS Book Conversion Tools Installation Instructions
|
---|
[2fadfb6] | 2 |
|
---|
[e858efa] | 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
|
---|
[ec5839b] | 15 | - http://www.linuxfromscratch.org/blfs/view/svn/general/libxml2.html
|
---|
[2fadfb6] | 16 |
|
---|
[287ea55] | 17 | * libxslt
|
---|
[ec5839b] | 18 | - http://www.linuxfromscratch.org/blfs/view/svn/general/libxslt.html
|
---|
[2fadfb6] | 19 |
|
---|
[e8a0469] | 20 | * DocBook DTD
|
---|
[ec5839b] | 21 | - http://www.linuxfromscratch.org/blfs/view/svn/pst/xml.html
|
---|
[2fadfb6] | 22 |
|
---|
[c3f7012] | 23 | * DocBook XSL Stylesheets
|
---|
| 24 | - http://www.linuxfromscratch.org/blfs/view/svn/pst/docbook-xsl.html
|
---|
[a942c0a] | 25 |
|
---|
[3042296] | 26 | * HTMLTidy
|
---|
[ec5839b] | 27 | - http://www.linuxfromscratch.org/blfs/view/svn/general/tidy.html
|
---|
[e858efa] | 28 | - you'll also need the patch at http://linuxfromscratch.org/~matthew/tidy-041026-prevent_PRE_newlines-1.patch as well.
|
---|
[3042296] | 29 |
|
---|
[e8a0469] | 30 | -------------------------------------------------------------------------------
|
---|
[287ea55] | 31 | If you want to be able to convert the book into PDF as well, then you will need
|
---|
| 32 | the FOP package. This takes an XSL-FO file (created with libxslt which you
|
---|
[e858efa] | 33 | already installed) and converts it to PDF. FOP is dependent on ANT
|
---|
| 34 | (Another Neat Tool) and the Java Advanced Imaging (JAI) API.
|
---|
[2fadfb6] | 35 |
|
---|
[e858efa] | 36 | First we need the Java SDK installed. See
|
---|
| 37 | http://www.linuxfromscratch.org/blfs/view/svn/general/j2sdk.html.
|
---|
[2fadfb6] | 38 |
|
---|
[e858efa] | 39 | Now install JAI:
|
---|
| 40 | - Download jai-1_1_2_01-lib-linux-i586-jdk.bin from
|
---|
| 41 | http://java.sun.com/products/java-media/jai/downloads/download-1_1_2_01.html
|
---|
| 42 | (download the version for the JDK Install).
|
---|
| 43 | - chmod +x jai-1_1_2_01-lib-linux-i586-jdk.bin
|
---|
| 44 | - cd /opt/j2sdk && /path/to/jai-1_1_2_01-lib-linux-i586-jdk.bin
|
---|
[2fadfb6] | 45 |
|
---|
[e858efa] | 46 | Next install ANT:
|
---|
[b1afd29] | 47 | - http://www.linuxfromscratch.org/blfs/view/svn/general/apache-ant.html
|
---|
[2fadfb6] | 48 |
|
---|
[e858efa] | 49 | And finally install FOP:
|
---|
| 50 | - download http://www.apache.org/dist/xml/fop/fop-0.20.5-src.tar.gz
|
---|
| 51 | - tar -xzvf fop-0.20.5-src.tar.gz
|
---|
| 52 | (recent versions of tar will warn about "A lone zero block at 33476" but
|
---|
| 53 | this can be safely ignored)
|
---|
| 54 | - cd fop-0.20.5 &&
|
---|
| 55 | ./build.sh &&
|
---|
| 56 | install -d /opt/fop/{bin,lib} &&
|
---|
| 57 | cp lib/{avalon-framework-cvs-20020806.jar,batik.jar} build/fop.jar \
|
---|
| 58 | /opt/fop/lib &&
|
---|
| 59 | cp fop.sh /opt/fop/bin
|
---|
| 60 | - edit your bash profile to set FOP_HOME=/opt/fop and PATH=$PATH:/opt/fop/bin
|
---|