Skip to content

Commit 91f8b0f

Browse files
jankorichterMarkus Nullmeier
authored andcommitted
documentation: style optimization
1 parent 336a062 commit 91f8b0f

File tree

4 files changed

+293
-155
lines changed

4 files changed

+293
-155
lines changed

doc/operators.sgm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@
394394
is undefined.
395395
</para>
396396
<example>
397-
<title>Return length and Check if north pole on <type>sline</type>s</title>
397+
<title>Return length and check if north pole on <type>sline</type>s</title>
398398
<programlisting>
399399
<![CDATA[sql> SELECT set_sphere_output('DEG');]]>
400400
<![CDATA[ set_sphere_output ]]>

doc/pg_sphere.css

Lines changed: 95 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,80 @@
1-
/* PostgreSQL.org Documentation Style */
2-
1+
/* similar to PostgreSQL.org Documentation Style */
32

43
body {
5-
margin: 1em;
6-
padding: 1em;
7-
font-size: 85%;
8-
font-family: verdana, sans-serif;
9-
color: #000;
10-
background-color: #fff;
4+
margin: 1em;
5+
padding: 1em;
6+
font-size: 85%;
7+
font-family: verdana, sans-serif;
8+
color: #000;
9+
background-color: #fff;
1110
}
1211

1312
h1 {
14-
font-size: 1.4em;
15-
font-weight: bold;
16-
margin-top: 0em;
17-
margin-bottom: 0em;
13+
font-size: 1.4em;
14+
font-weight: bold;
15+
margin-top: 0em;
16+
margin-bottom: 0em;
1817
}
1918

2019
h2 {
21-
font-size: 1.2em;
22-
margin: 1.2em 0em 1.2em 0em;
23-
font-weight: bold;
20+
font-size: 1.2em;
21+
margin: 1.2em 0em 1.2em 0em;
22+
font-weight: bold;
2423
}
2524

2625
h3 {
27-
font-size: 1.0em;
28-
margin: 1.2em 0em 1.2em 0em;
29-
font-weight: bold;
26+
font-size: 1.0em;
27+
margin: 1.2em 0em 1.2em 0em;
28+
font-weight: bold;
3029
}
3130

3231
h4 {
33-
font-size: 0.95em;
34-
margin: 1.2em 0em 1.2em 0em;
35-
font-weight: normal;
32+
font-size: 0.95em;
33+
margin: 1.2em 0em 1.2em 0em;
34+
font-weight: normal;
3635
}
3736

3837
h5 {
39-
font-size: 0.9em;
40-
margin: 1.2em 0em 1.2em 0em;
41-
font-weight: normal;
38+
font-size: 0.9em;
39+
margin: 1.2em 0em 1.2em 0em;
40+
font-weight: normal;
4241
}
4342

4443
h6 {
45-
font-size: 0.85em;
46-
margin: 1.2em 0em 1.2em 0em;
47-
font-weight: normal;
44+
font-size: 0.85em;
45+
margin: 1.2em 0em 1.2em 0em;
46+
font-weight: normal;
4847
}
4948

5049
img {
51-
border: 0;
50+
border: 0;
5251
}
5352

5453
ol, ul, li {
55-
font-size: 1.0em;
56-
line-height: 1.2em;
57-
margin-top: 0.2em;
58-
margin-bottom: 0.1em;
54+
font-size: 1.0em;
55+
line-height: 1.2em;
56+
margin-top: 0.2em;
57+
margin-bottom: 0.1em;
5958
}
6059

6160
p {
62-
font-size: 1.2em;
63-
line-height: 1.2em;
64-
margin: 1.2em 0em 1.2em 0em;
61+
font-size: 1.0em;
62+
line-height: 1.2em;
63+
margin: 1.2em 0em 1.2em 0em;
6564
}
6665

6766
li > p {
68-
margin-top: 0.2em;
67+
margin-top: 0.2em;
6968
}
7069

7170
pre {
72-
font-family: monospace;
73-
font-size: 1.2em;
74-
margin:0em;
71+
font-family: monospace;
72+
font-size: 1.2em;
73+
margin: 0em;
7574
}
7675

7776
strong, b {
78-
font-weight: bold;
77+
font-weight: bold;
7978
}
8079

8180
h1 {
@@ -97,10 +96,9 @@ h3 {
9796
}
9897

9998
h4 {
100-
color: #666;
99+
color: #666;
101100
}
102101

103-
104102
/* Text Styles */
105103

106104
.txtCurrentLocation {
@@ -111,8 +109,6 @@ p, ol, ul, li {
111109
line-height: 1.5em;
112110
}
113111

114-
115-
116112
.function {
117113
font-size: 100%;
118114
}
@@ -131,3 +127,58 @@ a:link { color:#0066A2; text-decoration: underline; }
131127
a:visited { color:#004E66; text-decoration: underline; }
132128
a:active { color:#0066A2; text-decoration: underline; }
133129
a:hover { color:#000000; text-decoration: underline; }
130+
131+
132+
pre.programlisting,
133+
blockquote.note,
134+
blockquote.tip
135+
{
136+
-moz-border-radius: 8px 8px 8px 8px;
137+
-moz-box-shadow: 3px 3px 5px #DFDFDF;
138+
color: black;
139+
margin: 1ex 0ex 1ex 1ex;
140+
padding: 1ex;
141+
border-style: solid;
142+
border-width: 1px;
143+
}
144+
145+
146+
/* Programlisting */
147+
pre.programlisting {
148+
background-color: #F7F7F7;
149+
border-color: #CFCFCF;
150+
font-family: monospace;
151+
text-align: left;
152+
}
153+
154+
div.note {
155+
margin-top: 4ex;
156+
}
157+
158+
blockquote.note,
159+
blockquote.tip
160+
{
161+
padding-top: 0ex;
162+
background-color: #FDFDEE;
163+
border-color: #DBDBCC;
164+
}
165+
166+
167+
.literal,
168+
.parameter
169+
{
170+
font-size: 130%;
171+
}
172+
173+
div.table table tr td {
174+
padding: 0.5ex;
175+
}
176+
177+
div.example p b {
178+
font-size : 70%;
179+
font-style: italic;
180+
}
181+
182+
div.NAVFOOTER {
183+
margin-top: 5ex;
184+
}

doc/pg_sphere.dsl-dist

Lines changed: 75 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,39 @@ Stylesheet//EN" CDATA DSSSL>
3232

3333
(define %indent-programlisting-lines% " " )
3434

35+
(element sect1 ($section1$))
36+
37+
;; Enables page break per sect1
38+
(define ($section1$)
39+
(if (node-list=? (current-node) (sgml-root-element))
40+
(make simple-page-sequence
41+
page-n-columns: %page-n-columns%
42+
page-number-restart?: (or %page-number-restart%
43+
(book-start?)
44+
(first-chapter?))
45+
page-number-format: ($page-number-format$)
46+
use: default-text-style
47+
left-header: ($left-header$)
48+
center-header: ($center-header$)
49+
right-header: ($right-header$)
50+
left-footer: ($left-footer$)
51+
center-footer: ($center-footer$)
52+
right-footer: ($right-footer$)
53+
start-indent: %body-start-indent%
54+
input-whitespace-treatment: 'collapse
55+
quadding: %default-quadding%
56+
(make sequence
57+
($section-title$)
58+
(process-children)))
59+
(make display-group
60+
space-before: %block-sep%
61+
space-after: %block-sep%
62+
start-indent: %body-start-indent%
63+
break-before: 'page
64+
(make sequence
65+
($section-title$)
66+
(process-children)))))
67+
3568
(define %paper-type%
3669
;; Name of paper type
3770
;; "USletter"
@@ -41,7 +74,6 @@ Stylesheet//EN" CDATA DSSSL>
4174
;; Is two-sided output being produced?
4275
#t)
4376

44-
4577
;; Titlepage and TOC
4678

4779
(define %generate-article-titlepage%
@@ -71,7 +103,6 @@ Stylesheet//EN" CDATA DSSSL>
71103
;; Allow automatic hyphenation?
72104
#t)
73105

74-
75106
(element ( itemizedlist title )
76107
(
77108
make paragraph
@@ -141,8 +172,6 @@ Stylesheet//EN" CDATA DSSSL>
141172
(normalize "abstract")
142173
(normalize "legalnotice")
143174
(normalize "revhistory")))
144-
145-
146175
]]>
147176

148177

@@ -168,7 +197,7 @@ Stylesheet//EN" CDATA DSSSL>
168197
)
169198
)
170199

171-
(define %stylesheet% "pg_sphere.css")
200+
(define %stylesheet% "pg_sphere.css")
172201

173202
(define %generate-article-titlepage%
174203
;; produce a title page for articles
@@ -186,9 +215,42 @@ Stylesheet//EN" CDATA DSSSL>
186215
;; The filename of the root HTML document (e.g, "index").
187216
"index")
188217

218+
(define ($shade-verbatim-attr$)
219+
;; REFENTRY shade-verbatim-attr
220+
;; PURP Attributes used to create a shaded verbatim environment.
221+
;; DESC
222+
;; See '%shade-verbatim%'
223+
;; /DESC
224+
;; AUTHOR N/A
225+
;; /REFENTRY
226+
(list
227+
(list "BORDER" "0")
228+
(list "BGCOLOR" "#F7F7F7")
229+
(list "WIDTH" ($table-width$))))
230+
231+
;; ...but we need to do some extra work to make the above apply to PRE
232+
;; as well. (mostly pasted from dbverb.dsl)
233+
(define ($verbatim-display$ indent line-numbers?)
234+
(let ((content (make element gi: "PRE"
235+
attributes: (list
236+
(list "CLASS" (gi)))
237+
(if (or indent line-numbers?)
238+
($verbatim-line-by-line$ indent line-numbers?)
239+
(process-children)))))
240+
(if %shade-verbatim%
241+
(make element gi: "TABLE"
242+
attributes: ($shade-verbatim-attr$)
243+
(make element gi: "TR"
244+
(make element gi: "TD"
245+
content)))
246+
(make sequence
247+
(para-check)
248+
content
249+
(para-check 'restart)))))
250+
189251
(define %shade-verbatim%
190252
;; verbatim sections will be shaded if t(rue)
191-
#t)
253+
#f)
192254

193255
(define %use-id-as-filename%
194256
;; Use ID attributes as name for component HTML files?
@@ -250,6 +312,13 @@ Stylesheet//EN" CDATA DSSSL>
250312
;; do not print subtitle on subsequent pages
251313
(element subtitle (empty-sosofo)))
252314

315+
;; notes.
316+
(element note
317+
(make sequence
318+
(para-check)
319+
($admonition$)
320+
(para-check 'restart)))
321+
253322
]]>
254323

255324
</style-specification-body>

0 commit comments

Comments
 (0)