-
Notifications
You must be signed in to change notification settings - Fork 63
/
paper.css
186 lines (156 loc) · 2.61 KB
/
paper.css
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
:root {
--primary-color: #2875d9;
}
@font-face {
font-family: 'Computer Modern';
font-style: normal;
font-weight: normal;
src: url('./paper/cmunrm.ttf');
}
@font-face {
font-family: 'Computer Modern';
font-style: italic;
font-weight: normal;
src: url('./paper/cmunti.ttf');
}
@font-face {
font-family: 'Computer Modern';
font-style: normal;
font-weight: bold;
src: url('./paper/cmunbx.ttf');
}
@font-face {
font-family: 'Computer Modern';
font-style: italic;
font-weight: bold;
src: url('./paper/cmunbi.ttf');
}
* {
box-sizing: border-box;
}
html, body, #write {
font-family: 'Computer Modern';
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Computer Modern';
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.8rem;
}
h3 {
font-size: 1.6rem;
}
h4 {
font-size: 1.4rem;
}
h5 {
font-size: 1.2rem;
}
h6 {
font-size: 1rem;
}
html {
font-size: 20px;
}
body, #write {
max-width: 914px;
text-align: justify;
display: block;
margin: auto;
}
p {
font-size: 1rem;
}
a {
color: var(--primary-color);
}
/* Stuff */
sup.md-footnote {
background-color: transparent;
color: var(--primary-color);
padding: 1px;
margin: 0;
}
code, .md-fences, .sourceCode {
background: #f2f2f2;
}
.md-fences, pre.sourceCode {
font-size: .7em;
padding: .5rem;
}
.show-fences-line-number .md-fences {
padding-left: .5rem;
}
blockquote {
margin: 2rem .2rem;
padding: .3rem .5rem;
color: #6f6f6f;
border-left: .4rem solid gray;
}
blockquote p {
padding: .2rem 1.5rem;
}
mark {
background: yellow;
}
figure {
margin: .5rem auto;
max-width: 100%;
display: block;
margin: auto;
}
figcaption {
text-align: center;
margin: .5rem auto;
}
img {
max-width: 100%;
display: block;
margin: auto;
}
/*
Print Mode and page breaks.
WkhtmlToPDF does not work on @print mode
*/
@media (max-width: 210mm) {
img {
max-height: 8cm;
}
html {
font-size: 16px;
}
div[title="pb"], page-break {
display: block;
page-break-after: always;
break-after: page;
}
nav {
font-size: .9rem;
page-break-after: always;
page-break-before: always;
}
nav a {
color: black;
}
/* Move top-level headings to a new page on the right-hand side: */
h1, h2 {
page-break-before: right;
break-before: recto;
}
/* Override the previous ruleset for the very first heading: */
h1:first-of-type, section>h1:first-child {
page-break-before: avoid;
break-before: avoid;
}
/* Headings should not be the last paragraph on a page: */
h1, h2, h3, h4, h5, h6 {
page-break-after: avoid;
}
/* Consecutive headings with deepening level should not be split across pages: */
h1+h2, h2+h3, h3+h4, h4+h5, h5+h6 {
page-break-before: avoid;
}
}