doc: Improve setup for documentation building with FOP
authorPeter Eisentraut
Wed, 11 Sep 2013 14:20:27 +0000 (10:20 -0400)
committerPeter Eisentraut
Mon, 21 Oct 2013 10:43:08 +0000 (06:43 -0400)
Add a makefile rule for building PDFs with FOP.  Two new build targets
in doc/src/sgml are postgres-A4-fop.pdf and postgres-US-fop.pdf.

Run .fo output through xmllint for reformatting, so that errors are
easier to find.  (The default output has hardly any line breaks, so you
might be looking for an error in column 20000.)

Set some XSLT parameters to optimize for building with FOP.

Remove some redundant or somewhat useless chapterinfo/author
information, because it renders strangely with the FO stylesheet.

Reviewed-by: Álvaro Herrera
doc/src/sgml/Makefile
doc/src/sgml/geqo.sgml
doc/src/sgml/nls.sgml
doc/src/sgml/stylesheet-fo.xsl

index 23c226a4b4a60e1f277d6e9500b35ff33b3a52be..5a9e90a2856b071012747617be4ebe12d2e0b536 100644 (file)
@@ -268,12 +268,24 @@ xslthtml-stamp: stylesheet.xsl postgres.xml
 htmlhelp: stylesheet-hh.xsl postgres.xml
    $(XSLTPROC) $(XSLTPROCFLAGS) $^
 
-%-A4.fo: stylesheet-fo.xsl %.xml
+%-A4.fo.tmp: stylesheet-fo.xsl %.xml
    $(XSLTPROC) $(XSLTPROCFLAGS) --stringparam paper.type A4 -o $@ $^
 
-%-US.fo: stylesheet-fo.xsl %.xml
+%-US.fo.tmp: stylesheet-fo.xsl %.xml
    $(XSLTPROC) $(XSLTPROCFLAGS) --stringparam paper.type USletter -o $@ $^
 
+FOP = fop
+XMLLINT = xmllint
+
+# reformat FO output so that locations of errors are easier to find
+%.fo: %.fo.tmp
+   $(XMLLINT) --format --output $@ $^
+
+.SECONDARY: postgres-A4.fo postgres-US.fo
+
+%-fop.pdf: %.fo
+   $(FOP) -fo $< -pdf $@
+
 epub: postgres.epub
 postgres.epub: postgres.xml
    $(DBTOEPUB) $<
@@ -391,7 +403,7 @@ clean:
 # index
    rm -f HTML.index $(GENERATED_SGML)
 # XSLT
-   rm -f postgres.xml postgres.xmltmp htmlhelp.hhp toc.hhc index.hhk *.fo
+   rm -f postgres.xml postgres.xmltmp htmlhelp.hhp toc.hhc index.hhk *.fo *.fo.tmp
 # EPUB
    rm -f postgres.epub
 # Texinfo
index 92276fcd766c571c40137ac65e8d166cd1b6501d..e0f8adcd6ed6901653f9fb01196b221af92ee05d 100644 (file)
@@ -1,30 +1,6 @@
 
 
  
-  
-   
-    Martin
-    Utesch
-    
-     
-      University of Mining and Technology
-     
-     
-      Institute of Automatic Control
-     
-     
-      
-       Freiberg
-      
-      
-       Germany
-      
-     
-    
-   
-   1997-10-02
-  
-
   Genetic Query Optimizer
 
   
index 5bac66e9d2d53754344537d842e775af12b7a07d..5f52fd45ef81b49e5336be57d844ab6fdf6ecae8 100644 (file)
@@ -1,13 +1,6 @@
 
 
 
-  
-   Peter
-   Eisentraut
-  
-
  Native Language Support
 
  
index aafc946d1b500e83958a2e29f581d684d3b82fcd..ad26a5abbe8d82fb6159daf913a0c10fadfec79c 100644 (file)
@@ -6,6 +6,18 @@
 
 
 
+
+
+3
+
+
+
+
+
+                   use-attribute-sets="verbatim.properties monospace.properties">
+  wrap
+
+