-
Notifications
You must be signed in to change notification settings - Fork 3
/
academic.css
237 lines (223 loc) · 6.27 KB
/
academic.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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
/*
A modified version of https://github.com/NicklasVraa/Obsidian-academic-export/
*/
@media print {
/* Document-wide. ---------------------------------------------------------------------- */
@page {
/*
Notice that this will add a margin to all your pdf export, regardless if you don't have the "academic" class activated.
To prevent, simply deactivate the css snippet from the obsidian config and activate it when you want to actually export it using the academic style
*/
margin: 2cm !important;
}
/*
Adjust printing style only to have column output
when the document is tagged with the fontmatter
cssclass of 'twocolumn'
*/
/* Document title to go across entire page */
.twocolumn h1:first-of-type,
.twocolumn h6:first-of-type,
.twocolumn del:first-of-type {
column-span: all;
text-align: center;
}
/* Content broken up in twocolumn */
.twocolumn.markdown-preview-view {
column-count: 2;
column-rule: 1px solid transparent;
column-gap: 2em;
}
.academic a:link,
.academic a:visited,
.academic a {
/* Links. */
color: black !important;
text-decoration: none !important;
}
/* Main body of text. ------------------------------------------------------------------ */
.academic body {
tab-size: 4 !important;
--code-background: white !important;
--code-normal: black !important;
}
.academic p {
font-family: "Latin Modern Roman" !important;
font-size: 10pt !important;
text-align: justify !important;
line-height: 1.2 !important;
margin-top: 5px !important;
}
.academic strong {
font-weight: bold !important;
}
/* Header styling and automatic numbering. --------------------------------------------- */
.academic h1,
.academic h2,
.academic h3,
.academic h4,
.academic h5,
.academic h6 {
font-family: "Latin Modern Roman" !important;
color: black !important;
page-break-after: avoid;
page-break-inside: avoid;
font-size: 12pt !important;
font-weight: bold !important;
line-height: 1 !important;
margin-bottom: 0 !important;
padding-bottom: 0 !important;
margin-top: 20px !important;
}
.academic h1 {
/* Title. */
font-family: "Latin Modern Roman Caps" !important;
text-align: center !important;
font-size: 18pt !important;
font-weight: normal !important;
margin-top: 0px !important;
counter-reset: H2;
}
.academic h6 {
/* Subtitle. */
font-family: "Latin Modern Roman Caps" !important;
text-align: center !important;
font-size: 11pt !important;
font-weight: normal !important;
margin-top: 6px !important;
}
.academic h2:before {
counter-increment: H2;
content: counter(H2) ". \0000a0";
}
.academic h2 {
counter-reset: H3;
}
.academic h3:before {
counter-increment: H3;
content: counter(H2) "." counter(H3) ". \0000a0";
}
.academic h3 {
counter-reset: H4;
}
.academic h4:before {
counter-increment: H4;
content: counter(H2) "." counter(H3) "." counter(H4) ". \0000a0";
}
/* Credits. ---------------------------------------------------- */
.academic del {
/* Credits, i.e. author information. */
font-family: "Latin Modern Roman" !important;
display: block !important;
text-align: center !important;
font-size: 10pt !important;
text-decoration: none;
margin-top: 8px !important;
padding-bottom: 10px !important;
}
/* Code and math blocks. --------------------------------------------------------------- */
.academic pre {
/* background and border of block. */
background-color: #fff !important;
border-style: dashed !important;
border-radius: 0px !important;
border-width: 1px 0px !important;
border-color: darkgray !important;
line-height: 1 !important;
}
.academic code {
font-family: "Latin Modern Mono" !important;
font-size: 10pt !important;
color: #292929 !important;
}
.academic mjx-math {
font-size: 90% !important;
}
.academic math-block {
page-break-before: avoid !important;
}
/* Figures. ---------------------------------------------------------------------------- */
.academic svg,
.academic img {
display: block !important;
/* filter: invert(100%) !important; */
page-break-inside: avoid !important;
page-break-after: avoid !important;
margin: 10px auto 5px !important;
}
.academic figcaption {
font-family: "Latin Modern Roman" !important;
text-align: center !important;
margin-bottom: 16px !important;
font-size: 8pt !important;
}
/* Tables. ----------------------------------------------------------------------------- */
.academic table,
.academic pre {
page-break-inside: avoid !important;
}
.academic table {
font-family: Times !important;
font-size: 10pt !important;
text-align: center !important;
margin: 10px auto 5px !important;
border-top: 1px solid #292929 !important;
border-bottom: 1px solid #292929 !important;
}
.academic th {
/* Table headers. */
color: black !important;
font-weight: normal !important;
border: none !important;
border-bottom: 1px solid darkgray !important;
padding: 2px 5px !important;
}
.academic td {
border: none !important;
padding: 2px 5px !important;
}
/* Lists ------------------------------------------------------------------------------- */
.academic ul,
.academic ol,
.academic dl {
page-break-before: avoid !important;
font-family: "Latin Modern Roman" !important;
font-size: 11pt !important;
line-height: 1.1 !important;
margin-top: 0px !important;
padding-top: 0px !important;
}
.academic ul li {
/* Adjusts size of bullet points. */
list-style-type: none !important;
position: relative !important;
}
.academic ul li::before {
content: "•" !important;
position: absolute !important;
left: -1.15em !important;
top: -0.05em !important;
font-size: 1.1em !important;
}
/* Horizontal separator. --------------------------------------------------------------- */
.academic hr {
/* Manual page-break using "---". */
border: none !important;
border-top: 0px solid lightgray !important;
page-break-after: always !important;
}
/* Additional settings. ---------------------------------------------------------------- */
.academic blockquote {
display: block !important;
text-align: center !important;
font-size: 10pt !important;
color: black !important;
border: none !important;
padding: 0px !important;
margin: 5px auto !important;
}
.academic.mermaid {
/* Inline diagrams. */
color: black !important;
}
}