burr 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/.ruby-version +1 -0
- data/Gemfile +3 -0
- data/LICENSE.md +30 -0
- data/README.md +180 -0
- data/Rakefile +118 -0
- data/bin/burr +9 -0
- data/burr.gemspec +36 -0
- data/generators/Gemfile.txt +3 -0
- data/generators/config.yml +55 -0
- data/generators/contents/chapter1.md +7 -0
- data/generators/contents/chapter2.md +7 -0
- data/generators/stylesheets/pdf.css +569 -0
- data/generators/stylesheets/site.css +1 -0
- data/lib/burr.rb +56 -0
- data/lib/burr/book.rb +289 -0
- data/lib/burr/cli.rb +64 -0
- data/lib/burr/converter.rb +19 -0
- data/lib/burr/core_ext/blank.rb +107 -0
- data/lib/burr/dependency.rb +28 -0
- data/lib/burr/eeepub_ext/maker.rb +131 -0
- data/lib/burr/exporter.rb +137 -0
- data/lib/burr/exporters/epub.rb +163 -0
- data/lib/burr/exporters/pdf.rb +95 -0
- data/lib/burr/exporters/site.rb +101 -0
- data/lib/burr/generator.rb +41 -0
- data/lib/burr/kramdown_ext/converter.rb +145 -0
- data/lib/burr/kramdown_ext/options.rb +38 -0
- data/lib/burr/kramdown_ext/parser.rb +65 -0
- data/lib/burr/liquid_ext/block.rb +58 -0
- data/lib/burr/liquid_ext/extends.rb +114 -0
- data/lib/burr/plugin.rb +70 -0
- data/lib/burr/plugins/aside.rb +44 -0
- data/lib/burr/plugins/codeblock.rb +42 -0
- data/lib/burr/plugins/figure.rb +62 -0
- data/lib/burr/plugins/link.rb +47 -0
- data/lib/burr/plugins/parser_plugin.rb +18 -0
- data/lib/burr/plugins/table.rb +42 -0
- data/lib/burr/plugins/toc.rb +105 -0
- data/lib/burr/ruby_version_check.rb +4 -0
- data/lib/burr/server.rb +27 -0
- data/lib/burr/ui.rb +46 -0
- data/lib/burr/version.rb +8 -0
- data/resources/locales/labels/en.yml +45 -0
- data/resources/locales/labels/zh_CN.yml +46 -0
- data/resources/locales/titles/en.yml +21 -0
- data/resources/locales/titles/zh_CN.yml +21 -0
- data/resources/templates/epub/_layout.liquid +17 -0
- data/resources/templates/epub/acknowledgement.liquid +10 -0
- data/resources/templates/epub/afterword.liquid +10 -0
- data/resources/templates/epub/appendix.liquid +10 -0
- data/resources/templates/epub/author.liquid +10 -0
- data/resources/templates/epub/chapter.liquid +10 -0
- data/resources/templates/epub/conclusion.liquid +10 -0
- data/resources/templates/epub/cover.liquid +9 -0
- data/resources/templates/epub/dedication.liquid +10 -0
- data/resources/templates/epub/edition.liquid +1 -0
- data/resources/templates/epub/epilogue.liquid +1 -0
- data/resources/templates/epub/foreword.liquid +10 -0
- data/resources/templates/epub/glossary.liquid +1 -0
- data/resources/templates/epub/introduction.liquid +1 -0
- data/resources/templates/epub/license.liquid +1 -0
- data/resources/templates/epub/lof.liquid +24 -0
- data/resources/templates/epub/lot.liquid +24 -0
- data/resources/templates/epub/part.liquid +4 -0
- data/resources/templates/epub/preface.liquid +10 -0
- data/resources/templates/epub/prologue.liquid +1 -0
- data/resources/templates/epub/table.liquid +7 -0
- data/resources/templates/epub/title.liquid +3 -0
- data/resources/templates/epub/toc.liquid +10 -0
- data/resources/templates/pdf/_item.liquid +6 -0
- data/resources/templates/pdf/acknowledgement.liquid +1 -0
- data/resources/templates/pdf/afterword.liquid +1 -0
- data/resources/templates/pdf/appendix.liquid +4 -0
- data/resources/templates/pdf/author.liquid +1 -0
- data/resources/templates/pdf/blank.liquid +3 -0
- data/resources/templates/pdf/book.liquid +42 -0
- data/resources/templates/pdf/chapter.liquid +4 -0
- data/resources/templates/pdf/code.liquid +3 -0
- data/resources/templates/pdf/conclusion.liquid +1 -0
- data/resources/templates/pdf/cover.liquid +6 -0
- data/resources/templates/pdf/dedication.liquid +3 -0
- data/resources/templates/pdf/edition.liquid +1 -0
- data/resources/templates/pdf/epilogue.liquid +1 -0
- data/resources/templates/pdf/foreword.liquid +1 -0
- data/resources/templates/pdf/glossary.liquid +1 -0
- data/resources/templates/pdf/introduction.liquid +1 -0
- data/resources/templates/pdf/license.liquid +1 -0
- data/resources/templates/pdf/lof.liquid +24 -0
- data/resources/templates/pdf/lot.liquid +24 -0
- data/resources/templates/pdf/part.liquid +4 -0
- data/resources/templates/pdf/preface.liquid +1 -0
- data/resources/templates/pdf/prologue.liquid +1 -0
- data/resources/templates/pdf/table.liquid +7 -0
- data/resources/templates/pdf/title.liquid +3 -0
- data/resources/templates/pdf/toc.liquid +4 -0
- data/resources/templates/site/_layout.liquid +27 -0
- data/resources/templates/site/author.liquid +13 -0
- data/resources/templates/site/chapter.liquid +13 -0
- data/resources/templates/site/foreword.liquid +13 -0
- data/resources/templates/site/preface.liquid +13 -0
- metadata +232 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
# The title of the first chapter #
|
2
|
+
|
3
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
4
|
+
|
5
|
+
## Ut enim ad minim veniam ##
|
6
|
+
|
7
|
+
Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# The title of the second chapter #
|
2
|
+
|
3
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
4
|
+
|
5
|
+
## Ut enim ad minim veniam ##
|
6
|
+
|
7
|
+
Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
@@ -0,0 +1,569 @@
|
|
1
|
+
@charset 'utf-8';
|
2
|
+
|
3
|
+
html {
|
4
|
+
margin: 0;
|
5
|
+
font: 10pt/1.5 times, simsun, serif;
|
6
|
+
}
|
7
|
+
|
8
|
+
body {
|
9
|
+
margin: 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
h1, h2, h3, h4, h5, h6 {
|
13
|
+
font-family: Helvetica, simhei, sans-serif;
|
14
|
+
font-weight: bold;
|
15
|
+
margin: 1em 0 .5em 0;
|
16
|
+
/*page-break-after: avoid;*/
|
17
|
+
}
|
18
|
+
|
19
|
+
h1 {
|
20
|
+
border-bottom: 3pt solid #ccc;
|
21
|
+
margin: 0 0 2em 0;
|
22
|
+
padding: 2em 0 .5em 0;
|
23
|
+
font-size: 20pt;
|
24
|
+
text-align: right;
|
25
|
+
string-set: header content();
|
26
|
+
}
|
27
|
+
|
28
|
+
h2 {
|
29
|
+
font-size: 18pt;
|
30
|
+
}
|
31
|
+
|
32
|
+
h3 {
|
33
|
+
font-size: 16pt;
|
34
|
+
}
|
35
|
+
|
36
|
+
h4 {
|
37
|
+
font-size: 14pt;
|
38
|
+
prince-bookmark-level: none;
|
39
|
+
}
|
40
|
+
|
41
|
+
h5 {
|
42
|
+
font-size: 12pt;
|
43
|
+
prince-bookmark-level: none;
|
44
|
+
}
|
45
|
+
|
46
|
+
h6 {
|
47
|
+
font-size: 10pt;
|
48
|
+
prince-bookmark-level: none;
|
49
|
+
}
|
50
|
+
|
51
|
+
q::before {
|
52
|
+
content: "\201C";
|
53
|
+
}
|
54
|
+
|
55
|
+
q::after {
|
56
|
+
content: "\201D";
|
57
|
+
}
|
58
|
+
|
59
|
+
p { margin: 1em 0; }
|
60
|
+
|
61
|
+
pre {
|
62
|
+
margin: 1em 1.3em;
|
63
|
+
white-space: pre;
|
64
|
+
white-space: pre-wrap;
|
65
|
+
word-wrap: break-word;
|
66
|
+
}
|
67
|
+
|
68
|
+
code {
|
69
|
+
font: Courier, monospace;
|
70
|
+
}
|
71
|
+
|
72
|
+
a {
|
73
|
+
color: #06c;
|
74
|
+
text-decoration: none;
|
75
|
+
}
|
76
|
+
|
77
|
+
img {
|
78
|
+
prince-image-resolution: 110dpi;
|
79
|
+
}
|
80
|
+
|
81
|
+
/* cross-references */
|
82
|
+
|
83
|
+
a.pageref::after { content: " on page " target-counter(attr(href), page); }
|
84
|
+
a.chapref::before { content: " Chapter " target-counter(attr(href), chapter) ", "; }
|
85
|
+
a.figref { content: " Figure " target-counter(attr(href), figure); }
|
86
|
+
a.tableref { content: " Table " target-counter(attr(href), figure); }
|
87
|
+
|
88
|
+
/* sidenotes */
|
89
|
+
|
90
|
+
.sidenote {
|
91
|
+
float: left;
|
92
|
+
clear: left;
|
93
|
+
margin: 0 0 1em -41%;
|
94
|
+
width: 37%;
|
95
|
+
font-size: 0.9em;
|
96
|
+
font-style: normal;
|
97
|
+
text-indent: 0;
|
98
|
+
text-align: right;
|
99
|
+
page-break-inside: avoid;
|
100
|
+
}
|
101
|
+
|
102
|
+
/* sidebars */
|
103
|
+
|
104
|
+
div.sidebar {
|
105
|
+
float: top-next;
|
106
|
+
margin: 1.2em 0 1.2em 0;
|
107
|
+
border: thin solid;
|
108
|
+
background: #CCC;
|
109
|
+
padding: 0.5em 1em;
|
110
|
+
page-break-inside: avoid;
|
111
|
+
column-count: 2;
|
112
|
+
column-gap: 1.5em;
|
113
|
+
}
|
114
|
+
|
115
|
+
div.sidebar h2 {
|
116
|
+
margin-top: 0;
|
117
|
+
}
|
118
|
+
|
119
|
+
/* figures and tables*/
|
120
|
+
|
121
|
+
div.figure {
|
122
|
+
margin: 1em 0;
|
123
|
+
counter-increment: figure;
|
124
|
+
}
|
125
|
+
|
126
|
+
div.figure img {
|
127
|
+
display: block;
|
128
|
+
margin: 0 auto;
|
129
|
+
}
|
130
|
+
|
131
|
+
div.figure .caption, div.table .caption {
|
132
|
+
text-align: center;
|
133
|
+
}
|
134
|
+
|
135
|
+
div.figure .caption span {
|
136
|
+
font-weight: bold;
|
137
|
+
}
|
138
|
+
|
139
|
+
div.table .caption::before {
|
140
|
+
content: "Table " counter(table) ": ";
|
141
|
+
font-weight: bold;
|
142
|
+
}
|
143
|
+
|
144
|
+
div.table {
|
145
|
+
margin: 1em 0;
|
146
|
+
counter-increment: table;
|
147
|
+
}
|
148
|
+
|
149
|
+
div.table th {
|
150
|
+
text-align: left;
|
151
|
+
}
|
152
|
+
|
153
|
+
table th, table td {
|
154
|
+
text-align: left;
|
155
|
+
padding-right: 1em;
|
156
|
+
}
|
157
|
+
|
158
|
+
table.lined td, table.lined th {
|
159
|
+
border-top: none;
|
160
|
+
border-bottom: thin dotted;
|
161
|
+
padding-top: 0.2em;
|
162
|
+
padding-bottom: 0.2em;
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
@page {
|
167
|
+
margin: 27mm 16mm 27mm 16mm;
|
168
|
+
size: A4;
|
169
|
+
|
170
|
+
@footnotes {
|
171
|
+
border-top: thin solid black;
|
172
|
+
padding-top: 0.3em;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
|
177
|
+
/* define default page and names pages: cover, blank, frontmatter */
|
178
|
+
|
179
|
+
@page :left {
|
180
|
+
@top-left {
|
181
|
+
font: 11pt Times, simsun, serif;
|
182
|
+
content: string(booktitle);
|
183
|
+
vertical-align: bottom;
|
184
|
+
padding-bottom: 2em;
|
185
|
+
}
|
186
|
+
|
187
|
+
@bottom-left {
|
188
|
+
font: 11pt Times, simsun, serif;
|
189
|
+
content: counter(page);
|
190
|
+
padding-top: 2em;
|
191
|
+
vertical-align: top;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
@page :right {
|
196
|
+
@top-right {
|
197
|
+
font: 11pt Times, simsun, serif;
|
198
|
+
content: string(header, first);
|
199
|
+
vertical-align: bottom;
|
200
|
+
padding-bottom: 2em;
|
201
|
+
}
|
202
|
+
|
203
|
+
@bottom-right {
|
204
|
+
font: 11pt Times, simsun, serif;
|
205
|
+
content: counter(page);
|
206
|
+
text-align: right;
|
207
|
+
vertical-align: top;
|
208
|
+
padding-top: 2em;
|
209
|
+
}
|
210
|
+
}
|
211
|
+
|
212
|
+
@page cover { margin: 0; }
|
213
|
+
|
214
|
+
@page frontmatter :left {
|
215
|
+
@top-left {
|
216
|
+
font: 11pt Times, simsun, serif;
|
217
|
+
content: string(title);
|
218
|
+
vertical-align: bottom;
|
219
|
+
padding-bottom: 2em;
|
220
|
+
}
|
221
|
+
|
222
|
+
@bottom-left {
|
223
|
+
font: 11pt Times, simsun, serif;
|
224
|
+
content: counter(page, lower-roman);
|
225
|
+
padding-top: 2em;
|
226
|
+
vertical-align: top;
|
227
|
+
}
|
228
|
+
}
|
229
|
+
|
230
|
+
@page frontmatter :right {
|
231
|
+
@top-right {
|
232
|
+
font: 11pt Times, simsun, serif;
|
233
|
+
content: string(header, first);
|
234
|
+
vertical-align: bottom;
|
235
|
+
padding-bottom: 2em;
|
236
|
+
}
|
237
|
+
|
238
|
+
@bottom-right {
|
239
|
+
font: 11pt Times, simsun, serif;
|
240
|
+
content: counter(page, lower-roman);
|
241
|
+
text-align: right;
|
242
|
+
vertical-align: top;
|
243
|
+
padding-top: 2em;
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
@page blank :left {
|
248
|
+
@top-left { content: normal }
|
249
|
+
@bottom-left { content: normal }
|
250
|
+
}
|
251
|
+
|
252
|
+
@page blank :right {
|
253
|
+
@top-right { content: normal }
|
254
|
+
@bottom-right { content: normal }
|
255
|
+
}
|
256
|
+
|
257
|
+
/* page number */
|
258
|
+
|
259
|
+
div.bodymatter {
|
260
|
+
counter-reset: page 1;
|
261
|
+
}
|
262
|
+
|
263
|
+
/* footnotes */
|
264
|
+
|
265
|
+
.footnote {
|
266
|
+
display: none; /* default rule */
|
267
|
+
display: prince-footnote; /* prince-specific rules */
|
268
|
+
position: footnote;
|
269
|
+
counter-increment: footnote;
|
270
|
+
font-size: 9pt;
|
271
|
+
line-height: 1.4;
|
272
|
+
footnote-style-position: inside;
|
273
|
+
}
|
274
|
+
|
275
|
+
.footnote::footnote-call {
|
276
|
+
vertical-align: super;
|
277
|
+
font-size: 8pt;
|
278
|
+
}
|
279
|
+
|
280
|
+
.footnote::footnote-marker {
|
281
|
+
color: green;
|
282
|
+
}
|
283
|
+
|
284
|
+
.chapter {
|
285
|
+
counter-reset: footnote;
|
286
|
+
}
|
287
|
+
|
288
|
+
|
289
|
+
/*
|
290
|
+
A book consists of different types of sections. We propose to use
|
291
|
+
DIV elements with these class names:
|
292
|
+
|
293
|
+
cover
|
294
|
+
halftitlepage: contains the title of the book
|
295
|
+
titlepage: contains the title of the book, name of author(s) and publisher
|
296
|
+
imprint: left page with copyright, publisher, library printing information
|
297
|
+
dedication: right page with short dedication
|
298
|
+
foreword: written by someone other than the author(s)
|
299
|
+
toc: table of contents
|
300
|
+
preface: preface, including acknowledgements
|
301
|
+
chapter: each chapter is given its own DIV element
|
302
|
+
references: contains list of references
|
303
|
+
appendix: each appendix is given its own
|
304
|
+
bibliography
|
305
|
+
glossary
|
306
|
+
index
|
307
|
+
colophon: describes how the book was produced
|
308
|
+
backcover
|
309
|
+
|
310
|
+
A book will use several of the types listed above, but few books
|
311
|
+
will use all of them.
|
312
|
+
*/
|
313
|
+
|
314
|
+
/* which section uses which named page */
|
315
|
+
|
316
|
+
div.halftitlepage, div.titlepage, div.imprint, div.dedication, div.blank { page: blank }
|
317
|
+
div.foreword, div.toc, div.preface { page: frontmatter }
|
318
|
+
|
319
|
+
|
320
|
+
/* page breaks */
|
321
|
+
|
322
|
+
div.cover, div.halftitlepage, div.titlepage { page-break-before: right }
|
323
|
+
div.imprint { page-break-before: always }
|
324
|
+
div.dedication, div.foreword, div.toc, div.preface, div.chapter, div.reference,
|
325
|
+
div.appendix, div.bibliography, div.glossary, div.index, div.colophon {
|
326
|
+
page-break-before: always
|
327
|
+
}
|
328
|
+
div.backcover { page-break-before: left }
|
329
|
+
|
330
|
+
/* the front cover; this code is probably not very reusable by other books */
|
331
|
+
|
332
|
+
div.cover { page: cover; }
|
333
|
+
|
334
|
+
div.cover img {
|
335
|
+
position: absolute;
|
336
|
+
width: 7in;
|
337
|
+
height: 9.25in;
|
338
|
+
left: 0;
|
339
|
+
top: 0;
|
340
|
+
z-index: -1;
|
341
|
+
}
|
342
|
+
|
343
|
+
div.cover h1 {
|
344
|
+
border-bottom: none;
|
345
|
+
position: absolute;
|
346
|
+
left: 0;
|
347
|
+
top: 1cm;
|
348
|
+
color: #000;
|
349
|
+
font-size: 32pt;
|
350
|
+
font-weight: normal;
|
351
|
+
text-align: center;
|
352
|
+
width: 100%;
|
353
|
+
prince-bookmark-level: none;
|
354
|
+
string-set: booktitle content();
|
355
|
+
}
|
356
|
+
|
357
|
+
div.cover h2 {
|
358
|
+
position: absolute;
|
359
|
+
right: 2cm;
|
360
|
+
top: 5cm;
|
361
|
+
color: #000;
|
362
|
+
font-size: 16pt;
|
363
|
+
font-weight: normal;
|
364
|
+
padding: 0.2em 5em 0.2em 1em;
|
365
|
+
letter-spacing: 0.15em;
|
366
|
+
prince-bookmark-level: none;
|
367
|
+
}
|
368
|
+
|
369
|
+
div.cover h3 {
|
370
|
+
position: absolute;
|
371
|
+
left: 0;
|
372
|
+
top: 7cm;
|
373
|
+
color: #000;
|
374
|
+
font-size: 14pt;
|
375
|
+
font-weight: normal;
|
376
|
+
text-align: center;
|
377
|
+
width: 100%;
|
378
|
+
prince-bookmark-level: none;
|
379
|
+
}
|
380
|
+
|
381
|
+
div.cover p {
|
382
|
+
position: absolute;
|
383
|
+
left: 2cm;
|
384
|
+
bottom: 1.5cm;
|
385
|
+
font-size: 14pt;
|
386
|
+
color: black;
|
387
|
+
text-transform: uppercase;
|
388
|
+
}
|
389
|
+
|
390
|
+
div.cover p.edition {
|
391
|
+
left: 15cm;
|
392
|
+
top: 2cm;
|
393
|
+
font-size: 16pt;
|
394
|
+
}
|
395
|
+
|
396
|
+
/* blank page */
|
397
|
+
div.blank p {
|
398
|
+
text-align: center;
|
399
|
+
}
|
400
|
+
|
401
|
+
/* titlepage, halftitlepage */
|
402
|
+
|
403
|
+
div.titlepage h1, div.halftitlepage h1 { margin-bottom: 2em; }
|
404
|
+
div.titlepage h2, div.halftitlepage h2 { font-size: 1.2em; margin-bottom: 3em; }
|
405
|
+
div.titlepage h3, div.halftitlepage h3 { font-size: 1em; margin-bottom: 3em; }
|
406
|
+
div.titlepage p, div.halftitlepage p {
|
407
|
+
font-size: 1.4em;
|
408
|
+
font-weight: bold;
|
409
|
+
margin: 0;
|
410
|
+
padding: 0;
|
411
|
+
}
|
412
|
+
|
413
|
+
/* imprint */
|
414
|
+
div.imprint p {
|
415
|
+
text-indent: 0;
|
416
|
+
margin-bottom: 1em;
|
417
|
+
}
|
418
|
+
div.imprint img {
|
419
|
+
width: 200px; height: 157px;
|
420
|
+
}
|
421
|
+
|
422
|
+
/* TOC */
|
423
|
+
|
424
|
+
ol.toc-list {
|
425
|
+
list-style-type: none;
|
426
|
+
margin: 0;
|
427
|
+
padding: 0;
|
428
|
+
}
|
429
|
+
ol.toc-list li.level-1 {
|
430
|
+
font-weight: bold;
|
431
|
+
}
|
432
|
+
ol.toc-list li.level-2 {
|
433
|
+
margin-left: 3.5em;
|
434
|
+
font-weight: normal;
|
435
|
+
}
|
436
|
+
ol.toc-list li.level-3 {
|
437
|
+
margin-left: 4.5em;
|
438
|
+
font-weight: normal;
|
439
|
+
}
|
440
|
+
ol.toc-list a::after {
|
441
|
+
content: leader('.') target-counter(attr(href), page);
|
442
|
+
font-style: normal;
|
443
|
+
}
|
444
|
+
ol.toc-list li.frontmatter a::after {
|
445
|
+
content: leader('.') target-counter(attr(href), page, lower-roman);
|
446
|
+
font-style: normal;
|
447
|
+
}
|
448
|
+
ol.toc-list > li.backmatter a::after {
|
449
|
+
content: leader('.') target-counter(attr(href), page);
|
450
|
+
font-style: normal;
|
451
|
+
}
|
452
|
+
|
453
|
+
ol.toc-list a {
|
454
|
+
color: #000;
|
455
|
+
}
|
456
|
+
|
457
|
+
/* Aside */
|
458
|
+
|
459
|
+
div.aside {
|
460
|
+
background: #eee;
|
461
|
+
padding: 1em;
|
462
|
+
}
|
463
|
+
|
464
|
+
div.aside h4 {
|
465
|
+
background: #ccc;
|
466
|
+
font-size: 10pt;
|
467
|
+
margin: 0;
|
468
|
+
padding: .5em 1em;
|
469
|
+
text-align: center;
|
470
|
+
}
|
471
|
+
|
472
|
+
/* index */
|
473
|
+
|
474
|
+
ol.index {
|
475
|
+
list-style-type: none;
|
476
|
+
margin: 0; padding: 0;
|
477
|
+
column-count: 2;
|
478
|
+
column-gap: 1em;
|
479
|
+
}
|
480
|
+
|
481
|
+
ul.index a::after { content: ", " target-counter(attr(href), page); }
|
482
|
+
|
483
|
+
/* codeblock */
|
484
|
+
|
485
|
+
.codeblock .caption {
|
486
|
+
margin: 0 0 .5em;
|
487
|
+
}
|
488
|
+
|
489
|
+
.codeblock .caption span {
|
490
|
+
font-weight: bold;
|
491
|
+
}
|
492
|
+
|
493
|
+
.codeblock .highlight {
|
494
|
+
background: #eee;
|
495
|
+
padding: 0.5em;
|
496
|
+
}
|
497
|
+
|
498
|
+
.codeblock .highlight pre {
|
499
|
+
margin: 0;
|
500
|
+
}
|
501
|
+
|
502
|
+
.highlight .c{color:#999988;font-style:italic}
|
503
|
+
.highlight .err{color:#a61717;background-color:#e3d2d2}
|
504
|
+
.highlight .k{font-weight:bold}
|
505
|
+
.highlight .o{font-weight:bold}
|
506
|
+
.highlight .cm{color:#999988;font-style:italic}
|
507
|
+
.highlight .cp{color:#999999;font-weight:bold}
|
508
|
+
.highlight .c1{color:#999988;font-style:italic}
|
509
|
+
.highlight .cs{color:#999999;font-weight:bold;font-style:italic}
|
510
|
+
.highlight .gd{color:#000000;background-color:#ffdddd}
|
511
|
+
.highlight .gd .x{color:#000000;background-color:#ffaaaa}
|
512
|
+
.highlight .ge{font-style:italic}
|
513
|
+
.highlight .gr{color:#aa0000}
|
514
|
+
.highlight .gh{color:#999999}
|
515
|
+
.highlight .gi{color:#000000;background-color:#ddffdd}
|
516
|
+
.highlight .gi .x{color:#000000;background-color:#aaffaa}
|
517
|
+
.highlight .go{color:#888888}
|
518
|
+
.highlight .gp{color:#555555}
|
519
|
+
.highlight .gs{font-weight:bold}
|
520
|
+
.highlight .gu{color:#800080;font-weight:bold}
|
521
|
+
.highlight .gt{color:#aa0000}
|
522
|
+
.highlight .kc{font-weight:bold}
|
523
|
+
.highlight .kd{font-weight:bold}
|
524
|
+
.highlight .kn{font-weight:bold}
|
525
|
+
.highlight .kp{font-weight:bold}
|
526
|
+
.highlight .kr{font-weight:bold}
|
527
|
+
.highlight .kt{color:#445588;font-weight:bold}
|
528
|
+
.highlight .m{color:#009999}
|
529
|
+
.highlight .s{color:#d14}
|
530
|
+
.highlight .na{color:#008080}
|
531
|
+
.highlight .nb{color:#0086B3}
|
532
|
+
.highlight .nc{color:#445588;font-weight:bold}
|
533
|
+
.highlight .no{color:#008080}
|
534
|
+
.highlight .ni{color:#800080}
|
535
|
+
.highlight .ne{color:#990000;font-weight:bold}
|
536
|
+
.highlight .nf{color:#990000;font-weight:bold}
|
537
|
+
.highlight .nn{color:#555555}
|
538
|
+
.highlight .nt{color:#000080}
|
539
|
+
.highlight .nv{color:#008080}
|
540
|
+
.highlight .ow{font-weight:bold}
|
541
|
+
.highlight .w{color:#bbbbbb}
|
542
|
+
.highlight .mf{color:#009999}
|
543
|
+
.highlight .mh{color:#009999}
|
544
|
+
.highlight .mi{color:#009999}
|
545
|
+
.highlight .mo{color:#009999}
|
546
|
+
.highlight .sb{color:#d14}
|
547
|
+
.highlight .sc{color:#d14}
|
548
|
+
.highlight .sd{color:#d14}
|
549
|
+
.highlight .s2{color:#d14}
|
550
|
+
.highlight .se{color:#d14}
|
551
|
+
.highlight .sh{color:#d14}
|
552
|
+
.highlight .si{color:#d14}
|
553
|
+
.highlight .sx{color:#d14}
|
554
|
+
.highlight .sr{color:#009926}
|
555
|
+
.highlight .s1{color:#d14}
|
556
|
+
.highlight .ss{color:#990073}
|
557
|
+
.highlight .bp{color:#999999}
|
558
|
+
.highlight .vc{color:#008080}
|
559
|
+
.highlight .vg{color:#008080}
|
560
|
+
.highlight .vi{color:#008080}
|
561
|
+
.highlight .il{color:#009999}
|
562
|
+
.highlight .gc{color:#999;background-color:#EAF2F5}
|
563
|
+
|
564
|
+
@media screen, handheld {
|
565
|
+
html { margin: 1em; font: 14px Helvetica, simhei, sans-serif; }
|
566
|
+
h1 { margin-bottom: 0.5em }
|
567
|
+
div.cover, div.halftitlepage,
|
568
|
+
div.dedication, div.foreword, div.toc, div.index { display: none }
|
569
|
+
}
|