r17619 - gnucash-docs/trunk - Tom Browder's patch for PDF creation.

Christian Stimming cstim at cvs.gnucash.org
Sun Oct 5 16:24:14 EDT 2008


Author: cstim
Date: 2008-10-05 16:24:14 -0400 (Sun, 05 Oct 2008)
New Revision: 17619
Trac: http://svn.gnucash.org/trac/changeset/17619

Modified:
   gnucash-docs/trunk/HACKING
   gnucash-docs/trunk/README
   gnucash-docs/trunk/guide/C/Makefile.am
Log:
Tom Browder's patch for PDF creation.

Explanation added to HACKING. Requirements added to README.
A pdf rule added to guide/C/Makefile.am.

Patches by Tom Browder.

Modified: gnucash-docs/trunk/HACKING
===================================================================
--- gnucash-docs/trunk/HACKING	2008-10-05 17:15:49 UTC (rev 17618)
+++ gnucash-docs/trunk/HACKING	2008-10-05 20:24:14 UTC (rev 17619)
@@ -92,3 +92,55 @@
 <linux at codehelp.co.uk>
 9th March 2005.
 
+--------------------
+
+Generating PDF
+
+Currently the Guide docbook source is capable of supporting the generation of
+pdf output, but it may take a little work to assemble the tools if you don't
+have them.  The following is based on a Linux Fedora Core 7 installation.
+
+Required:
+
+  1. docbook-xsl >= 1.74.0
+
+     available at: http://docbook.sourceforge.net
+
+     Follow the first link to the download site, then choose the "docbook-xsl"
+     package.  I can find nothing specific about installation, but I think the
+     preferred place to unpack the package is in /usr/local/share.
+
+     Note the location of the file 'docbook.xsl'.  Point to it by assigning it
+     to an environment variable DOCBOOK_XSL.  In this case, for csh or tcsh users:
+
+        setenv DOCBOOK_XSL /usr/local/share/docbook-xsl-1.74.0/fo/docbook.xsl
+
+     or for sh or bash users:
+
+        export DOCBOOK_XSL=/usr/local/share/docbook-xsl-1.74.0/fo/docbook.xsl
+
+     (Note: I find the www.docbook.org site very confusing--full of circular
+     references to the source of the docbook xml style sheets, but no specific
+     link that is easily found.)
+
+  2. Apache Fop >= 0.95
+
+     available at: http://xmlgraphics.apache.org/fop
+
+     requires:
+
+     a.  Sun Java JDK >= 1.4
+         available at: http://java.sun.com/javase/downloads/index.jsp
+
+         (I chose the "JDK 6 Update 7" download.)
+
+     b.  ant >= 1.7
+         available at: http://ant.apache.org
+
+You may need additional xml tools, but they should be available through the yum
+update if they are not already installed.
+
+Tom Browder
+<tom.browder at gmail.com>
+Niceville, Florida
+2008-10-02

Modified: gnucash-docs/trunk/README
===================================================================
--- gnucash-docs/trunk/README	2008-10-05 17:15:49 UTC (rev 17618)
+++ gnucash-docs/trunk/README	2008-10-05 20:24:14 UTC (rev 17619)
@@ -16,6 +16,12 @@
 scrollkeeper >=0.3.4
 yelp (for viewing)
 
+Additonal Requirements for Generating PDF
+=========================================
+
+docbook-xsl >= 1.74.0
+Apache fop  >= 0.95
+
 Notes
 #####
 

Modified: gnucash-docs/trunk/guide/C/Makefile.am
===================================================================
--- gnucash-docs/trunk/guide/C/Makefile.am	2008-10-05 17:15:49 UTC (rev 17618)
+++ gnucash-docs/trunk/guide/C/Makefile.am	2008-10-05 20:24:14 UTC (rev 17619)
@@ -28,17 +28,19 @@
 dist-hook: app-dist-hook
 DISTCLEANFILES =  gnucash-guide-C.omf.out
 
-# 2007-06-30, jsled: PDF creation "support".  This sucks.
+# 2008-10-02, Tom Browder: PDF creation.
 #
-# http://www.linuxfocus.org/English/May2000/article152.shtml
-# http://www.ecos.sourceware.org/ml/docbook-apps/2001-q4/msg00168.html
+# See README and HACKING.
 #
-# "|| true" because both commands "fail" for me. :p
+# For now, the environment variable, 'DOCBOOK_XSL', must be set manually.
 #
-# Note the stderr and stdout redirections. :/
-#
-# It seems it might be wiser to use XSL-FO instead, c.f.
-# <http://sagehill.net/docbookxsl/PrintOutput.html>
+# To do: Fix configure to find the right tools and pieces and make the target
+# if all parts are found.
+
+CLEANFILES = gnucash-guide.pdf gnucash-guide.fo
 pdf:
-	docbook2tex -d /usr/share/sgml/docbook/dsssl-stylesheets-1.79/print/docbook.dsl gnucash-guide.xml 2> /dev/null || true 
-	pdfjadetex gnucash-guide.tex > /dev/null || true
+	fop -xml gnucash-guide.xml -xsl $(DOCBOOK_XSL) -pdf gnucash-guide.pdf
+
+# for debugging intermediate output
+pdf-debug:
+	fop -d -xml gnucash-guide.xml -xsl $(DOCBOOK_XSL) -foout gnucash-guide.fo



More information about the gnucash-changes mailing list