Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit702f123

Browse files
committed
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 headerPrint:* make print output justified by default* footnotes at bottom of each page* allow TeX to hyphenate
1 parentb08e00b commit702f123

File tree

2 files changed

+85
-27
lines changed

2 files changed

+85
-27
lines changed

‎doc/src/sgml/Makefile

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
#
1010
# IDENTIFICATION
11-
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.30 2001/02/04 12:23:11 petere Exp $
11+
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.31 2001/02/13 21:27:05 petere Exp $
1212
#
1313
#----------------------------------------------------------------------------
1414

@@ -23,16 +23,6 @@ ifndef DOCBOOKSTYLE
2323
DOCBOOKSTYLE = /home/projects/pgsql/developers/thomas/db143.d/docbook
2424
endif
2525

26-
ifndefHSTYLE
27-
HSTYLE =$(DOCBOOKSTYLE)/html
28-
endif
29-
ifndefPSTYLE
30-
PSTYLE =$(DOCBOOKSTYLE)/print
31-
endif
32-
33-
HDSL=$(HSTYLE)/docbook.dsl
34-
PDSL=$(PSTYLE)/docbook.dsl
35-
3626
ifndefJADE
3727
JADE = jade
3828
endif
@@ -62,6 +52,15 @@ ALLBOOKS = admin developer programmer reference tutorial user
6252
ALLSGML :=$(wildcard$(srcdir)/*.sgml$(srcdir)/ref/*.sgml)
6353

6454

55+
catalog: Makefile$(top_builddir)/src/Makefile.global$(top_builddir)/src/Makefile.custom
56+
(echo"PUBLIC\"-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN\"\"$(DOCBOOKSTYLE)/html/docbook.dsl\""; \
57+
echo"PUBLIC\"-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN\"\"$(DOCBOOKSTYLE)/print/docbook.dsl\"")>$@
58+
59+
ifeq "$(originDOCBOOKSTYLE)" "command line"
60+
.PHONY: catalog
61+
endif
62+
63+
6564
##
6665
## Man pages
6766
##
@@ -85,33 +84,30 @@ man: $(ALLSGML)
8584
## HTML
8685
##
8786

88-
JADE.html =$(JADE)$(JADEFLAGS)$(SGMLINCLUDE) -d$(HDSL) -V %use-id-as-filename% -V %generate-legalnotice-link% -t sgml
87+
JADE.html =$(JADE)$(JADEFLAGS)$(SGMLINCLUDE) -dstylesheet.dsl -i output-html -t sgml
8988

90-
postgres.html: postgres.sgml$(ALLSGML)
91-
@rm -f*.htm
89+
postgres.html: postgres.sgml$(ALLSGML) stylesheet.dsl catalog
90+
@rm -f*.html
9291
$(JADE.html)$<
93-
# Include some softlinks to the generic default file names
94-
ln -sf postgres.htm index.html
95-
ln -sf postgres.htm postgres.html
92+
ln -sf$@ index.html
9693

97-
$(addsuffix .html,$(ALLBOOKS)):%.html:%.sgml$(ALLSGML)
98-
@rm -f*.htm
94+
$(addsuffix .html,$(ALLBOOKS)):%.html:%.sgml$(ALLSGML) stylesheet.dsl catalog
95+
@rm -f*.html
9996
$(JADE.html) book-decl.sgml$<
100-
ln -sf$*.htm index.html
101-
ln -sf$*.htm$*.html
97+
ln -sf$@ index.html
10298

10399

104100
##
105101
## Print
106102
##
107103

108104
# RTF to allow minor editing for hardcopy
109-
$(addsuffix .rtf,$(ALLBOOKS)):%.rtf:%.sgml$(ALLSGML)
110-
$(JADE)$(JADEFLAGS)$(SGMLINCLUDE) -d$(PDSL) -t rtf -V rtf-backend book-decl.sgml$<
105+
$(addsuffix .rtf,$(ALLBOOKS)):%.rtf:%.sgml$(ALLSGML) stylesheet.dsl catalog
106+
$(JADE)$(JADEFLAGS)$(SGMLINCLUDE) -dstylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml$<
111107

112108
# TeX and DVI
113-
$(addsuffix .tex,$(ALLBOOKS)):%.tex:%.sgml$(ALLSGML)
114-
$(JADE)$(JADEFLAGS)$(SGMLINCLUDE) -d$(PDSL) -t tex -V tex-backend book-decl.sgml$<
109+
$(addsuffix .tex,$(ALLBOOKS)):%.tex:%.sgml$(ALLSGML) stylesheet.dsl catalog
110+
$(JADE)$(JADEFLAGS)$(SGMLINCLUDE) -dstylesheet.dsl -t tex -V tex-backend -i output-print book-decl.sgml$<
115111

116112
%.dvi:%.tex
117113
jadetex$<
@@ -182,9 +178,10 @@ check-postgres: postgres.sgml
182178
##
183179

184180
cleandistcleanmaintainer-clean:
181+
rm -f catalog
185182
# HTML
186-
rm -f HTML.manifest *.html *.htm
183+
rm -f HTML.manifest *.html
187184
# man
188-
rm -rf *.1 *.l man1manl manpage.refs manpage.links manpage.log
185+
rm -rf *.1 *.$(DEFAULTSECTION) man1man$(DEFAULTSECTION) manpage.refs manpage.links manpage.log
189186
# print
190187
rm -f *.rtf *.tex *.dvi *.aux *.log *.ps *.pdf

‎doc/src/sgml/stylesheet.dsl

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/stylesheet.dsl,v1.1 2001/02/13 21:27:05 petere Exp $ -->
2+
<!DOCTYPE style-sheet PUBLIC"-//James Clark//DTD DSSSL Style Sheet//EN" [
3+
4+
<!-- must turn on one of these with -i on the jade command line -->
5+
<!ENTITY % output-html"IGNORE">
6+
<!ENTITY % output-print"IGNORE">
7+
8+
<![ %output-html; [
9+
<!ENTITY dbstyle PUBLIC"-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
10+
]]>
11+
12+
<![ %output-print; [
13+
<!ENTITY dbstyle PUBLIC"-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
14+
]]>
15+
16+
]>
17+
18+
<style-sheet>
19+
<style-specification use="docbook">
20+
<style-specification-body>
21+
22+
(define pgsql-docs-list"pgsql-docs@postgresql.org")
23+
24+
(define %refentry-xref-manvolnum% #f)
25+
26+
<![ %output-html; [
27+
;; customize the html stylesheet
28+
29+
(define %generate-legalnotice-link% #t)
30+
(define %html-ext%".html")
31+
(define %link-mailto-url% (string-append"mailto:" pgsql-docs-list))
32+
(define %use-id-as-filename% #t)
33+
(define %stylesheet%"stylesheet.css")
34+
35+
;; Returns the depth of auto TOC that should be made at the nd-level
36+
(define (toc-depth nd)
37+
(cond ((string=? (gi nd) (normalize"book"))3)
38+
((string=? (gi nd) (normalize"set"))2)
39+
(else1)))
40+
41+
;; Put date of creation into header
42+
(define %html-header-tags%
43+
(list (list"META" '("NAME""creation") (list"CONTENT" (time->string (time) #t)))))
44+
45+
]]> <!-- %output-html -->
46+
47+
<![ %output-print; [
48+
;; customize the print stylesheet
49+
50+
(define %default-quadding% 'justify)
51+
(define bop-footnotes #t)
52+
(if tex-backend
53+
(define %hyphenation% #t))
54+
55+
]]> <!-- %output-print -->
56+
57+
</style-specification-body>
58+
</style-specification>
59+
60+
<external-specification id="docbook" document="dbstyle">
61+
</style-sheet>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp