-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcumum-paper.css
More file actions
174 lines (151 loc) · 3.82 KB
/
cumum-paper.css
File metadata and controls
174 lines (151 loc) · 3.82 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
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
/* cumcm-paper-updated.css - A Typora theme for CUMCM Papers (v2) */
/* --- 全局与基础设置 --- */
:root {
--main-font-size: 12pt; /* 正文: 小四 */
--header-font-size: 14pt; /* 一级标题/论文题目: 四号 */
--text-color: #000000;
--main-font-family: "Times New Roman", "SimSun", "Songti SC", serif; /* 西文/数字在前,中文宋体在后 */
--header-font-family: "SimHei", "Heiti SC", sans-serif; /* 标题用黑体 */
}
body {
font-family: var(--main-font-family);
font-size: var(--main-font-size);
color: var(--text-color);
line-height: 1.25; /* 多倍行距 1.25 */
}
/* 写作区域宽度 */
#write {
max-width: 860px;
margin: 0 auto;
padding: 40px 40px 100px 40px;
}
/* --- 标题格式 --- */
/* 论文题目: 黑体, 四号, 居中 */
h1 {
font-family: var(--header-font-family);
font-size: var(--header-font-size);
font-weight: bold;
text-align: center;
margin-top: 0;
margin-bottom: 1.5em; /* 和摘要之间空1.5行 */
}
/* 一级标题: 四号, 居中 */
h2 {
font-family: var(--header-font-family);
font-size: var(--header-font-size);
font-weight: bold;
text-align: center;
margin-top: 1.5em;
margin-bottom: 1em;
}
/* 二级标题: 小四, 左对齐 */
h3 {
font-family: var(--header-font-family);
font-size: var(--main-font-size);
font-weight: bold;
text-align: left;
margin-top: 1.5em;
margin-bottom: 0.5em;
}
h4 {
font-weight: bold;
font-size: var(--main-font-size);
margin-top: 0;
margin-bottom: 0.5em;
text-align: left;
}
/* 三、四、五、六级别标题 */
h5, h6 {
font-family: var(--header-font-family);
font-weight: bold;
text-align: left;
}
/* --- 正文段落格式 --- */
p {
text-indent: 2em; /* 每段开头空两个中文字符 */
margin-top: 0;
margin-bottom: 0.5em;
text-align: justify; /* 两端对齐 */
}
/* 标题后面紧跟的段落的首行缩进 */
h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p {
text-indent: 2em;
}
/* --- 公式格式 --- */
/* 行内公式 */
.md-math-inline .md-math {
font-size: 1.05em; /* 稍微放大一点,更清晰 */
}
/* 独立成行的公式块居中 */
.md-fences .md-math-block {
display: block;
text-align: center;
margin-top: 1em;
margin-bottom: 1em;
}
/* --- 表格格式 (三线表) --- */
table {
width: 100%;
border-collapse: collapse;
margin: 1.5em auto; /* 上下边距 */
border-top: 1.5pt solid black;
border-bottom: 1.5pt solid black;
}
/* 表格标题 (约定:在表格前的段落作为标题) */
p + table {
margin-top: 0.5em;
}
table + p {
margin-top: 0;
text-indent: 0;
text-align: left;
}
thead, th {
border: none;
border-bottom: 1.5pt solid black;
padding: 8px;
font-weight: bold;
text-align: center;
}
td {
border: none;
padding: 8px;
text-align: center;
}
/* --- [修正] 图片格式 --- */
.md-image {
display: block;
text-align: center;
margin-top: 1.5em;
margin-bottom: 0.5em; /* 图片和标题之间的间距 */
}
.md-image > img {
display: inline-block;
max-width: 100%; /* 防止图片过宽溢出 */
}
/* 图片标题 */
.md-image + p {
display: block;
text-align: center;
text-indent: 0; /* 标题不缩进 */
margin-top: 0;
margin-bottom: 1.5em; /* 标题下方的间距 */
font-size: calc(var(--main-font-size) - 1pt);
}
/* --- [新增] 特殊字体格式修正 --- */
/* 修正:使等宽字体使用正文字体 */
code, pre, tt {
font-family: var(--main-font-family) !important;
}
/* 修正:取消斜体样式 */
em, i {
font-style: normal;
}
/* 列表不首行缩进 */
ul, ol {
padding-left: 2em;
}
li > p {
text-indent: 0;
}
/* 修正:移除了全局加粗更改字体的规则,现在加粗会保持原有字体 */