Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/preview/modern-nenu-thesis/0.1.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
79 changes: 79 additions & 0 deletions packages/preview/modern-nenu-thesis/0.1.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# NENU-Thesis-Typst-Template

东北师范大学毕业论文的 `Typst` 模板,可以在 [`template/thesis.typ`](./template/thesis.typ) 查看使用方法与生成的效果

![Editor](./images/editor.png)

> [!IMPORTANT]
> 此模板是民间模板,有不被学校认可的风险。
>
> 本模板虽已尽力尝试复原 Word 模板,但可能仍然存在诸多格式问题,详细请看[存在的问题](#存在的问题)

> [!NOTE]
> 我们在 `other` 文件夹中放了其他的模板,例如:
>
> 1. 实验报告模板(lab-report.typ)
> 2. 研究生/博士生 开题报告模板(master-proposal.typ)
>
> 这些模板暂时没有集成到 `thesis` 模板中,要使用的话只能将仓库克隆(或复制该文件到本地)
> 需要注意的是,这些文件会使用 `other` 和 `asset` 中的一些资源文件,请一并下载

## 使用方法

模板可以下载到本地使用,也可以通过导入包使用:

```typ
#import "@preview/modern-nenu-thesis:0.1.0": thesis
```

> [!IMPORTANT]
> 需要下载[隶书字体](https://github.com/dolbydu/font/blob/master/unicode/Lisu.TTF)(如果使用 MacOS/Linux)

### 本地使用

1. 安装一个文本编辑器,这里推荐使用 `VS Code`,并安装 [Tinymist Typst](https://github.com/Myriad-Dreamin/tinymist) 和 [Typst Preview](https://github.com/Enter-tainer/typst-preview) 插件

- 克隆/下载本仓库到本地,并使用 `VS Code` 打开项目文件夹

- 打开 `template/thesis.typ` 文件,开始编写你的论文内容,可以按下 `<C-K> V` (Ctrl+K V) 快捷键在 `VS Code` 中打开预览窗口,实时查看你的论文效果

## TODO

- [x] 学士学位论文模板
- [x] 封面
- [x] 扉页
- [x] 中文摘要
- [x] 英文摘要
- [x] 目录页
- [x] 正文
- [x] 致谢
- [x] 附录

- [x] 硕士(博士)学位论文模板
- [ ] 一些微调,主要是空行上的

- [ ] 博士后研究报告

- [ ] 加入打印选项,用于生成装订版本的论文

- [ ] 更多其它模板

- [ ] 完善使用文档

## 存在的问题

1. 使用 `subpar` 时,无法正确显示子图的编号,如下图所示:
![subfigure-error](images/subfigure-error.png)
因此暂时不支持使用子图

> [!IMPORTANT]
>
> [Issue#12](https://github.com/RubixDev/typst-i-figured/issues/12) 这里有一个迂回的方法用以解决子图问题


2. 扉页中作者签名无法直接插入图片/PDF

## 致谢

- 感谢 [modern-nju-thesis](https://github.com/nju-lug/modern-nju-thesis) 开发的 `Typst` 模板,架构清晰,文档注释详细,本项目在架构上参考良多。
- 感谢 [SEU-Typst-Template](https://github.com/csimide/SEU-Typst-Template/) 开发的 `Typst` 模板
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions packages/preview/modern-nenu-thesis/0.1.0/assets/nenu-logo-red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions packages/preview/modern-nenu-thesis/0.1.0/assets/nenu-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
252 changes: 252 additions & 0 deletions packages/preview/modern-nenu-thesis/0.1.0/assets/nenu-title.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
177 changes: 177 additions & 0 deletions packages/preview/modern-nenu-thesis/0.1.0/docs/docs.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
#import "@preview/gentle-clues:1.2.0": *
#import "style.typ": module, project, ref-fn, tidy

#let current-version = "0.1.0"

#show: project.with(
color: rgb("#143f85"),
title: "NENU毕业论文模板手册",
top-text: "Start Your Thesis with Typst",
subtitle: "v" + current-version,
pic: "/assets/nenu-logo-blue.svg",
publisher: "NENU IST",
signature: "Dian Ling <virgiling7@gmail.com>",
)

= 基础使用

我们通过向 #ref-fn("thesis()") 输入论文的参数,得到对应的返回页面,并通过类似 `React` 的方式将这些页面组装起来,例如:

```typ
#let (
twoside,
doc,
preface,
mainmatter,
appendix,
fonts-display-page,
cover,
committee-page,
decl-page,
abstract,
abstract-en,
bilingual-bibliography,
outline-page,
list-of-figures,
list-of-tables,
notation,
acknowledgement,
publication,
decision,
) = thesis(
doctype: "master",
degree: "professional",
anonymous: false,
twoside: false,
info: (
title: ("毕业论文中文题目", "有一点长有一点长有一点长有一点长有一点长有一点长"),
title-en: "Analysis of the genetic diversity within and between the XX population revealed by AFLP marker",
grade: "20XX",
student-id: "1234567890",
author: "张三",
author-en: "San Zhang",
secret-level: "无",
secret-level-en: "Unclassified",
department: "信息科学与技术学院",
department-en: "School of Information Science and Technology",
discipline: "计算机科学与技术",
discipline-en: "Computer Science and Technology",
major: "计算机科学",
major-en: "Computer Science",
field: "人工智能",
field-en: "Artificial Intelligence",
supervisor: ("李四", "教授"),
supervisor-en: "Professor My Supervisor",
submit-date: datetime.today(),
),
bibliography: bibliography.with("ref.bib"),
)
```

#warning[
注意,有一些页面是通过 #ref-fn("thesis.doctype") 以及 #ref-fn("thesis.degree") 来进行分发的,具体为:

- `commitee-page` 只存在与硕博论文中
- `decision` 只存在于博士论文中
]

除去这些特定学位论文才有的页面,其余页面可以根据需求自己选择是否加入到论文中。

在开始搭配页面前,我们需要明确文档的设置以及页面构成的顺序,这些都需要去阅读论文装订规范。

一般而言,设置的顺序为:

+ 页面 & 元数据设置
+ 封面页
+ 扉页
+ 前言设置
+ 摘要
+ 目录
+ 正文设置
+ 参考文献
+ 附录设置
+ 后记
+ ...

== 文档设置 <pdf-setting>

我们在 #ref-fn("doc()") 中可以找到完整的参数信息,在使用时,只需要导入后输入:

```typ
#show: doc
```

即可,如果需要对文稿的配置进行修改,例如修改页面边距,那么可以使用:

```typ
#show: doc.with(margin: (top: 3cm, bottom: 3cm, left: 1.5cm, right: 1.5cm))
```


== 封面

对于本科生封面,其参数我们可以参考 #ref-fn("bachelor-cover()")

但对于我们使用来说,当我们从 #ref-fn("thesis()") 中获得 `cover` 这个函数后,我们即可以通过调用 `#cover()` 来得到封面

#pagebreak()

= 页面文档

我们通过此文件中定义的函数进行论文的书写,输入参数后,函数会返回对应的模板

== 入口文件

#module(
read("../lib.typ"),
name: "Lib",
)

== 文档设置

#module(
read("../layouts/doc.typ"),
name: "文档与页面设置",
)

== 封面

#module(
read("../pages/bachelor-cover.typ"),
name: "本科生封面",
)

#module(
read("../pages/master-cover.typ"),
name: "硕博封面",
)

== 委员会

#module(
read("../pages/master-comm-page.typ"),
name: "硕博委员会页",
)


== 声明页

#module(
read("../pages/master-decl-page.typ"),
name: "硕博声明页",
)



= 工具函数与变量

#module(
read("../utils/style.typ"),
name: "字体与字号",
)

#module(
read("../utils/datetime-display.typ"),
name: "日期显示辅助函数",
)

Loading