Skip to content

Commit abdaff3

Browse files
Paulkm2006Copilot
andauthored
modern-hust-cs-report:0.1.1 (#3720)
Co-authored-by: Copilot <[email protected]>
1 parent d1ee8ee commit abdaff3

File tree

7 files changed

+1245
-0
lines changed

7 files changed

+1245
-0
lines changed
43.5 KB
Loading

packages/preview/modern-hust-cs-report/0.1.1/LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# modern-hust-cs-report
2+
3+
This is an unofficial template for curriculum and lab reports at School of Computer Science, Huazhong University of Science and Technology.
4+
5+
本模板为华中科技大学 计算机科学与技术学院 本科课程报告/实验报告 的模板,基于新生实践课老师发放的LaTeX模板修改而来。
6+
7+
## 使用方式
8+
9+
### 前置安装
10+
11+
此模板需要你的电脑里有Fangsong, SimSun, SimHei, Times New Roman等字体。
12+
13+
### 方法一:使用 typst init(推荐)
14+
15+
在当前目录初始化项目:
16+
17+
```bash
18+
typst init @preview/modern-hust-cs-report
19+
```
20+
21+
指定自定义目录名称:
22+
23+
```bash
24+
typst init @preview/modern-hust-cs-report my-report
25+
```
26+
27+
### 方法二:手动导入
28+
29+
在已有 Typst 项目中导入该模板并填写信息:
30+
31+
```typst
32+
#import "@preview/modern-hust-cs-report:0.1.1": *
33+
34+
35+
#show: experimental-report.with(
36+
title: "基于高级语言源程序格式处理工具",
37+
course-name: "程序设计综合课程设计",
38+
author: "蓝鹦鹉",
39+
school: "计算机科学与技术学院",
40+
class-num: "计算机科学与技术2407",
41+
stu-num: "U2024",
42+
instructor: "张三",
43+
report-date: "2025年11月4日",
44+
report-type: "experiment" // 可选 experiment course 或不填
45+
)
46+
47+
= 引言
48+
49+
== 问题描述
50+
51+
在计算机科学中,抽象语法树(abstract syntax tree或者缩写为AST),是将源代码的语法结构的用树的形式表示。
52+
53+
== 课题背景与意义
54+
55+
随着软件开发规模的不断扩大和团队协作的日益频繁,代码的可读性和规范性变得越来越重要。
56+
57+
=== test1
58+
123 // @xxx 引用
59+
60+
=== test2
61+
62+
3333
63+
64+
#pagebreak()
65+
= 第二节
66+
67+
// 插入表格
68+
#tbl(
69+
table(
70+
columns: 3,
71+
[列1], [列2], [列3],
72+
[数据1], [数据2], [数据3],
73+
),
74+
caption: "示例表格",
75+
)
76+
77+
// 插入图片
78+
// #fig(image("./HUSTBlack.png"), caption: "示例图片")
79+
80+
#pagebreak()
81+
82+
// 参考文献
83+
// #citation("./report.bib")
84+
85+
// #pagebreak()
86+
87+
#show: appendix-section // 插入附录
88+
89+
= test
90+
Here is the appendix content.
91+
92+
```
93+
94+
### 图片插入
95+
96+
使用 `fig` 函数插入图片,它会自动添加格式化的图注:
97+
98+
```typst
99+
#fig(image("path/to/image.png"), caption: "图片描述")
100+
```
101+
102+
- `caption`: 图片标题(必填)
103+
- 图片编号格式为 `图x-y-z`,其中 x 是一级标题编号,y 是二级标题编号,z 是该节内的图片序号
104+
- 每个二级标题下的图片编号会自动重置
105+
- 图注使用 Times New Roman 和黑体混合字体,12pt,居中显示在图片下方
106+
107+
### 表格插入
108+
109+
使用 `tbl` 函数插入表格,它会自动添加格式化的表注:
110+
111+
```typst
112+
#tbl(
113+
table(
114+
columns: 3,
115+
[列1], [列2], [列3],
116+
[数据1], [数据2], [数据3],
117+
),
118+
caption: "表格描述"
119+
)
120+
```
121+
122+
- `content`: 表格内容(使用 Typst 的 `table()` 函数创建)
123+
- `caption`: 表格标题(必填)
124+
- 表格编号格式为 `表x-y-z`,其中 x 是一级标题编号,y 是二级标题编号,z 是该节内的表格序号
125+
- 每个二级标题下的表格编号会自动重置
126+
- 表注使用 Times New Roman 和黑体混合字体,12pt,居中显示在表格上方
127+
128+
### 引用插入
129+
130+
使用 `citation` 函数插入引用。向它传递一个 `.bib` 文件,它会自动处理标题、目录等格式并自动展开 bib
131+
132+
### 附录插入
133+
134+
在编写完成正文后,使用 `#show: appendix-section` 标记进入附录区。
135+
136+
## 致谢
137+
138+
本项目中 `fig``tbl` 函数使用了 [DzmingLi/hust-cse-report](https://github.com/DzmingLi/hust-cse-report) @DzmingLi 的实现,感谢你的开源!
139+
140+
本项目使用了 Github Copilot 进行编写

0 commit comments

Comments
 (0)