Skip to content

Commit 6b05912

Browse files
committed
[css2] Fixed up to have better page numbering and to use libwww (gets you icon)
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401751
1 parent e2d2308 commit 6b05912

1 file changed

Lines changed: 73 additions & 134 deletions

File tree

css2/html2psrc

Lines changed: 73 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
@html2ps {
22
paper {
3-
type: A4;
3+
type: letter;
44
}
55
option {
66
DSC: 1; /* DSC compliant PostScript */
77
xref: 1; /* cross references a la [p 31] */
88
duplex: 1; /* double sided */
9-
number: 1; /* have page numbers */
9+
/* number: 1; */ /* have page numbers */
1010
original: 1; /* use original PostScript images */
1111
hyphenate: 1; /* hyphenation on */
1212
language: "en"; /* hyphenate for English */
13+
colour: 1; /* maintain color */
1314
}
1415
xref {
1516
text: "[p. $N]"; /* avoid line breaks before page no. */
@@ -36,180 +37,118 @@
3637
}
3738
package {
3839
netpbm: 1;
40+
libwww-perl: 1;
3941
}
4042
doc-sep: "<!--OddPage-->"; /* have every first page on the right */
4143
}
4244

4345
BODY {
44-
color: black;
45-
/* text-align: justify; */
46-
font-family: helvetica, sans-serif;
47-
background: white;
48-
/* margin: 2em; */
49-
background: #def url(recbg.jpg); /* For the REC */
50-
}
51-
H1, H2, H3, H4, H5, H6 {
52-
text-align: left;
46+
margin: 2em 1em 2em 70px;
47+
font-family: Helvetica, sans-serif;
48+
color: black;
49+
background-color: white;
50+
background-position: top left;
51+
background-repeat: no-repeat;
5352
}
5453

55-
H1 {
56-
clear: left;
57-
margin-top: 2em;
58-
text-align: center;
54+
H1, H2, H3 {
55+
text-align: left;
56+
font-family: Helvetica, sans-serif;
57+
font-weight: normal;
58+
color: #0050B2;
5959
}
6060

61+
.hide { display: none }
62+
63+
DIV.head { margin-bottom: 1em }
64+
DIV.head H1 { margin-top: 2em }
65+
DIV.head TABLE { margin-left: 2em; margin-top: 2em }
66+
DIV.head IMG { color: white; border: none } /* remove border from top image */
67+
68+
P.copyright { font-size: smaller }
69+
6170
P {
6271
margin-top: 0;
63-
margin-bottom: 0;
72+
margin-bottom: .5em;
6473
text-indent: 1em;
6574
}
6675

6776
PRE {
6877
font-family: monospace;
6978
margin-left: 1em;
70-
/* font-size: 90% */
7179
}
7280

73-
ADDRESS {
74-
text-align: right;
75-
font-style: italic;
81+
.guideline { font-size: 120%;
82+
border-width: 1px;
83+
border: 1px solid;
84+
color: black;
85+
background-color: #FFFFCC;
86+
padding-top: 5px;
87+
padding-bottom: 5px;
88+
padding-right: 5px;
89+
padding-left: 5px;
90+
margin-top: 10px;
91+
width: 80%
7692
}
7793

78-
VAR {
79-
font-style: normal;
80-
}
81-
IMG {
82-
border: 0;
83-
}
84-
.toc {
85-
text-indent: 0;
86-
}
87-
P.toc-line {
88-
margin-top: 1em;
89-
margin-bottom: 1em;
90-
text-indent: 0;
91-
}
94+
H4 { font-weight: normal; font-style: italic }
9295

93-
@media screen {
94-
/* I don't like all that blue text, how about this: */
95-
/* It should be 'inherit', but Netscape inserts a random color :-( */
96-
A.noxref:link, A.noxref:visited {color: black; /*color: inherit*/}
97-
DIV.example A:link, DIV.example A:visited {color: maroon; /*color: inherit*/}
98-
DIV.deprecated-html-example A:link,
99-
DIV.deprecated-html-example A:visited {color: red; /*color: inherit*/}
100-
.note A:link, .note A:visited {color: green; /*color: inherit*/}
101-
}
96+
DL.checkpoint { margin-left: 2em }
97+
DT.checkpoint { font-weight: normal; margin-top: 1em }
98+
SPAN.checkpoint { font-weight: bold }
99+
.checkpoint-nb { color: maroon; background: white}
100+
101+
.quicktest { color: black; background-color: #B6B0FF }
102102

103-
A.propdef-title {
104-
background: yellow;
105-
}
106103

107-
A.descdef-title {
108-
color: yellow;
109-
background: green
104+
.example { border-style: solid;
105+
border-width: 1px ;
106+
color: #5D0091;
107+
background-color: #F9F5DE;
108+
border-color: #5D0091
110109
}
111110

112-
/* TABLE {margin-left: 1em} */
113-
DIV.propdef {margin: 1.2em 0}
114-
115-
div.example { color: maroon }
116-
pre.example { color: maroon }
117-
pre.illegal-example { color: red }
118-
div.illegal-example { color: red }
119-
div.illegal-example p { color: black }
120-
121-
122-
div.html-example { color: maroon }
123-
pre.html-example { color: maroon }
124-
pre.illegal-html-example { color: red }
125-
div.illegal-html-example { color: red }
126-
div.illegal-html-example p { color: black }
127-
pre.deprecated-html-example { color: red }
128-
div.deprecated-html-example { color: red }
129-
div.deprecated-html-example p { color: black }
130-
131-
div.xml-example { color: maroon }
132-
pre.xml-example { color: maroon }
133-
pre.illegal-xml-example { color: red }
134-
div.illegal-xml-example { color: red }
135-
div.illegal-xml-example p { color: black }
136-
137-
div.dtd-example { color: maroon }
138-
pre.dtd-example { color: maroon }
139-
pre.illegal-dtd-example { color: red }
140-
div.illegal-dtd-example { color: red }
141-
div.illegal-dtd-example p { color: black }
142-
143-
.note {
144-
font-weight: bold;
145-
margin-top: 1em;
146-
margin-bottom: 1em;
147-
margin-left: 1em;
148-
margin-right: 1em;
149-
color: green
111+
.deprecated-example { border-style: solid;
112+
border-width: 1px ;
113+
color: #5D0091;
114+
background-color: #F9F5DE;
115+
border-color: red
150116
}
151117

152-
.normref {
153-
color: red;
154-
}
118+
.elements { color: black; background-color: #E7FFFE }
119+
.attributes { color: black; background-color: #FFFADF }
155120

156-
.informref {
157-
color: green;
158-
}
121+
.off { display:none }
159122

160-
DIV.propdef TH {
161-
text-align: right;
123+
.dfn { color: #00513D;
124+
background-color: white;
125+
font-style: italic
162126
}
163127

164-
DIV.descdef TH {
165-
text-align: right;
128+
HR { margin-top: .5em}
129+
130+
.toc {
131+
text-indent: 0;
166132
}
167133

134+
P.toc-line {
135+
margin-top: 1em;
136+
margin-bottom: 1em;
137+
text-indent: 0;
138+
}
139+
140+
168141
UL.toc, OL.toc {list-style: none}
169142
DIV.toc UL UL, DIV.toc OL OL {margin-left: 0}
170143
DIV.toc UL UL UL, DIV.toc OL OL OL {margin-left: 1em}
171144
DIV.toc UL UL UL UL, DIV.toc OL OL OL OL {margin-left: 0}
172145
LI.tocline1 {font-weight: bold}
173146
LI.tocline2 {font-weight: normal}
174147
LI.tocline4 {font-style: italic}
175-
/* DIV.subtoc UL, DIV.subtoc OL {list-style: none} */
176-
/* The border in the following rule crashes NN4 on fonts.html :-(
177-
DIV.subtoc {padding: 1em; border: solid black thin; margin: 1em 0;
178-
background: #ddd}
179-
*/
180-
UL.index {list-style: none}
181-
182-
S, DEL {text-decoration: line-through; color: red}
183-
U, INS {text-decoration: underline; background: #bfa}
184-
185-
DIV.figure {
186-
text-align: center;
187-
/*border: solid thin;
188-
width: 100%;*/
189-
margin: 2.5em 0
190-
}
191-
P.caption, CAPTION {
192-
text-align: center;
193-
font-style: italic;
194-
font-weight: bold;
195-
font-size: 90%;
196-
color: #088;
197-
margin: 1.5em 25% 0 25%;
198-
}
199-
DIV.toc, UL.index, DT {
148+
DIV.toc, UL.index, {
200149
text-align: left
201150
}
202-
SUP {
203-
vertical-align: super;
204-
font-size: 80%
205-
}
206-
207-
/* the following doesn't work for now,
208-
instead we rely on a patched version of html2ps which has this built-in */
209-
.dlink { display: none }
210151

211-
/* the following doesn't work for now,
212-
instead we rely on a patched version of html2ps which has this built-in */
213-
DIV.navbar {
214-
display: none;
152+
IMG {
153+
border: 0;
215154
}

0 commit comments

Comments
 (0)