Skip to content

Commit

Permalink
2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
LeafYeeXYZ committed Jul 12, 2024
1 parent 119347b commit f067c3a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 25 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ mdp
```

## 更新日志
- `2.1.1` (2024-07-12): 修复字体错误
- `2.1.0` (2024-06-26): 支持 `MacOS` 系统, 改为在线加载字体
- `2.0.0` (2024-06-20): 重构代码, 完善模板功能
- `1.4.0` (2024-05-29): 新增替换中英文标点符号功能
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "markdown-paper",
"type": "module",
"version": "2.1.0",
"version": "2.1.1",
"author": {
"name": "LeafYeeXYZ",
"email": "[email protected]"
Expand Down
34 changes: 17 additions & 17 deletions theme/aps/aps.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
* {
font-family: 'Noto Serif', 'Noto Serif SC'; /* 所有数字和英文字体都用 Times New Roman */
font-family: 'Times', 'Times New Roman', '宋体', 'SimSun', '华文宋体', 'STSong'; /* 所有数字和英文字体都用 Times New Roman */
line-height: 1.55em; /* 1.5倍行距 */
margin: 0;
}

h1 { /* 中文题目: 二号黑体 */
font-size: 29px;
font-weight: 500;
font-family: 'Noto Sans SC';
font-weight: normal;
font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
text-align: center;
margin-bottom: 9px;
}
.author { /* 作者姓名: 四号仿宋 */
font-size: 18px;
font-weight: 300;
font-family: 'Noto Serif SC';
font-weight: normal;
font-family: '仿宋', 'Fangsong', '华文仿宋', 'STFangsong';
text-align: center;
margin-bottom: 3px;
}
Expand All @@ -29,8 +29,8 @@ h1 { /* 中文题目: 二号黑体 */
padding: 0 28px;
&::before {
content: '摘 要';
font-weight: 500;
font-family: 'Noto Sans SC';
font-weight: normal;
font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
display: inline-block;
margin-right: 14px;
}
Expand All @@ -41,8 +41,8 @@ h1 { /* 中文题目: 二号黑体 */
padding: 0 28px;
&::before {
content: '关键词';
font-weight: 500;
font-family: 'Noto Sans SC';
font-weight: normal;
font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
display: inline-block;
margin-right: 14px;
}
Expand All @@ -55,14 +55,14 @@ h2 { /* 一级标题: 四号宋体 */
}
h3 { /* 二级标题: 五号黑体 */
font-size: 14px;
font-weight: 500;
font-family: 'Noto Sans SC';
font-weight: normal;
font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
margin: 5px 0;
}
h4 { /* 三级标题: 五号黑体 */
font-size: 14px;
font-weight: 500;
font-family: 'Noto Sans SC';
font-weight: normal;
font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
margin: 3px 0;
}

Expand All @@ -74,8 +74,8 @@ p { /* 正文: 五号宋体 */

h5 { /* "参考文献": 五号黑体 */
font-size: 14px;
font-weight: 500;
font-family: 'Noto Sans SC';
font-weight: normal;
font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
text-align: center;
margin-bottom: 7px;
margin-top: 20px;
Expand Down Expand Up @@ -132,6 +132,6 @@ table { /* 表格: 小五号宋体 */
}

b, strong { /* 加粗按黑体处理 */
font-weight: 500;
font-family: 'Noto Sans SC';
font-weight: normal;
font-family: '黑体', 'SimHei', '华文黑体', 'STHeiti';
}
14 changes: 7 additions & 7 deletions theme/aps/aps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ export class APS extends Theme {
// 把包裹图片的 p 标签去掉
html = html.replace(/<p><img (.*?)><\/p>/g, '<img $1>')
// 加载字体
html = html.replace(/<\/head>/, `
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:[email protected]&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:[email protected]&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif:[email protected]&display=swap" rel="stylesheet">
`)
// html = html.replace(/<\/head>/, `
// <link rel="preconnect" href="https://fonts.googleapis.com">
// <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
// <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:[email protected]&display=swap" rel="stylesheet">
// <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:[email protected]&display=swap" rel="stylesheet">
// <link href="https://fonts.googleapis.com/css2?family=Noto+Serif:[email protected]&display=swap" rel="stylesheet">
// `)
return html
}

Expand Down

0 comments on commit f067c3a

Please sign in to comment.