Custom DSSSL stylesheet. Style changes included here:
authorPeter Eisentraut
Tue, 13 Feb 2001 21:27:05 +0000 (21:27 +0000)
committerPeter Eisentraut
Tue, 13 Feb 2001 21:27:05 +0000 (21:27 +0000)
HTML:
* make .html the default extension
* allow use of CSS stylesheet ("stylesheet.css", not included)
* make  TOC two levels deep
* put time of creation into meta header
Print:
* make print output justified by default
* footnotes at bottom of each page
* allow TeX to hyphenate

doc/src/sgml/Makefile
doc/src/sgml/stylesheet.dsl [new file with mode: 0644]

index c3713f887f5b2dec06981cc013b03474204f8f5b..49146b7885c2eb1fcef84e11b4b56805ef78e4e1 100644 (file)
@@ -8,7 +8,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.30 2001/02/04 12:23:11 petere Exp $
+#    $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.31 2001/02/13 21:27:05 petere Exp $
 #
 #----------------------------------------------------------------------------
 
@@ -23,16 +23,6 @@ ifndef DOCBOOKSTYLE
 DOCBOOKSTYLE = /home/projects/pgsql/developers/thomas/db143.d/docbook
 endif
 
-ifndef HSTYLE
-HSTYLE = $(DOCBOOKSTYLE)/html
-endif
-ifndef PSTYLE
-PSTYLE = $(DOCBOOKSTYLE)/print
-endif
-
-HDSL=$(HSTYLE)/docbook.dsl
-PDSL=$(PSTYLE)/docbook.dsl
-
 ifndef JADE
 JADE = jade
 endif
@@ -62,6 +52,15 @@ ALLBOOKS = admin developer programmer reference tutorial user
 ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml)
 
 
+catalog: Makefile $(top_builddir)/src/Makefile.global $(top_builddir)/src/Makefile.custom
+   (echo "PUBLIC \"-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN\" \"$(DOCBOOKSTYLE)/html/docbook.dsl\""; \
+   echo "PUBLIC \"-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN\" \"$(DOCBOOKSTYLE)/print/docbook.dsl\"") > $@
+
+ifeq "$(origin DOCBOOKSTYLE)" "command line"
+.PHONY: catalog
+endif
+
+
 ##
 ## Man pages
 ##
@@ -85,20 +84,17 @@ man: $(ALLSGML)
 ## HTML
 ##
 
-JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d $(HDSL) -V %use-id-as-filename% -V %generate-legalnotice-link% -t sgml
+JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -i output-html -t sgml
 
-postgres.html: postgres.sgml $(ALLSGML)
-   @rm -f *.htm
+postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl catalog
+   @rm -f *.html
    $(JADE.html) $<
-# Include some softlinks to the generic default file names
-   ln -sf postgres.htm index.html
-   ln -sf postgres.htm postgres.html
+   ln -sf $@ index.html
 
-$(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML)
-   @rm -f *.htm
+$(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML) stylesheet.dsl catalog
+   @rm -f *.html
    $(JADE.html) book-decl.sgml $<
-   ln -sf $*.htm index.html
-   ln -sf $*.htm $*.html
+   ln -sf $@ index.html
 
 
 ##
@@ -106,12 +102,12 @@ $(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML)
 ##
 
 # RTF to allow minor editing for hardcopy
-$(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML)
-   $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d $(PDSL) -t rtf -V rtf-backend book-decl.sgml $<
+$(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) stylesheet.dsl catalog
+   $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml $<
 
 # TeX and DVI
-$(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML)
-   $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d $(PDSL) -t tex -V tex-backend book-decl.sgml $<
+$(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) stylesheet.dsl catalog
+   $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -t tex -V tex-backend -i output-print book-decl.sgml $<
 
 %.dvi: %.tex
    jadetex $<
@@ -182,9 +178,10 @@ check-postgres: postgres.sgml
 ##
 
 clean distclean maintainer-clean:
+   rm -f catalog
 # HTML
-   rm -f HTML.manifest *.html *.htm
+   rm -f HTML.manifest *.html
 # man
-   rm -rf *.1 *.l man1 manl manpage.refs manpage.links manpage.log
+   rm -rf *.1 *.$(DEFAULTSECTION) man1 man$(DEFAULTSECTION) manpage.refs manpage.links manpage.log
 # print
    rm -f *.rtf *.tex *.dvi *.aux *.log *.ps *.pdf
diff --git a/doc/src/sgml/stylesheet.dsl b/doc/src/sgml/stylesheet.dsl
new file mode 100644 (file)
index 0000000..9ab062d
--- /dev/null
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+]]>
+
+
+
+]]>
+
+]>
+
+
+   
+
+(define pgsql-docs-list "[email protected]")
+
+(define %refentry-xref-manvolnum% #f)
+
+
+;; customize the html stylesheet
+
+(define %generate-legalnotice-link% #t)
+(define %html-ext%              ".html")
+(define %link-mailto-url%       (string-append "mailto:" pgsql-docs-list))
+(define %use-id-as-filename%    #t)
+(define %stylesheet%            "stylesheet.css")
+
+;; Returns the depth of auto TOC that should be made at the nd-level
+(define (toc-depth nd)
+  (cond ((string=? (gi nd) (normalize "book")) 3)
+   ((string=? (gi nd) (normalize "set")) 2)
+   (else 1)))
+
+;; Put date of creation into header
+(define %html-header-tags% 
+  (list (list "META" '("NAME" "creation") (list "CONTENT" (time->string (time) #t)))))
+
+]]> 
+
+
+;; customize the print stylesheet
+
+(define %default-quadding%      'justify)
+(define bop-footnotes           #t)
+(if tex-backend
+    (define %hyphenation%       #t))
+
+]]> 
+
+  
+
+