markdown-paper 2.1.0 → 2.1.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.
package/README.md CHANGED
@@ -67,6 +67,7 @@ mdp
67
67
  ```
68
68
 
69
69
  ## 更新日志
70
+ - `2.1.1` (2024-07-12): 修复字体错误
70
71
  - `2.1.0` (2024-06-26): 支持 `MacOS` 系统, 改为在线加载字体
71
72
  - `2.0.0` (2024-06-20): 重构代码, 完善模板功能
72
73
  - `1.4.0` (2024-05-29): 新增替换中英文标点符号功能
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "markdown-paper",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "author": {
6
6
  "name": "LeafYeeXYZ",
7
7
  "email": "xiaoyezi@leafyee.xyz"
package/theme/aps/aps.css CHANGED
@@ -1,20 +1,20 @@
1
1
  * {
2
- font-family: 'Noto Serif', 'Noto Serif SC'; /* 所有数字和英文字体都用 Times New Roman */
2
+ font-family: 'Times', 'Times New Roman', '宋体', 'SimSun', '华文宋体', 'STSong'; /* 所有数字和英文字体都用 Times New Roman */
3
3
  line-height: 1.55em; /* 1.5倍行距 */
4
4
  margin: 0;
5
5
  }
6
6
 
7
7
  h1 { /* 中文题目: 二号黑体 */
8
8
  font-size: 29px;
9
- font-weight: 500;
10
- font-family: 'Noto Sans SC';
9
+ font-weight: normal;
10
+ font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
11
11
  text-align: center;
12
12
  margin-bottom: 9px;
13
13
  }
14
14
  .author { /* 作者姓名: 四号仿宋 */
15
15
  font-size: 18px;
16
- font-weight: 300;
17
- font-family: 'Noto Serif SC';
16
+ font-weight: normal;
17
+ font-family: '仿宋', 'Fangsong', '华文仿宋', 'STFangsong';
18
18
  text-align: center;
19
19
  margin-bottom: 3px;
20
20
  }
@@ -29,8 +29,8 @@ h1 { /* 中文题目: 二号黑体 */
29
29
  padding: 0 28px;
30
30
  &::before {
31
31
  content: '摘 要';
32
- font-weight: 500;
33
- font-family: 'Noto Sans SC';
32
+ font-weight: normal;
33
+ font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
34
34
  display: inline-block;
35
35
  margin-right: 14px;
36
36
  }
@@ -41,8 +41,8 @@ h1 { /* 中文题目: 二号黑体 */
41
41
  padding: 0 28px;
42
42
  &::before {
43
43
  content: '关键词';
44
- font-weight: 500;
45
- font-family: 'Noto Sans SC';
44
+ font-weight: normal;
45
+ font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
46
46
  display: inline-block;
47
47
  margin-right: 14px;
48
48
  }
@@ -55,14 +55,14 @@ h2 { /* 一级标题: 四号宋体 */
55
55
  }
56
56
  h3 { /* 二级标题: 五号黑体 */
57
57
  font-size: 14px;
58
- font-weight: 500;
59
- font-family: 'Noto Sans SC';
58
+ font-weight: normal;
59
+ font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
60
60
  margin: 5px 0;
61
61
  }
62
62
  h4 { /* 三级标题: 五号黑体 */
63
63
  font-size: 14px;
64
- font-weight: 500;
65
- font-family: 'Noto Sans SC';
64
+ font-weight: normal;
65
+ font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
66
66
  margin: 3px 0;
67
67
  }
68
68
 
@@ -74,8 +74,8 @@ p { /* 正文: 五号宋体 */
74
74
 
75
75
  h5 { /* "参考文献": 五号黑体 */
76
76
  font-size: 14px;
77
- font-weight: 500;
78
- font-family: 'Noto Sans SC';
77
+ font-weight: normal;
78
+ font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
79
79
  text-align: center;
80
80
  margin-bottom: 7px;
81
81
  margin-top: 20px;
@@ -132,6 +132,6 @@ table { /* 表格: 小五号宋体 */
132
132
  }
133
133
 
134
134
  b, strong { /* 加粗按黑体处理 */
135
- font-weight: 500;
136
- font-family: 'Noto Sans SC';
135
+ font-weight: normal;
136
+ font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
137
137
  }
package/theme/aps/aps.ts CHANGED
@@ -52,13 +52,13 @@ export class APS extends Theme {
52
52
  // 把包裹图片的 p 标签去掉
53
53
  html = html.replace(/<p><img (.*?)><\/p>/g, '<img $1>')
54
54
  // 加载字体
55
- html = html.replace(/<\/head>/, `
56
- <link rel="preconnect" href="https://fonts.googleapis.com">
57
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
58
- <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@200..900&display=swap" rel="stylesheet">
59
- <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200..900&display=swap" rel="stylesheet">
60
- <link href="https://fonts.googleapis.com/css2?family=Noto+Serif:wght@200..900&display=swap" rel="stylesheet">
61
- `)
55
+ // html = html.replace(/<\/head>/, `
56
+ // <link rel="preconnect" href="https://fonts.googleapis.com">
57
+ // <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
58
+ // <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@200..900&display=swap" rel="stylesheet">
59
+ // <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200..900&display=swap" rel="stylesheet">
60
+ // <link href="https://fonts.googleapis.com/css2?family=Noto+Serif:wght@200..900&display=swap" rel="stylesheet">
61
+ // `)
62
62
  return html
63
63
  }
64
64