Make separate targets for building printable documentation in A4 and
authorPeter Eisentraut
Sun, 10 Dec 2006 20:46:03 +0000 (20:46 +0000)
committerPeter Eisentraut
Sun, 10 Dec 2006 20:46:03 +0000 (20:46 +0000)
US letter paper formats.

doc/src/sgml/Makefile
doc/src/sgml/docguide.sgml

index c60dcf272abc39fff0e770c0d920eba3028f29a2..b8f4d67b05b4587e47c27e9a7db78bbb2f7e0f6e 100644 (file)
@@ -2,7 +2,7 @@
 #
 # PostgreSQL documentation makefile
 #
-# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.83 2006/12/10 16:01:06 petere Exp $
+# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.84 2006/12/10 20:46:03 petere Exp $
 #
 #----------------------------------------------------------------------------
 
@@ -124,6 +124,7 @@ features-unsupported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_package
 ## Print
 ##
 
+
 # RTF to allow minor editing for hardcopy
 
 %.rtf: %.sgml $(ALLSGML) stylesheet.dsl
@@ -133,11 +134,19 @@ features-unsupported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_package
 # Regular TeX and pdfTeX have slightly differing requirements, so we
 # need to distinguish the path we're taking.
 
-%.tex-ps: %.sgml $(ALLSGML) stylesheet.dsl
-   $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print -V texdvi-output -o $@ $<
+JADE.tex.call = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d $(srcdir)/stylesheet.dsl -t tex -V tex-backend -i output-print
+
+%-A4.tex-ps: %.sgml $(ALLSGML) stylesheet.dsl
+   $(JADE.tex.call) -V texdvi-output -V '%paper-type%'=A4 -o $@ $<
+
+%-US.tex-ps: %.sgml $(ALLSGML) stylesheet.dsl
+   $(JADE.tex.call) -V texdvi-output -V '%paper-type%'=USletter -o $@ $<
 
-%.tex-pdf: %.sgml $(ALLSGML) stylesheet.dsl
-   $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print -V texpdf-output -o $@ $<
+%-A4.tex-pdf: %.sgml $(ALLSGML) stylesheet.dsl
+   $(JADE.tex.call) -V texpdf-output -V '%paper-type%'=A4 -o $@ $<
+
+%-US.tex-pdf: %.sgml $(ALLSGML) stylesheet.dsl
+   $(JADE.tex.call) -V texpdf-output -V '%paper-type%'=USletter -o $@ $<
 
 %.dvi: %.tex-ps
    @rm -f $*.aux $*.log
@@ -145,7 +154,7 @@ features-unsupported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_package
    jadetex $<
    jadetex $<
 
-# Postscript from TeX
+# PostScript from TeX
 %.ps: %.dvi
    dvips -o $@ $<
 
@@ -218,6 +227,7 @@ postgres.xml: postgres.sgml $(GENERATED_SGML)
      sed -e 's/\[\(amp\|copy\|egrave\|gt\|lt\|mdash\|nbsp\|ouml\|pi\|quot\|uuml\) *\]/\&\1;/g' \
          -e '1a\' -e '' \
      >$@
+# ' hello Emacs
 
 override XSLTPROCFLAGS += --stringparam pg.version '$(VERSION)'
 
@@ -227,8 +237,11 @@ xslthtml: stylesheet.xsl postgres.xml
 htmlhelp: stylesheet-hh.xsl postgres.xml
    $(XSLTPROC) $(XSLTPROCFLAGS) $^
 
-%.fo: stylesheet-fo.xsl %.xml
-   $(XSLTPROC) $(XSLTPROCFLAGS) -o $@ $^
+%-A4.fo: stylesheet-fo.xsl %.xml
+   $(XSLTPROC) $(XSLTPROCFLAGS) --stringparam paper.type A4 -o $@ $^
+
+%-US.fo: stylesheet-fo.xsl %.xml
+   $(XSLTPROC) $(XSLTPROCFLAGS) --stringparam paper.type USletter -o $@ $^
 
 
 ##
index 68359fdd307b88918ecd2d5482709ed7e52628a0..027de156b34ea35dda3735086efd0a7bac9568d0 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Documentation
@@ -601,18 +601,13 @@ gmake man.tar.gz
     
      
       
-       To make a DVI version:
+       To generate PostScript via DVI in A4 format:
 
-doc/src/sgml$ gmake postgres.dvi
+doc/src/sgml$ gmake postgres-A4.ps
 
-      
-     
-
-     
-      
-       To generate PostScript from the DVI:
+       In U.S. letter format:
 
-doc/src/sgml$ gmake postgres.ps
+doc/src/sgml$ gmake postgres-US.ps
 
       
      
@@ -621,7 +616,11 @@ gmake man.tar.gz
       
        To make a PDF:
 
-doc/src/sgml$ gmake postgres.pdf
+doc/src/sgml$ gmake postgres-A4.pdf
+
+       or
+
+doc/src/sgml$ gmake postgres-US.pdf
 
        (Of course you can also make a PDF version
        from the PostScript, but if you generate PDF