-
Notifications
You must be signed in to change notification settings - Fork 2
/
paper-markdown.css
417 lines (380 loc) · 10.2 KB
/
paper-markdown.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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
/* page-break: Firefox, Chrome, 以及 Safari 不支持属性值 "avoid". */
body{
/* border:1px solid black; for debug */
padding:0 !important;
margin:0 !important;
}
/* 正文区基本属性 */
#write {
font-family:"Times New Roman", 宋体;
font-size:12pt;
max-width: 21cm; /*A4标准宽度*/
border:1px solid #CCC ; /* 添加一个淡灰色的边框 */
/*box-shadow: 0 0 5px 5px #CCC;*/
}
/*页边距处理*/
@media screen{
#write{
padding:0cm 3.18cm;
}
}
@media print{
#write{
padding:0 3.18cm !important;
margin:0 !important;
}
}
@page{
margin:2.5cm 0; /*上下/左右 边距,参考了word的默认边距*/
}
#write p{
text-align:justify;
}
h1,h2,h3,h4,h5,h6 {
font-weight:bold;
@media print{
page-break-after:avoid !important;
}
}
/*引言*/
blockquote{
font-family:楷体;
/* border-left:3px solid black; */
padding-left:10px;
/*color:grey;*/
}
/* 标题属性 */
h1 {
text-align:center;
font-size:14pt;
font-family:Helvetica, Tahoma, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", STXihei, "Microsoft YaHei", SimHei, "WenQuanYi Micro Hei";
font-weight:bold;
/*page-break-before:always!important;*/
}
h2 {
font-family:Helvetica, Tahoma, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", STXihei, "Microsoft YaHei", SimHei, "WenQuanYi Micro Hei";
text-align:center;
font-size:14pt;
font-weight:bold;
}
h3 {
font-family:Helvetica, Tahoma, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", STXihei, "Microsoft YaHei", SimHei, "WenQuanYi Micro Hei";
font-size:12pt;
font-weight:bold;
}
h4 {
/*text-align:center;*/
font-family:楷体;
font-size:12pt;
font-weight:bold;
}
h6 {
text-align:center;
font-size:16pt;
font-family:Helvetica, Tahoma, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", STXihei, "Microsoft YaHei", SimHei, "WenQuanYi Micro Hei";
font-weight:bold;
/*page-break-before:always!important;*/
}
/* 目录标题属性 */
.md-toc-h2 {
font-family:黑体;
}
.md-toc-h3 {
font-family:黑体;
}
.md-toc-h4 {
font-family:黑体;
}
/* 三线表 */
#write table{
border-top: 1.5pt solid;
border-bottom: 1.5pt solid;
font-family:宋体;
/*font-size:7.875pt;*/
font-size:10.5pt;
text-align:center;
page-break-inside:avoid!important;
}
#write table td{
padding:2px;
}
#write table tr{
/* padding:3px; */
}
#write thead{
border-bottom: 0.75pt solid;
font-family:黑体;
font-size:10.5pt;
}
/* @media print{
img{
page-break-inside:avoid !important;
break-inside: avoid !important;
}
} */
img{
page-break-inside:avoid !important;
break-inside: avoid !important;
}
/* 引用和尾注 */
sup.md-footnote{
background-color: transparent;
padding:0;
}
sup.md-footnote>a::before{
content:'[';
}
sup.md-footnote>a::after{
content:']';
}
div.footnotes-area{
font-family:宋体;
font-size:12pt !important;
color: black;
page-break-inside:avoid!important;
}
div.footnotes-area::before{
/* content: "参考文献"; */
text-align:center;
width:100%;
display:inline-block;
font-size:16pt;
font-family: 仿宋;
font-weight: bold;
}
div.footnotes-area>hr{
display:none;
}
div.footnote-line{
font-family:宋体;
font-size:10.5pt !important;
color: black;
margin-top: 0;
}
span.md-fn-count::before{
content:'[';
}
span.md-fn-count::after{
content:']';
}
/* 以下开始为自动编号 */
#write{
counter-reset: tableHead imgHead write-h2 write-h3 write-h4!important; /*修复缺失上级标题时无法递增*/
}
/* 编辑器内标题-重置 */
/* #write h1 {
counter-reset: write-h2;
} */
#write h2 {
counter-reset: write-h3;
}
#write h3 {
counter-reset: write-h4;
}
/* 表格自动编号 */
/*#write figure:after{
counter-increment: tableHead;
content: "表" counter(tableHead) " ";
text-align:center;
width:100%;
display:inline-block;
}*/
/* 图片自动编号,导出PDF时暂时无法显示 */
/*#write .md-image:after{
counter-increment: imgHead;
content: "图" counter(imgHead) attr(alt) " " !important;
text-align:center;
width:100%;
display:inline-block;
}*/
/* 编辑器内标题-显示 */
#write h2:before {
counter-increment: write-h2;
content: "第" counter(write-h2, cjk-ideographic) "章 ";
}
#write h3:before {
counter-increment: write-h3;
content: counter(write-h2) ". " counter(write-h3) " ";
}
#write h4:before {
counter-increment: write-h4;
content: counter(write-h2) ". " counter(write-h3) ". " counter(write-h4) " ";
}
/*#write h4:before {
counter-increment: write-h4;
content: counter(write-h4, decimal) ". ";
}*/
/* 目录标题-重置 */
.md-toc-content{
margin-left: 8em;
counter-reset: toc-h2 toc-h3 toc-h4 ;/*修复缺失上级标题时无法递增*/
page-break-after: always;
}
.md-toc::before{
content: "目录";
font-family:仿宋;
text-align:center;
font-size:18pt;
display:inline-block;
font-weight: bold;
width: 100%;
}
.md-toc-inner{
margin-left:0 !important;
color:black !important;
}
.md-toc-item{
color:black !important;
font-size: 11pt;
font-family: "宋体";
}
.md-toc-content .md-toc-h1 {
counter-reset: toc-h2;
}
.md-toc-content .md-toc-h2 {
counter-reset: toc-h3;
}
.md-toc-content .md-toc-h3 {
counter-reset: toc-h4;
}
.md-toc-content .md-toc-h4 {
display: none;
}
.md-toc-content .md-toc-h5 {
display: none;
}
/* 目录标题-显示*/
.md-toc-content .md-toc-h2:before {
counter-increment: toc-h2;
content: counter(toc-h2, cjk-ideographic) "、";
}
.md-toc-content .md-toc-h3:before {
counter-increment: toc-h3;
content: "(" counter(toc-h3, cjk-ideographic) ")";
}
.md-toc-content .md-toc-h4:before {
counter-increment: toc-h4;
content: counter(toc-h4, decimal) ". ";
}
/* 大纲标题 -重置*/
.sidebar-content{
counter-reset: outline-h2 outline-h3 outline-h4;/*修复缺失上级标题时无法递增*/
}
.sidebar-content .outline-h1 {
counter-reset: outline-h2;
}
.sidebar-content .outline-h2 {
counter-reset: outline-h3;
}
.sidebar-content .outline-h3 {
counter-reset: outline-h4;
}
/* 大纲标题 -显示*/
.sidebar-content .outline-h2 .outline-label:before {
counter-increment: outline-h2;
content: counter(outline-h2, cjk-ideographic) "、";
}
.sidebar-content .outline-h3 .outline-label:before {
counter-increment: outline-h3;
content: "(" counter(outline-h3, cjk-ideographic) ")";
}
.sidebar-content .outline-h4 .outline-label:before {
counter-increment: outline-h4;
content: counter(outline-h4, decimal) ". ";
}
/* 代码块样式 */
/*基准样式来自 https://support.typora.io/Code-Block-Styles/ */
code{/* 行内代码 */
font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
padding: 2px 4px;
border-radius: 2px;
font-size: 90%;
color: #000000;
background-color: #f8f8f8;
}
/*.cm-s-inner .CodeMirror-matchingbracket {
text-decoration: underline;
font-weight:bold;
}*/
/**apply to code fences with plan text**/
.md-fences .code-tooltip {
background-color: white;
}
.cm-s-inner {
background-color: white;
color: black;
border-top: solid 1.5pt black;
border-bottom: solid 1.5pt black;
/*font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;*/
font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
font-size: 10pt;
padding: 5pt;
}
/*.cm-s-inner .CodeMirror-gutters {
background: black;
color: rgb(83,127,126);
border: none;
}*/
/* 与用户操作相关,如光标,选中区域等 */
.cm-s-inner .CodeMirror-guttermarker, .cm-s-inner .CodeMirror-guttermarker-subtle, .cm-s-inner .CodeMirror-linenumber
{ color: black; }/* 行号 */
.cm-s-inner .CodeMirror-cursor { border-left: 1px solid black; } /* 光标 */
/* 选中 */
.cm-s-inner div.CodeMirror-selected { background: rgba(255, 255, 255, 0.15); }
.cm-s-inner.CodeMirror-focused div.CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
.cm-s-inner .CodeMirror-line::selection, .cm-s-inner .CodeMirror-line > span::selection, .cm-s-inner .CodeMirror-line > span > span::selection
{ background: rgba(255, 255, 255, 0.10); }
.cm-s-inner .CodeMirror-line::-moz-selection, .cm-s-inner .CodeMirror-line > span::-moz-selection, .cm-s-inner .CodeMirror-line > span > span::-moz-selection
{ background: rgba(255, 255, 255, 0.10); }
/* .cm-s-inner .CodeMirror-activeline-background { background: rgba(255, 255, 255, 0.10); }/* 高亮当前行 */
.cm-s-inner .cm-keyword { color: black; font-weight: bold;}/* 语言关键字 */
.cm-s-inner .cm-operator { color: black; } /* 语言操作符 */
.cm-s-inner .cm-variable { color: black;} /* 变量 */
.cm-s-inner .cm-variable-2 { color: black; /*font-style: italic;*/ }
.cm-s-inner .cm-variable-3 { color: black; font-weight: bold;}/* 语言内置类型 */
.cm-s-inner .cm-builtin { color: black; }
.cm-s-inner .cm-number { color: black; }/* 数字 */
.cm-s-inner .cm-def { color: black; }/*函数定义*/
.cm-s-inner .cm-string { color: gray; font-weight:bold }/* 字符串 */
.cm-s-inner .cm-string-2 { color: gray; font-weight:bold }/* 字符串 */
.cm-s-inner .cm-comment { color: gray; font-style: italic;}/* 注释 */
.cm-s-inner .cm-meta { color: black; }/* 头文件,宏定义等*/
/* HTML 相关 */
.cm-s-inner .cm-tag { color: black; font-weight: bold;}/* HTML 标签 */
.cm-s-inner .cm-attribute { color: black; }
.cm-s-inner .cm-property { color: black; }/*CSS属性名称*/
.cm-s-inner .cm-atom { color: black; }/*CSS属性值*/
.cm-s-inner .cm-qualifier { color: black; font-weight:bold;}/*css选择器等*/
.cm-s-inner .cm-error {
color: rgba(255, 255, 255, 1.0);
background-color: red;
}
/* override the default style for focused headings */
#write>h3.md-focus:before,
#write>h4.md-focus:before,
#write>h5.md-focus:before,
#write>h6.md-focus:before,
h3.md-focus:before,
h4.md-focus:before,
h5.md-focus:before,
h6.md-focus:before {
color: inherit;
border: inherit;
border-radius: inherit;
position: inherit;
left:initial;
float: none;
top:initial;
font-size: inherit;
padding-left: inherit;
padding-right: inherit;
vertical-align: inherit;
font-weight: inherit;
line-height: inherit;
}
/* 超链接样式 */
a {
color: #42b983;
padding: 0 2px;
text-decoration: none;
}