From 314c7b642b14e8a60a411ecce2435edf0072f78a Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 10 Dec 2006 20:46:03 +0000 Subject: [PATCH] Make separate targets for building printable documentation in A4 and US letter paper formats. --- doc/src/sgml/Makefile | 29 +++++++++++++++++++++-------- doc/src/sgml/docguide.sgml | 21 ++++++++++----------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index c60dcf272a..b8f4d67b05 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -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 -%.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-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 $@ $< + +%-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 $@ $^ ## diff --git a/doc/src/sgml/docguide.sgml b/doc/src/sgml/docguide.sgml index 68359fdd30..027de156b3 100644 --- a/doc/src/sgml/docguide.sgml +++ b/doc/src/sgml/docguide.sgml @@ -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