@bytechain.cn/colamd 1.5.1-beta.2 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +159 -162
  2. package/README.md +79 -3
  3. package/README_CN.md +78 -3
  4. package/dist/main/index.js +14 -5
  5. package/dist/preload/index.js +1 -1
  6. package/dist/renderer/assets/{arc-CPdeInCG.js → arc-_lugyDzx.js} +1 -1
  7. package/dist/renderer/assets/{architectureDiagram-3BPJPVTR-BAbnaR9G.js → architectureDiagram-3BPJPVTR-DDfP-F9D.js} +2 -2
  8. package/dist/renderer/assets/{blockDiagram-GPEHLZMM-CYSWjnJg.js → blockDiagram-GPEHLZMM-DOETUKma.js} +4 -4
  9. package/dist/renderer/assets/{c4Diagram-AAUBKEIU-Rb1tstnr.js → c4Diagram-AAUBKEIU-kAmLfVtk.js} +2 -2
  10. package/dist/renderer/assets/{channel-DpG2A6fE.js → channel-CD4vJFwr.js} +1 -1
  11. package/dist/renderer/assets/{chunk-2J33WTMH-DFc0Jxy_.js → chunk-2J33WTMH-DkVrgw4l.js} +1 -1
  12. package/dist/renderer/assets/{chunk-4BX2VUAB-BhRxDTNn.js → chunk-4BX2VUAB-JTZ-VKNX.js} +1 -1
  13. package/dist/renderer/assets/{chunk-55IACEB6-DEgMVBk8.js → chunk-55IACEB6-Di_O5box.js} +1 -1
  14. package/dist/renderer/assets/{chunk-727SXJPM-bjBIfiz8.js → chunk-727SXJPM-BgKvwR8w.js} +5 -5
  15. package/dist/renderer/assets/{chunk-AQP2D5EJ-DwQMzTzD.js → chunk-AQP2D5EJ-DonSXCCQ.js} +3 -3
  16. package/dist/renderer/assets/{chunk-FMBD7UC4-CkphwJzs.js → chunk-FMBD7UC4-CsV8Lmy6.js} +1 -1
  17. package/dist/renderer/assets/{chunk-ND2GUHAM-oU09z4y4.js → chunk-ND2GUHAM-C_-_dlq7.js} +1 -1
  18. package/dist/renderer/assets/{chunk-QZHKN3VN-rCbVuPBn.js → chunk-QZHKN3VN-aCmcDsfu.js} +1 -1
  19. package/dist/renderer/assets/{classDiagram-v2-Q7XG4LA2-DGS2faoM.js → classDiagram-4FO5ZUOK-nuHQLjzM.js} +6 -6
  20. package/dist/renderer/assets/{classDiagram-4FO5ZUOK-DGS2faoM.js → classDiagram-v2-Q7XG4LA2-nuHQLjzM.js} +6 -6
  21. package/dist/renderer/assets/{cose-bilkent-S5V4N54A-iqY6-EwA.js → cose-bilkent-S5V4N54A-Di1_SXt9.js} +1 -1
  22. package/dist/renderer/assets/{dagre-BM42HDAG-5t3X5sDa.js → dagre-BM42HDAG-CqOUIYsL.js} +3 -3
  23. package/dist/renderer/assets/{diagram-2AECGRRQ-DzHiYDPh.js → diagram-2AECGRRQ-F-fP19TC.js} +2 -2
  24. package/dist/renderer/assets/{diagram-5GNKFQAL-BiNv6Keq.js → diagram-5GNKFQAL-BD5XZc8G.js} +3 -3
  25. package/dist/renderer/assets/{diagram-KO2AKTUF-ClzeDG6f.js → diagram-KO2AKTUF-Qa3ZxA67.js} +2 -2
  26. package/dist/renderer/assets/{diagram-LMA3HP47-CGkw7wII.js → diagram-LMA3HP47-DqDnw2RA.js} +2 -2
  27. package/dist/renderer/assets/{diagram-OG6HWLK6-Dl-Hyk1_.js → diagram-OG6HWLK6-BH4Elzby.js} +3 -3
  28. package/dist/renderer/assets/{erDiagram-TEJ5UH35-BxUN79Qb.js → erDiagram-TEJ5UH35-CaKZCewa.js} +4 -4
  29. package/dist/renderer/assets/{flowDiagram-I6XJVG4X-CzFk-KNI.js → flowDiagram-I6XJVG4X-C8znUgyL.js} +6 -6
  30. package/dist/renderer/assets/{ganttDiagram-6RSMTGT7-C2xl6Igx.js → ganttDiagram-6RSMTGT7-DnRvbMnU.js} +2 -2
  31. package/dist/renderer/assets/{gitGraphDiagram-PVQCEYII-_fn7XCa7.js → gitGraphDiagram-PVQCEYII-CZuRZzk4.js} +3 -3
  32. package/dist/renderer/assets/{graph-CDoHYrHm.js → graph-CYiEKt0j.js} +1 -1
  33. package/dist/renderer/assets/{index-DAlXyxzt.js → index-BX6JHKv6.js} +328 -143
  34. package/dist/renderer/assets/{index-CeFpoCKV.css → index-CcwAgVRi.css} +5 -6
  35. package/dist/renderer/assets/{infoDiagram-5YYISTIA-DL6XIxLz.js → infoDiagram-5YYISTIA-BlBUdqMb.js} +1 -1
  36. package/dist/renderer/assets/{ishikawaDiagram-YF4QCWOH-BUZLjRo-.js → ishikawaDiagram-YF4QCWOH-TeVytCrP.js} +1 -1
  37. package/dist/renderer/assets/{journeyDiagram-JHISSGLW-C4rH_mQM.js → journeyDiagram-JHISSGLW-BLZa3jnX.js} +4 -4
  38. package/dist/renderer/assets/{kanban-definition-UN3LZRKU-DRbrBcWV.js → kanban-definition-UN3LZRKU-foVxWrJn.js} +2 -2
  39. package/dist/renderer/assets/{layout-DZl4n4qu.js → layout-DOAlFUVb.js} +2 -2
  40. package/dist/renderer/assets/{linear-B0Krxg21.js → linear-BMBn6kVq.js} +1 -1
  41. package/dist/renderer/assets/{mindmap-definition-RKZ34NQL-DdmPsWrn.js → mindmap-definition-RKZ34NQL-5pGeNCcp.js} +3 -3
  42. package/dist/renderer/assets/{pieDiagram-4H26LBE5-BPZLqwG0.js → pieDiagram-4H26LBE5-N9aAUxfr.js} +3 -3
  43. package/dist/renderer/assets/{quadrantDiagram-W4KKPZXB-Dr-oWRk9.js → quadrantDiagram-W4KKPZXB-BPxbtjga.js} +2 -2
  44. package/dist/renderer/assets/{requirementDiagram-4Y6WPE33-B6QZd0lo.js → requirementDiagram-4Y6WPE33-CK1LrJyG.js} +3 -3
  45. package/dist/renderer/assets/{sankeyDiagram-5OEKKPKP-Cyl9ojEt.js → sankeyDiagram-5OEKKPKP-BNj7Sqii.js} +1 -1
  46. package/dist/renderer/assets/{sequenceDiagram-3UESZ5HK-D48Yr9T6.js → sequenceDiagram-3UESZ5HK-B-r7lNhI.js} +3 -3
  47. package/dist/renderer/assets/{stateDiagram-AJRCARHV-qyb8ETsa.js → stateDiagram-AJRCARHV-wrWE0MRa.js} +6 -6
  48. package/dist/renderer/assets/{stateDiagram-v2-BHNVJYJU-DmDOyyrJ.js → stateDiagram-v2-BHNVJYJU-CE-Lqo2d.js} +4 -4
  49. package/dist/renderer/assets/{timeline-definition-PNZ67QCA-C-KQxTi1.js → timeline-definition-PNZ67QCA-BkeMGH4J.js} +2 -2
  50. package/dist/renderer/assets/{vennDiagram-CIIHVFJN-BdaZlnH-.js → vennDiagram-CIIHVFJN-BTxVzto3.js} +1 -1
  51. package/dist/renderer/assets/{wardleyDiagram-YWT4CUSO-B2hBE-EE.js → wardleyDiagram-YWT4CUSO-D2r5dVGW.js} +2 -2
  52. package/dist/renderer/assets/{xychartDiagram-2RQKCTM6-CSvswDTY.js → xychartDiagram-2RQKCTM6-BHQdINVc.js} +2 -2
  53. package/dist/renderer/index.html +2 -2
  54. package/docs/RELEASE_NOTES_v1.5.1.md +382 -0
  55. package/docs/academic-demo.md +2 -1
  56. package/docs/theme-paradigm.md +141 -2
  57. package/package.json +1 -1
  58. package/src/main/index.ts +19 -5
  59. package/src/preload/index.ts +2 -2
  60. package/src/renderer/editor/editor.ts +40 -40
  61. package/src/renderer/editor/plugins/index.ts +18 -0
  62. package/src/renderer/editor/plugins/math-plugin.ts +8 -0
  63. package/src/renderer/editor/plugins/mermaid-plugin.ts +10 -0
  64. package/src/renderer/editor/plugins/themes/theme-manager.ts +41 -0
  65. package/src/renderer/main.ts +180 -83
  66. package/src/renderer/mobile.css +5 -6
  67. package/themes/README.md +18 -1
  68. package/themes/academic-paper-pt.css +1321 -0
  69. package/themes/academic-paper.css +192 -97
  70. package/tsconfig.renderer.tsbuildinfo +1 -1
  71. package/bytechain.cn-colamd-1.5.1-beta.2.tgz +0 -0
@@ -1,10 +1,90 @@
1
1
  /*
2
+ * ═══════════════════════════════════════════════════════════════
2
3
  * ColaMD 主题:Academic Paper (学术论文打印)
3
- * 配色:纯白底 + 纯黑正文 + 归藏暖色系 Mermaid
4
- * 格式:遵循中文学术论文排版规范(GB/T 7713)
5
- * 兼容:ColaMD (body.theme-custom) / Typora
6
- * 导入:Theme > Import Theme
7
- * @template: light
4
+ * ═══════════════════════════════════════════════════════════════
5
+ *
6
+ * 📋 基本信息
7
+ * ────────────────────────────────────────────────
8
+ * 配色方案:纯白底 + 纯黑正文 + 灰度 Mermaid 图表
9
+ * 排版规范:遵循中文学术论文排版规范(GB/T 7713)
10
+ * 兼容平台:ColaMD (body.theme-custom) / Typora / VSCode
11
+ * 导入方式:Theme > Import Theme
12
+ * 模板类型:@template: light (浅色主题)
13
+ *
14
+ * 🎨 设计特点
15
+ * ────────────────────────────────────────────────
16
+ * 1. 字体系统:
17
+ * - 正文:宋体 (SimSun) 小四号 16px
18
+ * - 标题:黑体 (SimHei) 三号~五号 22px~14px
19
+ * - 代码:Courier New 五号 14px
20
+ * - Mermaid:黑体 小五号 12px
21
+ *
22
+ * 2. 色彩系统:
23
+ * - 采用 10 级灰度色板(--gray-0 至 --gray-9)
24
+ * - 无彩色设计,确保打印/屏幕一致性
25
+ * - 符合 WCAG AAA 对比度标准(≥7:1)
26
+ *
27
+ * 3. 排版规范:
28
+ * - 页面尺寸:A4 (210mm × 297mm)
29
+ * - 页边距:上25mm 下25mm 左30mm 右25mm
30
+ * - 正文行距:1.5 倍,首行缩进 2em
31
+ * - 标题层级:h1(三号) → h2(四号) → h3/h4(小四号) → h5/h6(五号)
32
+ *
33
+ * ⚙️ 开发规范(必须遵守)
34
+ * ────────────────────────────────────────────────
35
+ * 【单位使用】
36
+ * ✅ 强制要求:所有字号、间距、边距统一使用 px 单位
37
+ * ✅ 偶数整数原则:px 值优先使用偶数(2, 4, 6, 8, ...)
38
+ * ❌ 禁止使用:pt 单位(会导致 PDF 导出时缩小 25%)
39
+ *
40
+ * 【转换公式】
41
+ * px = pt × (96/72) ≈ pt × 1.3333
42
+ * 示例:12pt → 16px, 10.5pt → 14px, 9pt → 12px
43
+ *
44
+ * 【常用值对照表】
45
+ * 中文字号 | pt | px (偶数) | 用途
46
+ * ─────────┼────┼──────────┼──────────
47
+ * 三号 | 16 | 22 | 一级标题(h1)
48
+ * 四号 | 14 | 18 | 二级标题(h2)
49
+ * 小四号 | 12 | 16 | 正文/三四级标题
50
+ * 五号 |10.5| 14 | 代码块/表格/图题
51
+ * 小五号 | 9 | 12 | Mermaid/脚注
52
+ *
53
+ * 【允许的非 px 单位】
54
+ * • mm:页面尺寸、页边距(如 max-width: 210mm)
55
+ * • em:相对字号(如 font-size: 0.88em 用于内联代码)
56
+ * • %:百分比宽度(如 width: 100%)
57
+ * • 无单位:零值(margin: 0)、行高倍率(line-height: 1.5)
58
+ *
59
+ * 【特殊例外】
60
+ * • 1px 边框:分割线、表格竖线等需最细效果时可保留奇数
61
+ *
62
+ * 🔧 验证方法
63
+ * ────────────────────────────────────────────────
64
+ * 1. 检查是否还有 pt 单位残留:
65
+ * grep -n "pt" academic-paper.css
66
+ * 预期结果:No matches found
67
+ *
68
+ * 2. 验证所有 px 值为偶数:
69
+ * grep -oP '\d+px' academic-paper.css | grep -vP '^[02468]px'
70
+ * 预期结果:仅少量 1px 边框
71
+ *
72
+ * 3. 导出 PDF 验证字号一致性:
73
+ * 屏幕显示字号 = PDF 导出后字号(无缩放损失)
74
+ *
75
+ * 📚 相关文档
76
+ * ────────────────────────────────────────────────
77
+ * • 范式定义:docs/theme-paradigm.md (v3.3)
78
+ * • 单位规范:docs/theme-paradigm.md Section 9
79
+ * • GB/T 7713:《科学技术报告、学位论文和学术论文的编写格式》
80
+ *
81
+ * 📅 版本信息
82
+ * ────────────────────────────────────────────────
83
+ * 最后更新:2026-05-23
84
+ * 主要变更:从 pt 单位全面迁移至 px 偶数整数单位系统
85
+ * 新增单位转换公式和验证清单
86
+ *
87
+ * ═══════════════════════════════════════════════════════════════
8
88
  */
9
89
 
10
90
  /* ── 1. 根变量 & 主题变量 ── */
@@ -77,9 +157,9 @@ body.theme-custom {
77
157
 
78
158
  /* 分割线 */
79
159
  --hr-color: var(--gray-9);
80
- /* Mermaid 全局字体:黑体 小五号 9pt(GB/T 7713 图表字),独立于正文 */
160
+ /* Mermaid 全局字体:黑体 小五号 12px(GB/T 7713 图表字),独立于正文 */
81
161
  --mermaid-font-family: "SimHei", "Heiti SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
82
- --mermaid-font-size: 9pt;
162
+ --mermaid-font-size: 12px;
83
163
  --mermaid-dark-mode: false;
84
164
  /* ═══ Mermaid 图表系统(印刷友好灰度) ═══ */
85
165
  /* 背景与边框 */
@@ -155,14 +235,14 @@ body.theme-custom {
155
235
  pre { --select-text-bg-color: rgba(0, 0, 0, 0.12); --select-text-font-color: var(--gray-9); }
156
236
 
157
237
  /* ── 2. 全局 ── */
158
- html { font-size: 12pt; -webkit-font-smoothing: antialiased; }
238
+ html { font-size: 16px; -webkit-font-smoothing: antialiased; }
159
239
 
160
240
  body.theme-custom, html, body {
161
241
  background-color: var(--gray-0);
162
242
  color: var(--gray-9);
163
243
  font-family: "SimSun", "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
164
244
  line-height: 1.5;
165
- font-size: 12pt;
245
+ font-size: 16px;
166
246
  }
167
247
 
168
248
  body.theme-custom { -webkit-font-smoothing: antialiased; }
@@ -178,10 +258,10 @@ body.theme-custom #editor { max-width: 210mm; margin: 0 auto; padding: 25mm 25mm
178
258
  body.theme-custom .mermaid-preview,
179
259
  .md-diagram-panel.md-mermaid { padding: 12px; margin: 1em 0; }
180
260
  body.theme-custom .mermaid-preview svg { max-width: 100% !important; height: auto !important; }
181
- body.theme-custom .mermaid-preview svg text { font-size: 9pt !important; }
182
- .md-diagram-panel.md-mermaid svg text { font-size: 9pt !important; }
183
- body.theme-custom .mermaid-preview svg .titleText { font-size: 10.5pt !important; }
184
- .md-diagram-panel.md-mermaid svg .titleText { font-size: 10.5pt !important; }
261
+ body.theme-custom .mermaid-preview svg text { font-size: 12px !important; }
262
+ .md-diagram-panel.md-mermaid svg text { font-size: 12px !important; }
263
+ body.theme-custom .mermaid-preview svg .titleText { font-size: 14px !important; }
264
+ .md-diagram-panel.md-mermaid svg .titleText { font-size: 14px !important; }
185
265
  }
186
266
 
187
267
  /* ── 3. 标题(GB/T 7713 学术论文规范) ── */
@@ -196,53 +276,53 @@ body.theme-custom h4, body.theme-custom h5, body.theme-custom h6 {
196
276
  font-family: "SimHei", "Heiti SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "Arial", sans-serif;
197
277
  }
198
278
 
199
- /* 一级标题(论文题目):黑体 三号 (16pt),居中,段前后各 1 行 */
279
+ /* 一级标题(论文题目):黑体 三号 (22px),居中,段前后各 1 行 */
200
280
  h1, body.theme-custom h1 {
201
- font-size: 16pt;
281
+ font-size: 22px;
202
282
  text-align: center;
203
- margin-top: 24pt;
204
- margin-bottom: 18pt;
283
+ margin-top: 32px;
284
+ margin-bottom: 24px;
205
285
  cursor: text;
206
286
  }
207
287
 
208
- /* 二级标题(一级节):黑体 四号 (14pt),左对齐,段前 1 行,段后 0.5 行 */
288
+ /* 二级标题(一级节):黑体 四号 (18px),左对齐,段前 1 行,段后 0.5 行 */
209
289
  h2, body.theme-custom h2 {
210
- font-size: 14pt;
211
- margin-top: 20pt;
212
- margin-bottom: 10pt;
290
+ font-size: 18px;
291
+ margin-top: 26px;
292
+ margin-bottom: 14px;
213
293
  cursor: text;
214
294
  }
215
295
 
216
- /* 三级标题(二级节):黑体 小四号 (12pt),左对齐,段前 0.5 行,段后 0.5 行 */
296
+ /* 三级标题(二级节):黑体 小四号 (16px),左对齐,段前 0.5 行,段后 0.5 行 */
217
297
  h3, body.theme-custom h3 {
218
- font-size: 12pt;
219
- margin-top: 14pt;
220
- margin-bottom: 7pt;
298
+ font-size: 16px;
299
+ margin-top: 18px;
300
+ margin-bottom: 10px;
221
301
  cursor: text;
222
302
  }
223
303
 
224
- /* 四级标题(三级节):黑体 小四号 (12pt),左对齐,段前 0.5 行 */
304
+ /* 四级标题(三级节):黑体 小四号 (16px),左对齐,段前 0.5 行 */
225
305
  h4, body.theme-custom h4 {
226
- font-size: 12pt;
227
- margin-top: 14pt;
228
- margin-bottom: 6pt;
306
+ font-size: 16px;
307
+ margin-top: 18px;
308
+ margin-bottom: 8px;
229
309
  cursor: text;
230
310
  }
231
311
 
232
312
  /* 五级标题 */
233
313
  h5, body.theme-custom h5 {
234
- font-size: 11pt;
235
- margin-top: 12pt;
236
- margin-bottom: 5pt;
314
+ font-size: 14px;
315
+ margin-top: 16px;
316
+ margin-bottom: 6px;
237
317
  cursor: text;
238
318
  }
239
319
 
240
- /* 六级标题:黑体 五号 10.5pt */
320
+ /* 六级标题:黑体 五号 14px */
241
321
  h6, body.theme-custom h6 {
242
- font-size: 10.5pt;
322
+ font-size: 14px;
243
323
  color: var(--gray-9);
244
- margin-top: 10pt;
245
- margin-bottom: 4pt;
324
+ margin-top: 14px;
325
+ margin-bottom: 6px;
246
326
  cursor: text;
247
327
  }
248
328
 
@@ -250,13 +330,13 @@ h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor,
250
330
  h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor { text-decoration: none; }
251
331
 
252
332
  /* ── 4. 内联元素 ── */
253
- /* 正文:宋体 小四号 (12pt),行距 1.5 倍,首行缩进 2 字符 */
333
+ /* 正文:宋体 小四号 (16px),行距 1.5 倍,首行缩进 2 字符 */
254
334
  body.theme-custom p, body.theme-custom #write > p {
255
335
  margin: 0;
256
336
  line-height: 1.5;
257
337
  text-align: justify;
258
338
  text-indent: 2em;
259
- font-size: 12pt;
339
+ font-size: 16px;
260
340
  }
261
341
  body.theme-custom p + p { margin-top: 0; }
262
342
 
@@ -284,18 +364,18 @@ del, s { color: var(--gray-7); }
284
364
 
285
365
  /* ── 5. 引用块(左缩进对齐正文,段前段后 0.5 行) ── */
286
366
  blockquote, body.theme-custom blockquote {
287
- margin: 8pt 0;
367
+ margin: 10px 0;
288
368
  padding: 10px 16px 10px 20px;
289
369
  border-left: 3px solid var(--gray-9);
290
370
  background: var(--gray-1);
291
371
  color: var(--gray-9);
292
372
  font-family: "SimSun", "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
293
- font-size: 10.5pt;
373
+ font-size: 14px;
294
374
  }
295
- blockquote p, body.theme-custom blockquote p { margin: 3pt 0; text-indent: 0; }
375
+ blockquote p, body.theme-custom blockquote p { margin: 4px 0; text-indent: 0; }
296
376
 
297
377
  /* ── 6. 分割线 ── */
298
- hr, body.theme-custom hr { border: none; border-top: 1px solid var(--gray-9); margin: 24pt 0; height: 0; }
378
+ hr, body.theme-custom hr { border: none; border-top: 1px solid var(--gray-9); margin: 32px 0; height: 0; }
299
379
 
300
380
  /* ── 7. 列表(GB/T 7713 学术论文规范) ── */
301
381
 
@@ -312,7 +392,7 @@ body.theme-custom #editor .ProseMirror > ul,
312
392
  body.theme-custom #editor .ProseMirror > ol,
313
393
  body.theme-custom #write > ul:first-of-type,
314
394
  body.theme-custom #write > ol:first-of-type {
315
- margin: 4pt 0 4pt 2em;
395
+ margin: 6px 0 6px 2em;
316
396
  padding-left: 1.5em;
317
397
  list-style: none;
318
398
  counter-reset: ol-lv1 ul-lv1;
@@ -330,11 +410,11 @@ body.theme-custom ol ol {
330
410
  body.theme-custom li {
331
411
  line-height: 1.6;
332
412
  font-family: "SimSun", "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
333
- font-size: 12pt;
413
+ font-size: 16px;
334
414
  font-weight: normal;
335
415
  text-indent: 0;
336
416
  list-style: none;
337
- padding: 1pt 0;
417
+ padding: 2px 0;
338
418
  }
339
419
 
340
420
  /* ::before 符号区域:统一 inline 模式,与文字同行基线 */
@@ -494,13 +574,13 @@ body.theme-custom code, body.theme-custom tt {
494
574
  /* ── 9. 代码块 ── */
495
575
  pre.md-fences {
496
576
  font-family: "Courier New", "Consolas", "Source Code Pro", monospace;
497
- font-size: 10.5pt;
577
+ font-size: 14px;
498
578
  line-height: 1.5;
499
579
  background: var(--gray-2);
500
580
  color: var(--gray-9);
501
581
  padding: 14px 18px;
502
582
  border-radius: 0;
503
- margin: 12pt 0;
583
+ margin: 16px 0;
504
584
  overflow-x: auto;
505
585
  border: 1px solid var(--gray-9);
506
586
  }
@@ -508,13 +588,13 @@ pre.md-fences code { background: transparent; color: inherit; padding: 0; margin
508
588
 
509
589
  body.theme-custom #editor .ProseMirror pre {
510
590
  font-family: "Courier New", "Consolas", "Source Code Pro", monospace;
511
- font-size: 10.5pt;
591
+ font-size: 14px;
512
592
  line-height: 1.5;
513
593
  background: var(--gray-2) !important;
514
594
  color: var(--gray-9) !important;
515
595
  padding: 14px 18px;
516
596
  border-radius: 0;
517
- margin: 12pt 0;
597
+ margin: 16px 0;
518
598
  overflow-x: auto;
519
599
  border: 1px solid var(--gray-9);
520
600
  }
@@ -525,7 +605,7 @@ body.theme-custom #editor .ProseMirror pre code {
525
605
  }
526
606
 
527
607
  /* ── 10. 代码语法高亮(黑白打印友好) ── */
528
- .cm-s-inner { font-family: "Courier New", "Consolas", "Source Code Pro", monospace; font-size: 10.5pt; line-height: 1.5; }
608
+ .cm-s-inner { font-family: "Courier New", "Consolas", "Source Code Pro", monospace; font-size: 14px; line-height: 1.5; }
529
609
 
530
610
  body.theme-custom .token.comment, body.theme-custom .token.prolog,
531
611
  body.theme-custom .token.doctype, body.theme-custom .token.cdata,
@@ -569,8 +649,8 @@ body.theme-custom .token.regex { color: var(--gray-8); }
569
649
  table, body.theme-custom table {
570
650
  width: 100%;
571
651
  border-collapse: collapse;
572
- margin: 14pt auto;
573
- font-size: 10.5pt;
652
+ margin: 18px auto;
653
+ font-size: 14px;
574
654
  line-height: 1.5;
575
655
  }
576
656
 
@@ -579,7 +659,7 @@ table th, body.theme-custom table th {
579
659
  background: var(--table-header-bg);
580
660
  font-weight: 700;
581
661
  color: var(--gray-9);
582
- padding: 6pt 8pt;
662
+ padding: 8px 10px;
583
663
  text-align: center;
584
664
  text-indent: 0;
585
665
  vertical-align: middle;
@@ -588,7 +668,7 @@ table th, body.theme-custom table th {
588
668
 
589
669
  /* 数据单元格:宋体 五号 左对齐 无首行缩进 */
590
670
  table td, body.theme-custom table td {
591
- padding: 6pt 8pt;
671
+ padding: 8px 10px;
592
672
  text-align: left;
593
673
  text-indent: 0;
594
674
  vertical-align: top;
@@ -610,11 +690,11 @@ table td p, body.theme-custom table td p {
610
690
  table ul, table ol,
611
691
  body.theme-custom table ul,
612
692
  body.theme-custom table ol {
613
- margin: 2pt 0;
693
+ margin: 2px 0;
614
694
  padding-left: 1.5em;
615
695
  }
616
696
  table li, body.theme-custom table li {
617
- margin: 1pt 0;
697
+ margin: 2px 0;
618
698
  padding-left: 0;
619
699
  font-size: inherit;
620
700
  }
@@ -632,15 +712,15 @@ table tr:hover td, body.theme-custom table tr:hover td {
632
712
  /* 顶线 + 表头底线 + 底线,无竖线 */
633
713
 
634
714
  body.theme-custom table {
635
- border-top: 1.5pt solid var(--gray-9);
636
- border-bottom: 1.5pt solid var(--gray-9);
715
+ border-top: 2px solid var(--gray-9);
716
+ border-bottom: 2px solid var(--gray-9);
637
717
  border-left: none;
638
718
  border-right: none;
639
719
  }
640
720
 
641
721
  body.theme-custom table th {
642
722
  border: none;
643
- border-bottom: 0.75pt solid var(--gray-9);
723
+ border-bottom: 1px solid var(--gray-9);
644
724
  background: transparent; /* 三线表标准:表头透明或极浅 */
645
725
  }
646
726
 
@@ -649,16 +729,18 @@ body.theme-custom table td {
649
729
  border-bottom: none;
650
730
  }
651
731
 
652
- /* ── 12. 图片(图题:宋体 五号 10.5pt,居中,位于图下方) ── */
732
+ /* ── 12. 图片(图题:宋体 五号 14px,居中,位于图下方) ── */
653
733
  img, body.theme-custom img { max-width: 100%; }
654
- p > img:only-child, body.theme-custom p > img:only-child { display: block; margin: 12pt auto; }
655
- body.theme-custom figure { margin: 12pt 0; text-align: center; }
734
+ p > img:only-child, body.theme-custom p > img:only-child { display: block; margin: 16px auto; }
735
+ body.theme-custom figure { margin: 16px 0; text-align: center; }
736
+ body.theme-custom .md-image-src { margin: 16px auto; display: block; }
656
737
  body.theme-custom figcaption {
657
738
  font-family: "SimSun", "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
658
- font-size: 10.5pt;
659
- color: var(--gray-9);
660
- margin-top: 6pt;
739
+ font-size: 14px;
740
+ line-height: 1.5;
661
741
  text-align: center;
742
+ color: var(--gray-9);
743
+ margin-top: 8px;
662
744
  }
663
745
 
664
746
  /* ── 13. 数学公式(纯黑白) ── */
@@ -667,7 +749,7 @@ body.theme-custom figcaption {
667
749
  body.theme-custom .math-block {
668
750
  background: var(--gray-0);
669
751
  padding: 12px 0;
670
- margin: 12pt 0;
752
+ margin: 16px 0;
671
753
  border-radius: 0;
672
754
  border: none;
673
755
  text-align: center;
@@ -690,13 +772,13 @@ body.theme-custom .math-inline .katex *,
690
772
 
691
773
  .md-diagram-panel { margin: 1.5em 0; }
692
774
 
693
- /* ── 14.0 图表备注(图题):宋体 五号 10.5pt,居中,GB/T 7713 ── */
694
- body.theme-custom .mermaid-block + p {
775
+ /* ── 14.0 图表备注(图题):宋体 五号 14px,居中,GB/T 7713 ── */
776
+ body.theme-custom .md-filename {
695
777
  font-family: "SimSun", "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
696
- font-size: 10.5pt;
697
- text-align: center;
778
+ font-size: 14px;
698
779
  color: var(--gray-9);
699
- margin-top: 6pt;
780
+ text-align: center;
781
+ margin-top: 8px;
700
782
  }
701
783
 
702
784
  body.theme-custom .mermaid-block {
@@ -719,11 +801,11 @@ body.theme-custom .mermaid-preview { background: transparent; border: none; padd
719
801
  .md-diagram-panel.md-mermaid svg,
720
802
  body.theme-custom .mermaid-preview svg { max-width: 100%; height: auto; }
721
803
 
722
- /* ── 14.1 全局字体:黑体 小五号 9pt(GB/T 7713 图表字),独立于正文 ── */
804
+ /* ── 14.1 全局字体:黑体 小五号 12px(GB/T 7713 图表字),独立于正文 ── */
723
805
  body.theme-custom .mermaid-preview svg text,
724
806
  body.theme-custom .mermaid-preview svg tspan {
725
807
  font-family: "SimHei", "Heiti SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif !important;
726
- font-size: 9pt !important;
808
+ font-size: 12px !important;
727
809
  fill: var(--mermaid-node-text) !important;
728
810
  }
729
811
  body.theme-custom .mermaid-preview svg foreignObject span,
@@ -732,12 +814,12 @@ body.theme-custom .mermaid-preview svg foreignObject div,
732
814
  body.theme-custom .mermaid-preview svg .nodeLabel span,
733
815
  body.theme-custom .mermaid-preview svg .edgeLabel span {
734
816
  font-family: "SimHei", "Heiti SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif !important;
735
- font-size: 9pt !important;
817
+ font-size: 12px !important;
736
818
  color: var(--mermaid-node-text) !important;
737
819
  }
738
820
  body.theme-custom .mermaid-preview svg .titleText,
739
821
  body.theme-custom .mermaid-preview svg .pieTitleText {
740
- font-size: 9pt !important;
822
+ font-size: 12px !important;
741
823
  fill: var(--mermaid-title-text) !important;
742
824
  }
743
825
 
@@ -1105,7 +1187,7 @@ body.theme-custom .mermaid-source {
1105
1187
  border: 1px solid var(--mermaid-node-stroke);
1106
1188
  border-radius: 0;
1107
1189
  padding: 12px;
1108
- font-size: 10.5pt;
1190
+ font-size: 14px;
1109
1191
  font-family: "Courier New", "Consolas", monospace;
1110
1192
  color: var(--text-color);
1111
1193
  background: var(--surface-color);
@@ -1118,21 +1200,21 @@ body.theme-custom .mermaid-source:focus {
1118
1200
  border-color: var(--mermaid-node-text);
1119
1201
  }
1120
1202
 
1121
- /* ── 15. 脚注(小五号 9pt) ── */
1203
+ /* ── 15. 脚注(小五号 12px) ── */
1122
1204
  body.theme-custom .footnotes {
1123
1205
  font-family: "SimSun", "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
1124
- font-size: 9pt;
1206
+ font-size: 12px;
1125
1207
  color: var(--gray-9);
1126
- margin-top: 24pt;
1208
+ margin-top: 32px;
1127
1209
  border-top: 1px solid var(--gray-9);
1128
- padding-top: 12pt;
1210
+ padding-top: 16px;
1129
1211
  }
1130
1212
 
1131
1213
  /* ── 15.1 摘要(黑体 五号,"摘要:"加粗,内容宋体 五号) ── */
1132
1214
  body.theme-custom p:has(strong):first-of-type,
1133
1215
  body.theme-custom #write > p:first-child strong {
1134
1216
  font-family: "SimHei", "Heiti SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
1135
- font-size: 10.5pt;
1217
+ font-size: 14px;
1136
1218
  font-weight: 700;
1137
1219
  }
1138
1220
 
@@ -1140,14 +1222,14 @@ body.theme-custom #write > p:first-child strong {
1140
1222
  body.theme-custom .references,
1141
1223
  body.theme-custom [class*="reference"] {
1142
1224
  font-family: "SimSun", "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
1143
- font-size: 9pt;
1225
+ font-size: 12px;
1144
1226
  line-height: 1.5;
1145
1227
  }
1146
1228
  body.theme-custom .references li,
1147
1229
  body.theme-custom [class*="reference"] li {
1148
1230
  text-indent: -2em;
1149
1231
  padding-left: 2em;
1150
- margin-bottom: 4pt;
1232
+ margin-bottom: 6px;
1151
1233
  }
1152
1234
 
1153
1235
  /* ── 16. 打印优化(GB/T 7713 页面设置,力求与屏幕显示一致) ── */
@@ -1159,7 +1241,7 @@ body.theme-custom [class*="reference"] li {
1159
1241
  @bottom-center {
1160
1242
  content: counter(page);
1161
1243
  font-family: "SimSun", "Songti SC", serif;
1162
- font-size: 9pt;
1244
+ font-size: 12px;
1163
1245
  color: var(--gray-9);
1164
1246
  }
1165
1247
  }
@@ -1167,7 +1249,7 @@ body.theme-custom [class*="reference"] li {
1167
1249
  html, body {
1168
1250
  background: var(--gray-0) !important;
1169
1251
  color: var(--gray-9) !important;
1170
- font-size: 12pt !important;
1252
+ font-size: 20px !important; /* 基础字号:16px × 1.63 ≈ 12.25pt(PDF导出专用)*/
1171
1253
  line-height: 1.5 !important;
1172
1254
  -webkit-print-color-adjust: exact !important;
1173
1255
  print-color-adjust: exact !important;
@@ -1189,16 +1271,28 @@ body.theme-custom [class*="reference"] li {
1189
1271
  margin: 0 !important;
1190
1272
  }
1191
1273
 
1192
- /* ── 标题保持黑体 ── */
1274
+ /* ── 标题保持黑体,强制指定字号 ── */
1193
1275
  h1, h2, h3, h4, h5, h6 {
1194
1276
  font-family: "SimHei", "Heiti SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif !important;
1195
1277
  color: var(--gray-9) !important;
1196
1278
  }
1197
-
1198
- /* ── 正文保留宋体首行缩进 ── */
1279
+ /* 强制标题字号(PDF导出专用补偿值,屏幕显示不受影响) */
1280
+ h1 { font-size: 26px !important; } /* 三号:22px × 1.63 ≈ 16pt */
1281
+ h2 { font-size: 22px !important; } /* 四号:18px × 1.63 ≈ 13.5pt */
1282
+ h3 { font-size: 20px !important; } /* 小四号:16px × 1.63 ≈ 12.25pt */
1283
+ h4 { font-size: 20px !important; } /* 小四号:同上 */
1284
+ h5 { font-size: 18px !important; } /* 五号:14px × 1.63 ≈ 11pt */
1285
+ h6 { font-size: 18px !important; } /* 五号:同上 */
1286
+
1287
+ /* ── 正文保留宋体首行缩进,强制字号 ── */
1199
1288
  p {
1200
1289
  font-family: "SimSun", "Songti SC", "Source Han Serif SC", "Noto Serif SC", serif !important;
1201
1290
  color: var(--gray-9) !important;
1291
+ font-size: 20px !important; /* 小四号:16px × 1.63 ≈ 12.25pt(PDF导出专用)*/
1292
+ text-indent: 2em !important; /* 首行缩进2字符 */
1293
+ line-height: 1.5 !important;
1294
+ text-align: justify !important;
1295
+ margin: 0 !important;
1202
1296
  }
1203
1297
 
1204
1298
  /* ── 链接 ── */
@@ -1213,7 +1307,7 @@ body.theme-custom [class*="reference"] li {
1213
1307
  background: var(--gray-1) !important;
1214
1308
  border-left: 3px solid var(--gray-9) !important;
1215
1309
  color: var(--gray-9) !important;
1216
- font-size: 10.5pt !important;
1310
+ font-size: 18px !important; /* 五号:14px × 1.63 ≈ 11pt(PDF导出专用)*/
1217
1311
  }
1218
1312
 
1219
1313
  /* ── 内联代码(无边框,浅灰底) ── */
@@ -1224,6 +1318,7 @@ body.theme-custom [class*="reference"] li {
1224
1318
  border-radius: 0 !important;
1225
1319
  padding: 1px 6px !important;
1226
1320
  font-family: "Courier New", "Consolas", monospace !important;
1321
+ font-size: 18px !important; /* 五号:14px × 1.63 ≈ 11pt(PDF导出专用)*/
1227
1322
  }
1228
1323
 
1229
1324
  /* ── 代码块(浅灰底,直角,无边框) ── */
@@ -1232,7 +1327,7 @@ body.theme-custom [class*="reference"] li {
1232
1327
  color: var(--gray-9) !important;
1233
1328
  border: none !important;
1234
1329
  border-radius: 0 !important;
1235
- font-size: 10.5pt !important;
1330
+ font-size: 18px !important; /* 五号:14px × 1.63 ≈ 11pt(PDF导出专用)*/
1236
1331
  line-height: 1.5 !important;
1237
1332
  font-family: "Courier New", "Consolas", monospace !important;
1238
1333
  }
@@ -1245,15 +1340,15 @@ body.theme-custom [class*="reference"] li {
1245
1340
  /* ── 表格:三线表(顶线 + 表头底线 + 底线),无竖线 ── */
1246
1341
  table {
1247
1342
  border-collapse: collapse !important;
1248
- border-top: 1.5pt solid var(--gray-9) !important;
1249
- border-bottom: 1.5pt solid var(--gray-9) !important;
1343
+ border-top: 2px solid var(--gray-9) !important;
1344
+ border-bottom: 2px solid var(--gray-9) !important;
1250
1345
  border-left: none !important;
1251
1346
  border-right: none !important;
1252
- font-size: 10.5pt !important;
1347
+ font-size: 18px !important; /* 五号:14px × 1.63 ≈ 11pt(PDF导出专用)*/
1253
1348
  }
1254
1349
  table th {
1255
1350
  border: none !important;
1256
- border-bottom: 0.75pt solid var(--gray-9) !important;
1351
+ border-bottom: 2px solid var(--gray-9) !important;
1257
1352
  background: transparent !important; /* 三线表标准:表头透明 */
1258
1353
  -webkit-print-color-adjust: exact !important;
1259
1354
  print-color-adjust: exact !important;
@@ -1291,7 +1386,7 @@ body.theme-custom [class*="reference"] li {
1291
1386
  }
1292
1387
  body.theme-custom .mermaid-block + p {
1293
1388
  font-family: "SimSun", "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, serif !important;
1294
- font-size: 10.5pt !important;
1389
+ font-size: 18px !important; /* 五号:14px × 1.63 ≈ 11pt(PDF导出专用)*/
1295
1390
  text-align: center !important;
1296
1391
  color: var(--gray-9) !important;
1297
1392
  }
@@ -1299,7 +1394,7 @@ body.theme-custom [class*="reference"] li {
1299
1394
  /* ── 脚注与参考文献 ── */
1300
1395
  .footnotes {
1301
1396
  border-top: 1px solid var(--gray-9) !important;
1302
- font-size: 9pt !important;
1397
+ font-size: 14px !important; /* 小五号:9px × 1.63 ≈ 8.6pt(PDF导出专用)*/
1303
1398
  }
1304
1399
 
1305
1400
  h1 { page-break-before: avoid; }
@@ -1314,7 +1409,7 @@ body.theme-custom { scrollbar-width: auto; scrollbar-color: var(--gray-8); }
1314
1409
  /* ── 18. 源码编辑模式 ── */
1315
1410
  body.theme-custom #source-editor {
1316
1411
  font-family: "Courier New", "Consolas", "Source Code Pro", monospace;
1317
- font-size: 12pt;
1412
+ font-size: 16px;
1318
1413
  line-height: 1.5;
1319
1414
  background: var(--gray-0);
1320
1415
  color: var(--gray-9);