Custom DSSSL stylesheet. Style changes included here:

HTML:
* make .html the default extension
* allow use of CSS stylesheet ("stylesheet.css", not included)
* make <set> 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
This commit is contained in:
Peter Eisentraut 2001-02-13 21:27:05 +00:00
parent b08e00b2ae
commit 702f1235b9
2 changed files with 85 additions and 27 deletions

View File

@ -8,7 +8,7 @@
# #
# #
# IDENTIFICATION # 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 DOCBOOKSTYLE = /home/projects/pgsql/developers/thomas/db143.d/docbook
endif endif
ifndef HSTYLE
HSTYLE = $(DOCBOOKSTYLE)/html
endif
ifndef PSTYLE
PSTYLE = $(DOCBOOKSTYLE)/print
endif
HDSL=$(HSTYLE)/docbook.dsl
PDSL=$(PSTYLE)/docbook.dsl
ifndef JADE ifndef JADE
JADE = jade JADE = jade
endif endif
@ -62,6 +52,15 @@ ALLBOOKS = admin developer programmer reference tutorial user
ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) 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 ## Man pages
## ##
@ -85,20 +84,17 @@ man: $(ALLSGML)
## HTML ## 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) postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl catalog
@rm -f *.htm @rm -f *.html
$(JADE.html) $< $(JADE.html) $<
# Include some softlinks to the generic default file names ln -sf $@ index.html
ln -sf postgres.htm index.html
ln -sf postgres.htm postgres.html
$(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML) $(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML) stylesheet.dsl catalog
@rm -f *.htm @rm -f *.html
$(JADE.html) book-decl.sgml $< $(JADE.html) book-decl.sgml $<
ln -sf $*.htm index.html ln -sf $@ index.html
ln -sf $*.htm $*.html
## ##
@ -106,12 +102,12 @@ $(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML)
## ##
# RTF to allow minor editing for hardcopy # RTF to allow minor editing for hardcopy
$(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) $(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) stylesheet.dsl catalog
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d $(PDSL) -t rtf -V rtf-backend book-decl.sgml $< $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml $<
# TeX and DVI # TeX and DVI
$(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) $(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) stylesheet.dsl catalog
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d $(PDSL) -t tex -V tex-backend book-decl.sgml $< $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -t tex -V tex-backend -i output-print book-decl.sgml $<
%.dvi: %.tex %.dvi: %.tex
jadetex $< jadetex $<
@ -182,9 +178,10 @@ check-postgres: postgres.sgml
## ##
clean distclean maintainer-clean: clean distclean maintainer-clean:
rm -f catalog
# HTML # HTML
rm -f HTML.manifest *.html *.htm rm -f HTML.manifest *.html
# man # 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 # print
rm -f *.rtf *.tex *.dvi *.aux *.log *.ps *.pdf rm -f *.rtf *.tex *.dvi *.aux *.log *.ps *.pdf

View File

@ -0,0 +1,61 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/stylesheet.dsl,v 1.1 2001/02/13 21:27:05 petere Exp $ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!-- must turn on one of these with -i on the jade command line -->
<!ENTITY % output-html "IGNORE">
<!ENTITY % output-print "IGNORE">
<![ %output-html; [
<!ENTITY dbstyle PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
]]>
<![ %output-print; [
<!ENTITY dbstyle PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
]]>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
(define pgsql-docs-list "pgsql-docs@postgresql.org")
(define %refentry-xref-manvolnum% #f)
<![ %output-html; [
;; 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)))))
]]> <!-- %output-html -->
<![ %output-print; [
;; customize the print stylesheet
(define %default-quadding% 'justify)
(define bop-footnotes #t)
(if tex-backend
(define %hyphenation% #t))
]]> <!-- %output-print -->
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="dbstyle">
</style-sheet>