mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
* Provide better instructions for installing the tools necessary for generating
PDF output * Upgrade the PDF stylesheet to play nicely with the latest docbook-xsl release git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4307 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
a66ea2b59b
commit
5507127b16
53
INSTALL
53
INSTALL
@ -1,6 +1,6 @@
|
||||
LFS Book Conversion Tools Installation Instructions
|
||||
|
||||
After downloading the CVS source, there are some things that need to be set up
|
||||
After downloading the SVN source, there are some things that need to be set up
|
||||
on your computer if you want to convert the XML source into something easier to
|
||||
read (e.g. HTML, TXT, PS or PDF). If you are interested in this, then keep
|
||||
reading. If you are only interested in editing the XML source for re-
|
||||
@ -23,29 +23,52 @@ If all you want to do is convert XML to HTML perform the following:
|
||||
* DocBook XSL Stylesheets
|
||||
- http://www.linuxfromscratch.org/blfs/view/cvs/pst/docbook-xsl.html
|
||||
- additionally create a link from
|
||||
/usr/share/xml/docbook/xsl-stylesheets-1.65.1 to
|
||||
/usr/share/xml/docbook/xsl-stylesheets-1.67.0 to
|
||||
/usr/share/xml/docbook/xsl-stylesheets-current
|
||||
|
||||
cd /usr/share/xml/docbook/ &&
|
||||
ln -s xsl-stylesheets-1.65.1 xsl-stylesheets-current
|
||||
ln -s xsl-stylesheets-1.67.0 /usr/share/xml/docbook/xsl-stylesheets-current
|
||||
|
||||
* HTMLTidy
|
||||
- http://tidy.sourceforge.net/
|
||||
|
||||
Installation of HTMLTidy is a simple `./configure --prefix=/usr && \
|
||||
make && make install`
|
||||
- http://www.linuxfromscratch.org/blfs/view/cvs/general/tidy.html
|
||||
- you'll also need the patch at http://linuxfromscratch.org/~matthew/tidy-041026-prevent_PRE_newlines-1.patch as well.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
If you want to be able to convert the book into PDF as well, then you will need
|
||||
the FOP package. This takes an XSL-FO file (created with libxslt which you
|
||||
already installed) and converts it to PDF:
|
||||
already installed) and converts it to PDF. FOP is dependent on ANT
|
||||
(Another Neat Tool) and the Java Advanced Imaging (JAI) API.
|
||||
|
||||
- http://www.apache.org/dist/xml/fop/fop-0.20.5-bin.tar.gz
|
||||
First we need the Java SDK installed. See
|
||||
http://www.linuxfromscratch.org/blfs/view/cvs/general/j2sdk.html.
|
||||
|
||||
Install FOP by running:
|
||||
Now install JAI:
|
||||
- Download jai-1_1_2_01-lib-linux-i586-jdk.bin from
|
||||
http://java.sun.com/products/java-media/jai/downloads/download-1_1_2_01.html
|
||||
(download the version for the JDK Install).
|
||||
- chmod +x jai-1_1_2_01-lib-linux-i586-jdk.bin
|
||||
- cd /opt/j2sdk && /path/to/jai-1_1_2_01-lib-linux-i586-jdk.bin
|
||||
|
||||
cd /opt &&
|
||||
tar -xzvf /usr/src/fop-0.20.5-bin.tar.gz &&
|
||||
mv fop-0.20.5 fop
|
||||
Next install ANT:
|
||||
- download http://www.apache.org/dist/ant/source/apache-ant-1.6.2-src.tar.bz2
|
||||
- tar -xjvf apache-ant-1.6.2-src.tar.bz2
|
||||
(recent versions of tar will warn about "A lone zero block at 33476" but
|
||||
this can be safely ignored)
|
||||
- cd apache-ant-1.6.2 && \
|
||||
./boostrap.sh && \
|
||||
./build && \
|
||||
install -d /opt/ant && \
|
||||
cp -r dist/* /opt/ant
|
||||
- edit your bash profile to set ANT_HOME=/opt/ant and PATH=$PATH:/opt/ant/bin
|
||||
|
||||
Now set JAVA_HOME, FOP_HOME and PATH to values appropriate to your system.
|
||||
And finally install FOP:
|
||||
- download http://www.apache.org/dist/xml/fop/fop-0.20.5-src.tar.gz
|
||||
- tar -xzvf fop-0.20.5-src.tar.gz
|
||||
(recent versions of tar will warn about "A lone zero block at 33476" but
|
||||
this can be safely ignored)
|
||||
- cd fop-0.20.5 &&
|
||||
./build.sh &&
|
||||
install -d /opt/fop/{bin,lib} &&
|
||||
cp lib/{avalon-framework-cvs-20020806.jar,batik.jar} build/fop.jar \
|
||||
/opt/fop/lib &&
|
||||
cp fop.sh /opt/fop/bin
|
||||
- edit your bash profile to set FOP_HOME=/opt/fop and PATH=$PATH:/opt/fop/bin
|
||||
|
@ -106,17 +106,12 @@
|
||||
<xsl:variable name="id">
|
||||
<xsl:call-template name="object.id"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="graphic.width">
|
||||
<xsl:call-template name="admon.graphic.width"/>
|
||||
</xsl:variable>
|
||||
<fo:block id="{$id}">
|
||||
<fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt"
|
||||
provisional-label-separation="18pt" xsl:use-attribute-sets="list.block.spacing">
|
||||
<fo:list-block xsl:use-attribute-sets="list.block.spacing">
|
||||
<fo:list-item>
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block margin-left="4pt">
|
||||
<fo:external-graphic width="auto" height="auto"
|
||||
content-width="{$graphic.width}" >
|
||||
<fo:external-graphic width="auto" height="auto">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:call-template name="admon.graphic"/>
|
||||
</xsl:attribute>
|
||||
|
Loading…
Reference in New Issue
Block a user