forked from cosmicpython/book
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpdf.css
More file actions
139 lines (105 loc) · 3.17 KB
/
Copy pathpdf.css
File metadata and controls
139 lines (105 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@charset "UTF-8";
/*--------Put Your Custom CSS Rules Below--------*/
/* Globally preventing code blocks from breaking across pages
pre { page-break-inside: avoid; } */
/* Reduce font size (STYL-1219) */
aside.small { font-size: 0.7em !important; }
/* handling for elements to keep them from breaking across pages */
.nobreakinside { page-break-inside: avoid; }
/* Epilogue figure label */
section[data-type="afterword"] figcaption:before {
content: "Figure E-"counter(FigureNumber)". ";
}
/*less space for pagebreaks */
.less_space {margin-top: 0 !important;}
/* Allow Examples to have less space at top of page (STYL-1266)
section.less_space > h1:first-child {
margin-top: 0 !important;
}
aside.less_space > h5:first-child {
margin-top: 0 !important;
}
.less_space > h5:first-child {
margin-top: 0 !important;
padding-top: 0 !important;
}
*/
/* Temporary fix to TOC spacing from Tools */
nav[data-type="toc"] li {
margin-bottom: 0 !important;
}
/* harry rule to hide inline image sources */
.image-source {
display: none !important;
}
/* Removing "Example X" labels from formal code block captions */
section[data-type="chapter"] div[data-type="example"] h5:before {
content: none;
}
section[data-type="appendix"] div[data-type="example"] h5:before {
content: none;
}
section[data-type="preface"] div[data-type="example"] h5:before {
content: none;
}
div[data-type="part"] div[data-type="example"] h5:before {
content: none;
}
div[data-type="part"] section[data-type="chapter"] div[data-type="example"] h5:before {
content: none;
}
div[data-type="part"] section[data-type="appendix"] div[data-type="example"] h5:before {
content: none;
}
div[data-type="example"] h5 {
text-align: right !important;
font-size: 9pt !important;
margin-bottom: 0.5ex !important;
}
/*--- This oneoff overrides the code in https://github.com/oreillymedia/<name_of_theme>/blob/master/pdf/pdf.css---*/
figure div.border-box { border: none; }
/*----Uncomment to temporarily turn on code-eyballer highlighting (make sure to recomment after you build)
pre {
background-color: yellow;
}
---*/
/*----Uncomment to turn on automatic code wrapping
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
----*/
/*----Uncomment to change the TOC start page (set
the number to one page _after_ the one you want;
so 6 to start on v, 8 to start on vii, etc.)
@page toc:first {
counter-reset: page 6;
}
----*/
/*----Uncomment to fix a bad break in the title
(increase padding value to push down, decrease
value to pull up)
section[data-type="titlepage"] h1 {
padding-left: 1.5in;
}
----*/
/*----Uncomment to fix a bad break in the subtitle
(increase padding value to push down, decrease
value to pull up)
section[data-type="titlepage"] h2 {
padding-left: 1in;
}
----*/
/*----Uncomment to fix a bad break in the author names
(increase padding value to push down, decrease
value to pull up)
section[data-type="titlepage"] p.author {
padding-left: 3in;
}
----*/
/* ----Uncomment to suppress duplicate page numbers in index entries
WARNING: MAY CAUSE PDF BUILDS TO SEGFAULT
div[data-type="index"] {
-ah-suppress-duplicate-page-number: true;
}
----*/