# HG changeset patch # User Matti Hamalainen # Date 1366255532 -10800 # Node ID cfcbe5e0c12e43f624baa2700826f520c9e4afeb # Parent fe83084ff7e1fbb3a47250c21b3f7627e8983b2c Try to use FOP for converting to PDF. diff -r fe83084ff7e1 -r cfcbe5e0c12e docs/build-docs.sh --- a/docs/build-docs.sh Thu Apr 18 06:13:29 2013 +0300 +++ b/docs/build-docs.sh Thu Apr 18 06:25:32 2013 +0300 @@ -9,7 +9,6 @@ HTMLPATH="html" HTMLFILE="$HTMLPATH/manual.html" PDFFILE="manual.pdf" -PSFILE="manual.ps" XSLTPARAMS="--stringparam html.stylesheet manual.css" ### Get paths, if available @@ -20,12 +19,23 @@ GIFTOPNM=`which giftopnm` TIDY=`which tidy` XSLTPROC=`which xsltproc` -XMLROFF=`which xmlroff` +FOP=`which fop` CATALOGS1="$DOCBOOKBASE/xhtml/chunk.xsl" CATALOGS2="$DOCBOOKBASE/xhtml/docbook.xsl" CATALOGS3="$DOCBOOKBASE/fo/docbook.xsl" +### Check for locally installed FOP +echo -n "* Checking for FOP .. " +if test -n "$FOP" -a -x "$FOP"; then + echo "$FOP" +elif test -x "$HOME/tf/docs/fop/fop"; then + FOP="$HOME/tf/docs/fop/fop" + echo "$FOP" +else + echo "no" +fi + ### Convert images echo "* Checking for image to EPS converting utilities ..." if test -n "$CONVERT" && test -x "$CONVERT"; then @@ -113,13 +123,11 @@ fi -### Generate PostScript file -rm -f "$PSFILE" -if test -n "$XMLROFF" && test -x "$XMLROFF" && test -e "$SRCXML"; then - echo "* PostScript" - $XSLTPROC "$CATALOGS3" "$SRCXML" > "$SRCFO" - $XMLROFF -# rm -f "$SRCFO" +### Generate PDF +rm -f "$PDFFILE" +if test -n "$FOP" && test -x "$FOP" && test -e "$SRCXML"; then + echo "* PDF .." + $FOP -xml "$SRCXML" -xsl "$CATALOGS3" -pdf "$PDFFILE" fi