Skip to content

Commit ccd01ae

Browse files
authored
unofficial-sdu-thesis:1.0.0 (typst#2449)
1 parent a92a6aa commit ccd01ae

28 files changed

+1707
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Groove (groovewjh@foxmail.com)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# 山东大学本科毕业论文(设计)typst模板
2+
3+
<p align="center", >
4+
<a href="https://typst.app/universe/package/unofficial-sdu-thesis"><img src="https://img.shields.io/badge/version-1.0.0-3230E3?style=for-the-badge" alt="Typst Package"></a>
5+
<a href="https://github.com/GrooveWJH/unofficial-sdu-thesis/blob/main/src/latest/LICENSE"><img src="https://img.shields.io/badge/license-MIT-red?style=for-the-badge" alt="MIT License"></a>
6+
</p>
7+
8+
> 山东大学本科毕业论文(设计)typst模板,带来超越word与tex的体验,助你轻松编辑,简洁书写。
9+
> 如果这帮到了你,阁下不妨点击⭐️作为激励
10+
11+
- Typst 非官方中文交流群:793548390
12+
- **如遇到任何问题或需求,请联系GG:** _`groovewjh@foxmail.com`_,或提交[issue](https://github.com/GrooveWJH/unofficial-sdu-thesis/issues)
13+
14+
## 更新日志
15+
16+
| 版本 | 描述 |
17+
| ----- | ----------------------------------------------------------------------------------------------------------------------- |
18+
| 0.1.0 | 完成基本模板,留存小部分未完善或未修复的问题。 |
19+
| 0.2.0 | 完善附录页图表序号,修复示例与删除部分多余无用代码,修复公式序号问题,修复表格行间距与块间距问题,加入local本地安装脚本 |
20+
| 0.2.1 | 修复图表排序计数器章节不重置的bug,删去了页码在附录页的显示,调整了页码字体颜色 |
21+
| 0.2.2 | 增加目录页码,修复keyword后的冒号字形bug,更新了table实现方式:colnum参数置为无效。更新了示例文件。 |
22+
| 1.0.0 | 将调整列表形式的缩进;修改有序列表数字编码为①符号;修复部分一级标题未粗体bug;加入匿名模式,开启后隐全局隐藏导师姓名。 |
23+
24+
## 优势
25+
26+
- **✅山大论文格式检查系统论无忧通过**
27+
- **易于LaTex,没有复杂起手式**
28+
- **无需浪费过多心思于格式,专注编辑**
29+
- **目录自动实时排序**
30+
- **引用符合gb-7714-2015格式,自动排序,轻松引用**
31+
- **图表编号自动排序,简单管理,快速引用与设置跳转**
32+
- **基于类的样式编辑,二次开发简易**
33+
34+
## 开发预览
35+
36+
![cover](https://img.z4a.net/images/2025/03/19/cover.png)
37+
38+
### 快速预览
39+
40+
请参考[github仓库](https://github.com/GrooveWJH/unofficial-sdu-thesis)内容
41+
42+
- [thesis.typ](https://github.com/GrooveWJH/unofficial-sdu-thesis/blob/main/src/latest/template/thesis.typ):示例代码
43+
- [thesis.pdf](https://github.com/GrooveWJH/unofficial-sdu-thesis/blob/main/src/latest/template/thesis.pdf):由示例代码生成PDF
44+
45+
实际上,理想的情况下,你几乎只需要修改 `thesis.typ`文件即可完成你的工作。
46+
47+
## 使用
48+
49+
### 初次使用typst
50+
51+
请浏览[typst官网](https://typst.app/docs/)[typst文档](https://typst.app/docs/)(或[非官方简中版本](https://typst-doc-cn.github.io/docs/)) ,以掌握初步的typst语法知识。
52+
53+
### 推荐编辑方式
54+
55+
- [Visual Studio Code](https://visualstudio.microsoft.com/) + [Tinymist Typst](https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist),推荐使用此种方式。
56+
- [Typst app](https://typst.app/universe/package/unofficial-sdu-thesis) -> Start from a template, 快速由Typst Template创建以体验此模板,由于Typst app对中文字体支持未完善,因此建议预览体验后使用本地编辑完成您的工作。
57+
58+
### 本地安装
59+
60+
由于从代码完成到typst packages发布中间需要间隔大约24h,因此为了时刻获得最新版本,请参照以下方法完成本地安装
61+
62+
```shell
63+
git clone https://github.com/GrooveWJH/unofficial-sdu-thesis.git
64+
cd ./unofficial-sdu-thesis
65+
66+
# linux / macOS
67+
sudo bash ./local_install.sh
68+
69+
# windows
70+
.\local_install.sh
71+
```
72+
73+
此后,即可将 `@preview/unofficial-sdu-thesis`替换为 `@local/unofficial-sdu-thesis`
74+
75+
自行查阅
76+
77+
## 各部分简要示例
78+
79+
> 此示例未包含正文之后的部分及图表应用,相关使用仍请务必参考[thesis.typ](https://github.com/GrooveWJH/unofficial-sdu-thesis/blob/main/src/latest/template/thesis.typ)[thesis.pdf](https://github.com/GrooveWJH/unofficial-sdu-thesis/blob/main/src/latest/template/thesis.pdf)
80+
81+
```
82+
// 使用typst packages库
83+
#import "@preview/unofficial-sdu-thesis:1.0.0": * //上一版本为0.2.2
84+
// 如果是本地安装,则使用
85+
// #import "@local/unofficial-sdu-thesis:1.0.0": *
86+
// 如果是源码调试,则使用
87+
// #import "../lib.typ": *
88+
89+
#let (
90+
info,
91+
doc,
92+
cover,
93+
declare,
94+
appendix,
95+
outline,
96+
mainmatter,
97+
conclusion,
98+
abstract,
99+
bib,
100+
acknowledgement,
101+
under-cover,
102+
) = documentclass(
103+
info: (
104+
title: "XXXX毕业论文",
105+
name: "渐入佳境Groove",
106+
id: "20XX008XXXXX",
107+
school: "XXXX学院",
108+
major: "人工智能",
109+
grade: "20XX级",
110+
mentor: "XXX",
111+
time: "20XX年X月XX日",
112+
),
113+
// 此项控制是否开启匿名模式,开启后自动匹配全文范围的导师名MENTORNAME,替换为****
114+
if-mentor-anonymous: false
115+
)
116+
117+
#show: doc
118+
#cover()
119+
#abstract(
120+
body: [
121+
摘要
122+
],
123+
keywords: ("关键词1", "关键词2"),
124+
body-en: [
125+
dissertation
126+
],
127+
keywords-en: ("dissertation", "dissertation format"),
128+
)
129+
#outline()
130+
131+
#set heading(numbering: "1.1")
132+
#counter(page).update(1)
133+
#show: mainmatter
134+
135+
= 绪#h(2em)论
136+
137+
== 二级标题
138+
山東大學本科畢業論文(設計)Typst模板。
139+
=== 三级标题
140+
许多年后奥雷里亚诺·布恩迪亚上校站在行刑队面前,准会想起父亲带他去见识冰块的那个遥远的下午。
141+
142+
Many years later, as he faced the firing squad, Colonel Aureliano Buendía was to remember that distant afternoon when his father took him to discover ice.
143+
= 本科毕业论文写作规范
144+
145+
== 二级标题
146+
本组织...
147+
148+
=== 三级标题
149+
本文将...
150+
151+
= 总结与展望
152+
总结全文并展望。主要撰写论文工作的结论、创新点、不足之处、进一步研究展望等内容,不宜插入图表。
153+
154+
// 文献引用 使用前请确保存在ref.bib文件,相关内容请查阅BibTeX
155+
#bib(bibfunc: bibliography("ref.bib"))
156+
157+
// 致谢
158+
#acknowledgement()[
159+
感谢。
160+
]
161+
// 附录
162+
#show: appendix
163+
= 附#h(2em)录
164+
== 附图示例
165+
参考template.typ文件
166+
#pagebreak()
167+
== 附表示例
168+
参考template.typ文件
169+
```
170+
171+
## 特性 / 路线图
172+
173+
- 模板
174+
- [X] 本科生模板
175+
- [X] 封面
176+
- [X] 中文摘要
177+
- [X] 英文摘要
178+
- [X] 目录页
179+
- [X] 致谢
180+
- [X] 引用
181+
- 编号
182+
- [X] 正文-关联章节图表编号
183+
- [X] 附录-无关联图表编号 (开发中)
184+
- 全局配置
185+
- [X] 类似 LaTeX 中的 documentclass 的全局信息配置
186+
- [X] 盲审模式,将导师信息替换为****
187+
- [ ] 双面模式,会加入空白页,便于打印
188+
- [X] 自定义字体配置,可以配置「宋体」、「黑体」与「楷体」等字体对应的具体字体, 参见 `styles/fonts.typ`
189+
- [X] 数学字体配置:模板不提供配置,用户可以自己使用 #show math.equation: set text(font: "Fira Math")
190+
- [ ] 自定义图表旋转

0 commit comments

Comments
 (0)