aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2013-09-11 10:20:27 -0400
committerPeter Eisentraut <peter_e@gmx.net>2013-10-21 06:43:08 -0400
commita5963efa8f2b46700c0591281c57aeea3d429c34 (patch)
tree7e0aef261534a214da7668d23be57009385043dd /doc/src
parent709170b790c11b4012004a6baf11a0fc6ec950de (diff)
downloadpostgresql-a5963efa8f2b46700c0591281c57aeea3d429c34.tar.gz
postgresql-a5963efa8f2b46700c0591281c57aeea3d429c34.zip
doc: Improve setup for documentation building with FOP
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 <alvherre@2ndquadrant.com>
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/Makefile18
-rw-r--r--doc/src/sgml/geqo.sgml24
-rw-r--r--doc/src/sgml/nls.sgml7
-rw-r--r--doc/src/sgml/stylesheet-fo.xsl12
4 files changed, 27 insertions, 34 deletions
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index 23c226a4b4a..5a9e90a2856 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -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
diff --git a/doc/src/sgml/geqo.sgml b/doc/src/sgml/geqo.sgml
index 92276fcd766..e0f8adcd6ed 100644
--- a/doc/src/sgml/geqo.sgml
+++ b/doc/src/sgml/geqo.sgml
@@ -1,30 +1,6 @@
<!-- doc/src/sgml/geqo.sgml -->
<chapter id="geqo">
- <chapterinfo>
- <author>
- <firstname>Martin</firstname>
- <surname>Utesch</surname>
- <affiliation>
- <orgname>
- University of Mining and Technology
- </orgname>
- <orgdiv>
- Institute of Automatic Control
- </orgdiv>
- <address>
- <city>
- Freiberg
- </city>
- <country>
- Germany
- </country>
- </address>
- </affiliation>
- </author>
- <date>1997-10-02</date>
- </chapterinfo>
-
<title>Genetic Query Optimizer</title>
<para>
diff --git a/doc/src/sgml/nls.sgml b/doc/src/sgml/nls.sgml
index 5bac66e9d2d..5f52fd45ef8 100644
--- a/doc/src/sgml/nls.sgml
+++ b/doc/src/sgml/nls.sgml
@@ -1,13 +1,6 @@
<!-- doc/src/sgml/nls.sgml -->
<chapter id="nls">
- <chapterinfo>
- <author>
- <firstname>Peter</firstname>
- <surname>Eisentraut</surname>
- </author>
- </chapterinfo>
-
<title>Native Language Support</title>
<sect1 id="nls-translator">
diff --git a/doc/src/sgml/stylesheet-fo.xsl b/doc/src/sgml/stylesheet-fo.xsl
index aafc946d1b5..ad26a5abbe8 100644
--- a/doc/src/sgml/stylesheet-fo.xsl
+++ b/doc/src/sgml/stylesheet-fo.xsl
@@ -6,6 +6,18 @@
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
<xsl:include href="stylesheet-common.xsl" />
+<xsl:param name="fop1.extensions" select="1"></xsl:param>
+<xsl:param name="tablecolumns.extension" select="0"></xsl:param>
+<xsl:param name="toc.max.depth">3</xsl:param>
+<xsl:param name="ulink.footnotes" select="1"></xsl:param>
+<xsl:param name="use.extensions" select="1"></xsl:param>
+<xsl:param name="variablelist.as.blocks" select="1"></xsl:param>
+
+<xsl:attribute-set name="monospace.verbatim.properties"
+ use-attribute-sets="verbatim.properties monospace.properties">
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
+</xsl:attribute-set>
+
<!-- Change display of some elements -->
<xsl:template match="command">