Skip to content

Commit 6f016b0

Browse files
committed
unofficial-ouc-bachelor-thesis:0.1.0
1 parent 8ba3f78 commit 6f016b0

27 files changed

Lines changed: 739 additions & 0 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pdf
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 hongjr03
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 all
13+
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 THE
21+
SOFTWARE.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# (非官方)中国海洋大学本科毕业论文 Typst 模板
2+
3+
基于 [Typst](https://typst.app/) 编写的中国海洋大学本科毕业论文模板。
4+
5+
## 效果预览
6+
7+
以下是本模板渲染后的论文效果展示。所有预览图片可通过 `examples` 文件夹查看。
8+
9+
<p align="center">
10+
<img src="examples/1.png" width="24%" alt="封面" />
11+
<img src="examples/2.png" width="24%" alt="中文摘要" />
12+
<img src="examples/3.png" width="24%" alt="目录" />
13+
<img src="examples/4.png" width="24%" alt="正文" />
14+
</p>
15+
16+
<p align="center">
17+
<img src="examples/5.png" width="24%" alt="封面" />
18+
<img src="examples/6.png" width="24%" alt="中文摘要" />
19+
<img src="examples/8.png" width="24%" alt="目录" />
20+
<img src="examples/9.png" width="24%" alt="正文" />
21+
</p>
22+
23+
## 快速开始
24+
25+
首先需要通过 `project.with` 注入论文的基础信息:
26+
27+
```typst
28+
#import "template.typ": project, bibliography, acknowledgments
29+
30+
#show: project.with(
31+
title: (
32+
zh: "您的论文中文标题",
33+
en: "Your Thesis English Title",
34+
),
35+
author: "您的姓名",
36+
student-id: "学号",
37+
advisor: "指导教师",
38+
college: "学院名称",
39+
department: "专业及年级",
40+
abstract-content: (
41+
zh: [ 中文摘要正文... ],
42+
en: [ English abstract text... ],
43+
),
44+
keywords: (
45+
zh: ("中文关键字1", "关键字2"),
46+
en: ("Keyword1", "Keyword2"),
47+
),
48+
)
49+
50+
// =========
51+
// 正文写作部分
52+
// =========
53+
= 引言
54+
...
55+
```
56+
57+
## 目录结构
58+
59+
如果需要对模板样式进行深度定制,可以了解本模板的结构划分:
60+
61+
```text
62+
.
63+
├── typst.toml # 包的元数据信息
64+
├── main.typ # 示例论文
65+
├── template.typ # (核心) 模板导出中心组件,暴露黑盒接口
66+
├── references.bib # 示例参考文献 BibTeX 数据库
67+
├── components/ # 页面排版组件:封面、摘要、目录、致谢等
68+
├── utils/ # 工具类:字体处理、页码/标题编号、内置三线表等
69+
├── assets/ # 核心静态资源库(如校徽 Logo 等)
70+
└── README.md
71+
```
72+
73+
## 许可证
74+
75+
本项目使用 [MIT License](LICENSE) 开源许可证。
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#import "@preview/pointless-size:0.1.2": zh
2+
3+
#let abstract(
4+
title: (:),
5+
abstract: (:),
6+
keywords: (:),
7+
fonts: (:),
8+
) = {
9+
set heading(numbering: none, bookmarked: false, outlined: false)
10+
page({
11+
heading(level: 1, title.zh)
12+
heading(level: 1, "摘要".clusters().join(" " * 3))
13+
14+
abstract.zh
15+
parbreak()
16+
set text(font: fonts.黑体, size: zh("小四"), weight: "bold")
17+
[关键词:] + keywords.zh.join("")
18+
})
19+
20+
page({
21+
heading(level: 1, title.en)
22+
heading(level: 1, "Abstract")
23+
24+
abstract.en
25+
parbreak()
26+
set text(font: fonts.西文, size: zh("小四"), weight: "bold")
27+
[Key Words: ] + keywords.en.join(", ")
28+
})
29+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#import "@preview/pointless-size:0.1.2": zh
2+
3+
#let acknowledgments(body) = page({
4+
heading("致谢".clusters().join(" " * 3), numbering: none)
5+
body
6+
})
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#import "@preview/pointless-size:0.1.2": zh
2+
3+
#let bibliography(
4+
bib-file,
5+
) = page({
6+
std.bibliography("/" + bib-file, style: "gb-7714-2015-numeric")
7+
})

0 commit comments

Comments
 (0)