├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── fonts ├── FangSong.ttf ├── FiraCode-Regular.ttf ├── NewCMMono10-Bold.otf ├── NewCMMono10-BoldOblique.otf ├── NewCMMono10-Book.otf ├── NewCMMono10-BookItalic.otf ├── NewCMMono10-Italic.otf ├── NewCMMono10-Regular.otf ├── STZhongsong.ttf ├── SimHei.ttf ├── SimKai.ttf ├── SimSun.ttf ├── SourceHanSansCN-Medium.otf ├── TimesNewRoman-Bold-Italic.ttf ├── TimesNewRoman-Bold.ttf ├── TimesNewRoman-Italic.ttf └── TimesNewRoman.ttf ├── init-files ├── bachelor_mid_term.pdf ├── bachelor_mid_term.typ ├── bachelor_thesis.pdf ├── bachelor_thesis.typ ├── bachelor_trans.typ ├── degree_thesis.pdf ├── degree_thesis.typ ├── demo_image │ ├── 2-2a.png │ ├── 2-2b.png │ └── 24h_rain.png ├── gb-t-7714-2015-numeric-seu-bachelor.csl ├── gb-t-7714-2015-numeric-seu-degree.csl ├── ref.bib └── thesis.typ ├── ref ├── bachelor_cover.png ├── 东南大学本科毕业设计(论文)参考模板 (2024年1月修订).docx └── 东南大学本科毕业设计(论文)参考模板 (2025年3月修订).docx ├── seu-thesis ├── assets │ ├── bachelor_back.png │ ├── bachelor_cover_adjusted.png │ ├── bachelor_title.svg │ ├── cover_school.png │ ├── icon │ │ ├── Box.svg │ │ └── Checked.svg │ └── vi │ │ ├── seu.png │ │ ├── seu_logo.png │ │ ├── 东南大学校标文字组合-彩色.png │ │ └── 东南大学校标文字组合.png ├── lib.typ ├── pages │ ├── back-bachelor-fn.typ │ ├── cover-bachelor-fn.typ │ ├── cover-bachelor-trans-fn.typ │ ├── cover-degree-fn.typ │ ├── statement-bachelor-ic.typ │ ├── statement-degree-fn.typ │ ├── title-page-degree-cn-fn.typ │ └── title-page-degree-en-fn.typ ├── parts │ ├── abstract-bachelor-fn.typ │ ├── abstract-degree-fn.typ │ ├── main-body-bachelor-fn.typ │ ├── main-body-degree-fn.typ │ ├── outline-bachelor-fn.typ │ ├── outline-degree-fn.typ │ └── terminology.typ ├── templates │ ├── bachelor-mid-term.typ │ ├── bachelor-trans.typ │ ├── bachelor.typ │ └── degree.typ └── utils │ ├── bachelor-footnote.typ │ ├── bilingual-bibliography.typ │ ├── fonts.typ │ ├── get-heading-title.typ │ ├── numbering-tools.typ │ ├── packages.typ │ ├── set-bachelor.typ │ ├── set-degree.typ │ ├── show-appendix.typ │ ├── show-equation-degree.typ │ ├── show-heading.typ │ ├── smart-pagebreak.typ │ ├── states.typ │ ├── thanks.typ │ └── to-string.typ ├── thumbnail.webp └── typst.toml /.gitignore: -------------------------------------------------------------------------------- 1 | seu-thesis/**/*.pdf 2 | temp/ 3 | **/.DS_Store 4 | .vscode/ -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [0.3.4] - 2025-05-14 9 | 10 | - 修复本科毕设模板多处格式错误: 11 | - 英文关键词应当使用半角逗号分隔 by @idawnlight ; 12 | - 参考文献应使用五号字。 13 | - 本科毕设模版提供自定义封面日期的选项 by @idawnlight 。 14 | - 统一使用连字符风格(kebab-case)的参数名。 15 | - 如您使用本科毕设模板、学位论文模板:无需改动即可升级。 16 | - 如您使用本科毕设翻译模板,请将 `student_id` 改为 `student-id`。 17 | 18 | ## [0.3.3] - 2025-03-29 19 | 20 | - 更新本科毕设模板至教务处 2025 模板 by @idawnlight 。 21 | 22 | ## [0.3.2] - 2025-02-22 23 | 24 | - 适配 Typst 0.13.0 ,使用 `par(first-line-indent: (length, all: true))` 代替原有的 `fake-par` 方案。 25 | - 改用更优的页眉显示章节标题逻辑,详见 `seu-thesis\utils\get-heading-title.typ` 注释。 26 | - 添加毕设翻译模板。 27 | 28 | ## [0.3.1] - 2025-01-26 29 | 30 | - 适配 Typst 0.12.0 。 31 | 32 | ## [0.3.0] - 2024-07-07 33 | 34 | - 尝试弃用大部分自造轮子,改为通过引入第三方 package 实现相关功能。 35 | - 规范化模板参数/变量名。 36 | - 校对毕设模板的间距。 [^1] 37 | 38 | [^1]: 由于 Typst 使用的行距模型与 Word 不同,行距难以保持完全一致。 39 | 40 | ### Breaking Changes 破坏性变更 41 | 42 | - `#import` 方式改变:由原来的 43 | ```typst 44 | // 毕设 45 | #import "@preview/cheda-seu-thesis:0.2.2": bachelor-conf, thanks, appendix 46 | // 学位 47 | #import "@preview/cheda-seu-thesis:0.2.2": degree-conf, thanks, appendix 48 | ``` 49 | 更改为 50 | ```typst 51 | // 毕设 52 | #import "@preview/cheda-seu-thesis:0.3.0": bachelor-conf, bachelor-utils 53 | #let (thanks, show-appendix) = bachelor-utils 54 | // 学位 55 | #import "@preview/cheda-seu-thesis:0.3.0": degree-conf, degree-utils 56 | #let (thanks, show-appendix) = degree-utils 57 | ``` 58 | 本模板暂未计划完全改为闭包。 59 | - 进入附录章节的方式改变: 60 | - 由 `#appendix()` 变为 `#show: shou-appendix`; 61 | - `#bibliography` 不再会自动进入附录。 62 | - 引用图表的方式改变: 63 | - 由自造轮子改为使用 `i-figured` ; 64 | - 需要将旧版本的 `@xxx` 修改为对应类型的 `@tbl:xxx` `@fig:xxx` `@eqt:xxx` 。 65 | - 模板参数格式改变:详见对应模板的 demo 。 66 | - 不再使用 `state` 储存章节标题与章节编号。 67 | 68 | ### 改进 69 | 70 | - 使用 `i-figured` 代替自造的公式编号引用轮子。 71 | - 使用自带的 `outline` 代替自造的目录页轮子。 72 | - 统一变量、参数等的命名风格。 73 | - 不再使用大量 `state` 。 74 | - 更新学位论文授权声明文字。 75 | 76 | ### 修复 77 | 78 | - 修复学位论文页眉读取章节号、名称时可能取到 `none` 的问题。 79 | - 修复毕设引用文献中不显示末尾 `.` 的问题。 80 | 81 | ## [0.2.2] - 2024-05-18 82 | 83 | ### 改进 84 | 85 | - 学位论文改为使用 Typst 0.11.0 增加的公式编号位置参数代替原有的公式编号对齐轮子。 86 | - 拆分 CSL 文件,按本研不同的要求分为两个文件。 87 | 88 | ## [0.2.1] - 2024-05-02 89 | 90 | ### 新功能 91 | 92 | - 允许控制学位论文的一级标题页面是否显示页眉。 93 | 94 | ### 改进 95 | 96 | - 优化资源文件大小。 97 | 98 | ## [0.2.0] - 2024-04-15 99 | 100 | 此版本重构了目录结构,合并两个模板的大部分工具函数,并按 Typst template package 组织文件。 101 | 102 | [0.3.4]: https://github.com/csimide/SEU-Typst-Template/compare/v0.3.3...v0.3.4 103 | [0.3.3]: https://github.com/csimide/SEU-Typst-Template/compare/v0.3.2...v0.3.3 104 | [0.3.2]: https://github.com/csimide/SEU-Typst-Template/compare/v0.3.1...v0.3.2 105 | [0.3.1]: https://github.com/csimide/SEU-Typst-Template/compare/v0.3.0...v0.3.1 106 | [0.3.0]: https://github.com/csimide/SEU-Typst-Template/compare/c44b5172178c0c2380b322e50931750e2d761168...v0.3.0 107 | [0.2.2]: https://github.com/csimide/SEU-Typst-Template/compare/908a28c7da02b260f04dcf31ed22278a212cad19...c44b5172178c0c2380b322e50931750e2d761168 108 | [0.2.1]: https://github.com/csimide/SEU-Typst-Template/compare/42b34b829bb9816d89a0955e2196346ab6e39ad4...908a28c7da02b260f04dcf31ed22278a212cad19 109 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 东南大学论文模板 2 | 3 | 使用 Typst 复刻东南大学「本科毕业设计(论文)报告」模板和「研究生学位论文」模板。 4 | 5 | 请在 [`init-files`](./init-files/) 目录内查看 Demo PDF。 6 | 7 | > [!IMPORTANT] 8 | > 9 | > 此模板是民间模板,有不被学校认可的风险。 10 | > 11 | > 本模板虽已尽力尝试复原原始 Word 模板,但可能仍然存在诸多格式问题。 12 | > 13 | > Typst 是一个仍在活跃开发、可能会有较大变更的排版工具,请选择最新版模板与本模板建议的 Typst 版本相配合使用。 14 | 15 | - [东南大学论文模板](#东南大学论文模板) 16 | - [使用方法](#使用方法) 17 | - [本地使用](#本地使用) 18 | - [Web App](#web-app) 19 | - [模板内容](#模板内容) 20 | - [研究生学位论文模板](#研究生学位论文模板) 21 | - [本科毕业设计(论文)报告模板](#本科毕业设计论文报告模板) 22 | - [本科毕业设计(论文)资料翻译模板](#本科毕业设计论文资料翻译模板) 23 | - [本科毕业设计(论文)中期检查表](#本科毕业设计论文中期检查表) 24 | - [目前存在的问题](#目前存在的问题) 25 | - [参考文献](#参考文献) 26 | - [友情链接](#友情链接) 27 | - [开发与协议](#开发与协议) 28 | - [二次开发](#二次开发) 29 | 30 | ## 使用方法 31 | 32 | 本模板需要使用 Typst 0.13.x 编译。 33 | 34 | 此模板已上传 Typst Universe ,可以使用 `typst init` 功能初始化,也可以使用 Web App 编辑。Typst Universe 上的模板可能不是最新版本。如果需要使用最新版本的模板,从本 repo 中获取。 35 | 36 | ### 本地使用 37 | 38 | 请先安装位于 `fonts` 目录内的全部字体。然后,您可以使用以下两种方式使用本模板: 39 | 40 | - 下载/clone 本 repo 的全部文件,编辑 `init-files` 目录内的示例文件。 41 | - 使用 `typst init @preview/cheda-seu-thesis:0.3.4` 来获取此模板与初始化文件。 42 | 43 | 随后,您可以通过编辑示例文件来生成想要的论文。两种论文格式的说明都在对应的示例文档内。 44 | 45 | 如您使用 VSCode 作为编辑器,可以尝试使用 [Tinymist](https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp) 与 [Typst Preview](https://marketplace.visualstudio.com/items?itemName=mgt19937.typst-preview) 插件。如有本地包云同步需求,可以使用 [Typst Sync](https://marketplace.visualstudio.com/items?itemName=OrangeX4.vscode-typst-sync) 插件。更多编辑技巧,可查阅 。 46 | 47 | ### Web App 48 | 49 | > [!NOTE] 50 | > 51 | > 由于字体原因,不建议使用 Web App 编辑此模板。 52 | 53 | 请打开 并点击 `Create project in app` ,或在 Web App 中选择 `Start from a template`,再选择 `cheda-seu-thesis`。 54 | 55 | 然后,请将 内的 **所有** 字体上传到 Typst Web App 内该项目的根目录。注意,之后每次打开此项目,浏览器都会花费很长时间从 Typst Web App 的服务器下载这一批字体,体验较差。 56 | 57 | 最后,请按照自动打开的文件的提示操作。 58 | 59 | ## 模板内容 60 | 61 | ### 研究生学位论文模板 62 | 63 | 此 Typst 模板按照[《东南大学研究生学位论文格式规定》](https://seugs.seu.edu.cn/2023/0424/c26669a442680/page.htm)制作,制作时参考了 [SEUThesis 模板](https://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/seuthesis/seuthesis.pdf)。 64 | 65 | 当前支持进度: 66 | 67 | - 文档构件 68 | - [x] 封面 69 | - [x] 中英文扉页 70 | - [x] 中英文摘要 71 | - [x] 目录 72 | - [x] 术语表 73 | - [x] 正文 74 | - [x] 致谢 75 | - [x] 参考文献 76 | - [x] 附录 77 | - [ ] 索引 78 | - [ ] 作者简介 79 | - [ ] 后记 80 | - [ ] 封底 81 | - 功能 82 | - [ ] 盲审 83 | - [x] 页码编号:正文前使用罗马数字,正文及正文后使用阿拉伯数字 84 | - [x] 正文、附录图表编号格式:详见研院要求 85 | - [x] 数学公式放置位置:离页面左侧两个汉字距离 86 | - [x] 数学公式编号:公式块右下 87 | - [x] 插入空白页:新章节总在奇数页上 88 | - [x] 页眉:奇数页显示章节号和章节标题,偶数页显示固定内容 89 | - [x] 参考文献:支持双语显示 90 | 91 | ### 本科毕业设计(论文)报告模板 92 | 93 | 此 Typst 模板基于东南大学本科毕业设计(论文)报告模板(2025 年 3 月)仿制,原模板可以在教务处网站上下载([2019 年 9 月版](https://jwc.seu.edu.cn/2021/1108/c21686a389963/page.htm) , [2024 年 1 月版](https://jwc.seu.edu.cn/2024/0117/c21686a479303/page.htm) , [2025 年 3 月版](https://jwc.seu.edu.cn/2025/0320/c21686a522328/page.htm))。 94 | 95 | 当前支持进度: 96 | 97 | - 文档构件 98 | - [x] 封面 99 | - [x] 中英文摘要 100 | - [x] 目录 101 | - [x] 正文 102 | - [x] 参考文献 103 | - [x] 附录 104 | - [x] 致谢 105 | - [x] 封底 106 | - 功能 107 | - [ ] 盲审 108 | - [x] 页码编号:正文前使用罗马数字,正文及正文后使用阿拉伯数字 109 | - [x] 正文、附录图表编号格式:详见本科毕设要求 110 | - [x] 数学公式放置位置:离页面左侧两个汉字距离 111 | - [x] 数学公式编号:公式块右侧中心 112 | - [x] 页眉:显示固定内容 113 | - [x] 参考文献:支持双语显示 114 | - [ ] ~~表格显示“续表”~~ 由于教务处提供的模板中没有给出“续表”显示样例,故暂不实现。 115 | 116 | > [!NOTE] 117 | > 118 | > 可以看看隔壁 项目,也正在使用 Typst 实现毕业设计(论文)报告模板,还提供了毕设翻译模板。该项目的实现细节与本模板并不相同,您可以根据自己的喜好选择。 119 | 120 | ### 本科毕业设计(论文)资料翻译模板 121 | 122 | 此 Typst 模板的封面部分基于本科毕业设计(论文)资料翻译模板(2019 年 4 月)仿制,正文复用本科毕业设计(论文)报告模板,原封面可以在教务处网站上下载([模板列表](https://jwc.seu.edu.cn/2019/0428/c21696a271007/page.htm)、[封面文件](https://jwc.seu.edu.cn/_upload/article/files/d3/d2/53aa66fe4e09ac440cfcda1a59f5/3030d352-a89d-469c-be1e-e7a6c470bc01.doc))。 123 | 124 | ### 本科毕业设计(论文)中期检查表 125 | 126 | 此 Typst 模板基于本科毕业设计(论文)中期检查表(2019 年 4 月)仿制,原模板可以在[教务处网站](https://jwc.seu.edu.cn/2019/0428/c21696a271007/page.htm)上下载。 127 | 128 | > [!NOTE] 129 | > 130 | > 不是所有院系都要求填写此中期检查表。部分学院只要求提交在线表格,不需要提交此附件。 131 | 132 | ## 目前存在的问题 133 | 134 | - 参考文献格式不完全符合要求。请见下方参考文献小节。 135 | - 行距、边距等有待继续调整。 136 | 137 | ### 参考文献 138 | 139 |
140 | 参考文献格式不完全符合要求。 141 | 142 | Typst 自带的 GB/T 7714-2015 numeric 格式与学校要求格式相比,有以下问题: 143 | 144 | 1. 学校要求在作者数量较多时,英文使用 `et al.` 中文使用 `等` 来省略。但是,Typst 目前仅可以显示为单一语言。 145 | 146 | **A:** 该问题系 Typst 的 CSL 解析器不支持 CSL-M 导致的。 147 | 148 |
149 | 详细原因 150 | 151 | - 使用 CSL 实现这一 feature 需要用到 [CSL-M](https://citeproc-js.readthedocs.io/en/latest/csl-m/index.html#cs-layout-extension) 扩展的多 `layout` 功能,而 Typst 尚不支持 CSL-M 扩展功能。详见 https://github.com/typst/typst/issues/2793 与 https://github.com/typst/citationberg/issues/5 。 152 | - Typst 目前会忽视 BibTeX/CSL 中的 `language` 字段。参见 https://github.com/typst/hayagriva/pull/126 。 153 | 154 | 因为上述原因,目前很难使用 Typst 原生方法实现根据语言自动选用 `et al.` 与 `等`。 155 | 156 |
157 | 158 | OrangeX4 和我写了一个基于查找替换的 `bilingual-bibliography` 功能,试图在 Typst 支持 CSL-M 前实现中文西文使用不同的关键词。 159 | 160 | 本模板的 Demo 文档内已使用 `bilingual-bibliography` 引用,请查看 Demo 文档以了解用法。注意,该功能仍在测试,很可能有 Bug,详见 https://github.com/csimide/SEU-Typst-Template/issues/1 。 161 | 162 | > 请在 https://github.com/nju-lug/modern-nju-thesis/issues/3 查看更多有关双语参考文献实现的讨论。 163 | > 164 | > 本模板曾经尝试使用 https://github.com/csimide/cslper 作为双语参考文献的实现方法。 165 | 166 | 2. 学校给出的范例中,除了纯电子资源,即使引用文献来自线上渠道,也均不加 `OL`、访问日期、DOI 与 链接。但是,Typst 内置的 GB/T 7714-2015 numeric 格式会为所有 bib 内定义了链接/DOI 的文献添加 `OL` 标记和链接/DOI 。 167 | 168 | **A:** 该问题系学校的标准与 GB/T 7714-2015 不完全一致导致的。 169 | 170 | 请使用 `style: "./seu-thesis/gb-t-7714-2015-numeric-seu.csl"` ,会自动依据文献类型选择是否显示 `OL` 标记和链接/DOI。 171 | 172 | > 该 csl 修改自 173 | > 174 | > 原文件基于 CC-BY-SA 3.0 协议共享。 175 | 176 | 3. 作者大小写(或者其他细节)与学校范例不一致。 177 | 4. 学位论文中,学校要求引用其他学位论文的文献类型应当写作 `[D]: [博士学位论文].` 格式,但模板显示为 `[D]` ,不显示子类别。 178 | 5. 学位论文中,学校给出的范例使用全角符号,如全角方括号、全角句点等。 179 | 6. ~~引用条目丢失 `. ` ,如 `[M]2nd ed`。~~ 180 | 181 | **3~6 A:** 学校用的是 GB/T 7714-2015 的方言,曾经有学长把它叫做 GB/T 7714-SEU ,目前没找到完美匹配学校要求的 CSL(不同学院的要求也不太一样),后续会写一个符合要求的 CSL 文件。 182 | 183 | **2024-05-02 更新:** 现已初步实现 CSL。不得不说 Typst 的 CSL 支持成谜……目前修复情况如下: 184 | 185 | - 问题 3 已修复; 186 | - 问题 4 在学位论文的 CSL 内已修复,但 Typst 似乎不支持这一字段,因此无法显示; 187 | - 问题 5 不准备修复,查阅数篇已发表的学位论文,使用的也是半角符号; 188 | - 问题 6 ~~似乎是 Typst 的 CSL 支持的问题,本模板附带的 CSL 文件已经做了额外处理,应该不会丢 `. ` 了。~~ Typst 0.13.0 已修复此问题,见 https://github.com/typst/hayagriva/issues/180 。 189 | 190 | 7. 引用其他学位论文时,GB7714-2015/本科毕设/学位论文均要求注明 `地点: 学校名称, 年份.` 。但是模板不显示这一项。 191 | 192 | **A:** Typst 不支持 `school` `institution` 作为 `publisher` 的别名,亦不支持解析 csl 中的 `institution` ( https://github.com/typst/hayagriva/issues/112 )。如需修复,请手动修改 bib 文件内对应条目,在 `school = {学校名称},` 下加一行 `publisher = {学校名称},` 。 193 |
194 | 修改示例 195 | 196 | ```biblatex 197 | @phdthesis{Example1, 198 | type = {{硕士学位论文}}, 199 | title = {{摸鱼背景下的Typst模板使用研究}}, 200 | author = {王, 东南}, 201 | year = {2024}, 202 | langid = {chinese}, 203 | address = {南京}, 204 | school = {东南大学}, 205 | publisher = {东南大学}, 206 | } 207 | ``` 208 | 209 |
210 | 211 | 8. 正文中连续引用,上标合并错误(例如,引用 1 2 3 4 应当显示为 [1-4] ,但是显示为 [1,4] )。 212 | 213 | **A:** ~~临时方案是把 csl 文件里 `after-collapse-delimiter=","` 改成 `after-collapse-delimiter="-"`。本模板附带的 CSL 文件已做此修改。~~ 214 | 215 | ~~详细原因请见 https://github.com/typst/hayagriva/issues/154 。~~ 216 | 217 | ~~https://github.com/typst/hayagriva/pull/176 正尝试解决这一 bug。**该 bug 修复后,请及时撤销上述对 csl 的临时修改。**~~ 218 | 219 | Typst 0.12.0 已经修复,不需要魔改了。 220 | 221 |
222 | 223 | ## 友情链接 224 | 225 | - Typst Touying 东南大学主题幻灯片模板 by QuadnucYard - https://github.com/QuadnucYard/touying-theme-seu 226 | - 东南大学 Typst 本科毕设模板与毕设翻译模板 by Geary.Z (TideDra) - https://github.com/TideDra/seu-thesis-typst 227 | 228 | ## 开发与协议 229 | 230 | 如果您在使用过程中遇到任何问题,请提交 issue。本项目欢迎您的 PR。如果有其他模板需求也可以在 issue 中提出。 231 | 232 | 除下述特殊说明的文件外,此项目使用 MIT License 。 233 | 234 | - `init-files/demo_image/` 路径下的文件来自东南大学教务处本科毕设模板。 235 | - `seu-thesis/assets/` 路径下的文件是由东南大学教务处模板经二次加工得到,或从东南大学视觉设计中取得。 236 | - `fonts` 路径下的文件是此模板用到的字体。 237 | - `东南大学本科毕业设计(论文)参考模板 (2024年1月修订).docx` 是教务处提供的毕设论文模板。 238 | 239 | ### 二次开发 240 | 241 | 本模板欢迎二次开发。在二次开发前,建议了解本模板的主要特性与关联的文件: 242 | 243 | - 有较为麻烦的图表、公式编号(图表编号格式不相同,甚至附录与正文中图表编号格式也不相同;图的名称在图下方,表的名称在表上方;公式不是居中对齐,公式编号位置不是右侧上下居中)。 244 | 245 | - 已经改用 `i-figured` 包完成。 246 | 247 | - (仅研究生学位论文)奇数页偶数页页眉不同,且有页眉中显示章节名称的需求。 248 | 249 | - 该功能位于 `seu-thesis/parts/get-heading-title.typ`。 250 | - 基于小蓝书 https://typst-doc-cn.github.io/tutorial/intermediate/content-stateful-3.html 实现。 251 | 252 | - 支持双语显示参考文献(自动使用 `et al.` 和 `等`) 253 | - 该功能来自 `bilingual-bibliography`,关联的文件是 `seu-thesis/utils/bilingual-bibliography.typ`。 254 | - 有关 `bilingual-bibliography` 的更多信息,请查看 https://github.com/nju-lug/modern-nju-thesis/issues/3 255 | 256 | > [!NOTE] 257 | > 258 | > 本模板内造的轮子比较多,而且我的代码质量一般,请酌情取用。 259 | -------------------------------------------------------------------------------- /fonts/FangSong.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/FangSong.ttf -------------------------------------------------------------------------------- /fonts/FiraCode-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/FiraCode-Regular.ttf -------------------------------------------------------------------------------- /fonts/NewCMMono10-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/NewCMMono10-Bold.otf -------------------------------------------------------------------------------- /fonts/NewCMMono10-BoldOblique.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/NewCMMono10-BoldOblique.otf -------------------------------------------------------------------------------- /fonts/NewCMMono10-Book.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/NewCMMono10-Book.otf -------------------------------------------------------------------------------- /fonts/NewCMMono10-BookItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/NewCMMono10-BookItalic.otf -------------------------------------------------------------------------------- /fonts/NewCMMono10-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/NewCMMono10-Italic.otf -------------------------------------------------------------------------------- /fonts/NewCMMono10-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/NewCMMono10-Regular.otf -------------------------------------------------------------------------------- /fonts/STZhongsong.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/STZhongsong.ttf -------------------------------------------------------------------------------- /fonts/SimHei.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/SimHei.ttf -------------------------------------------------------------------------------- /fonts/SimKai.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/SimKai.ttf -------------------------------------------------------------------------------- /fonts/SimSun.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/SimSun.ttf -------------------------------------------------------------------------------- /fonts/SourceHanSansCN-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/SourceHanSansCN-Medium.otf -------------------------------------------------------------------------------- /fonts/TimesNewRoman-Bold-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/TimesNewRoman-Bold-Italic.ttf -------------------------------------------------------------------------------- /fonts/TimesNewRoman-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/TimesNewRoman-Bold.ttf -------------------------------------------------------------------------------- /fonts/TimesNewRoman-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/TimesNewRoman-Italic.ttf -------------------------------------------------------------------------------- /fonts/TimesNewRoman.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/fonts/TimesNewRoman.ttf -------------------------------------------------------------------------------- /init-files/bachelor_mid_term.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/init-files/bachelor_mid_term.pdf -------------------------------------------------------------------------------- /init-files/bachelor_mid_term.typ: -------------------------------------------------------------------------------- 1 | #import "../seu-thesis/lib.typ": bachelor-mid-term-conf 2 | 3 | // 注意:不是所有院系都要求填写此中期检查表。部分学院只要求提交在线表格,不需要提交此附件。 4 | 5 | #let completed-work = [ 6 | #set par(first-line-indent: (amount: 2em, all: true), justify: true) 7 | 8 | 摸鱼,摸鱼,摸鱼。 9 | ] 10 | 11 | #let next-steps = [ 12 | #set par(first-line-indent: (amount: 2em, all: true), justify: true) 13 | 14 | 摸鱼,摸鱼,摸鱼。 15 | ] 16 | 17 | #let issues-and-solution = [ 18 | #set par(first-line-indent: (amount: 2em, all: true), justify: true) 19 | 20 | 鱼不够摸。 21 | ] 22 | 23 | #let weekly-meetings = [ 24 | #set par(first-line-indent: (amount: 2em, all: true), justify: true) 25 | 26 | 每天见面24小时,每周见面7天。 27 | ] 28 | 29 | #bachelor-mid-term-conf( 30 | student-id: "00121001", 31 | name: "王东南", 32 | school: "示例学院", 33 | major: "示例专业", 34 | title: "新兴排版方式下的摸鱼科学优化研究", 35 | progress: "进度条加载中", 36 | completed-work: completed-work, 37 | next-steps: next-steps, 38 | issues-and-solution: issues-and-solution, 39 | weekly-meetings: weekly-meetings, 40 | guidance-quality: 1, 41 | ) -------------------------------------------------------------------------------- /init-files/bachelor_thesis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/init-files/bachelor_thesis.pdf -------------------------------------------------------------------------------- /init-files/bachelor_thesis.typ: -------------------------------------------------------------------------------- 1 | #import "../seu-thesis/lib.typ": bachelor-conf, bachelor-utils 2 | #let (thanks, show-appendix) = bachelor-utils 3 | 4 | /* 5 | 使用模板前,请先安装 https://github.com/csimide/SEU-Typst-Template/tree/master/fonts 内的所有字体。 6 | 如果使用 Web App,请将这些字体上传到 Web App 项目的根目录中。 7 | */ 8 | 9 | // 由于教务处模板没有严格规定代码块的字体,为了美观,在此设定代码块字体 10 | #show raw: set text(font: ("Fira Code", "SimHei")) 11 | #import "@preview/codelst:2.0.2": sourcecode 12 | #let code = sourcecode 13 | 14 | #show: doc => bachelor-conf( 15 | student-id: "00121001", 16 | author: "王东南", 17 | school: "示例学院", 18 | major: "示例专业", 19 | advisor: "湖牌桥", 20 | thesis-name: "示例论文标题\n此行空白时下划线自动消失", 21 | date: "某个起止日期", 22 | cn-abstract: [ 23 | 摘要内容独立于正文而存在,是论文内容高度概括的简要陈述,应准确、具体、完整地概括论文的主要信息,内容包括研究目的、方法、过程、成果、结论及主要创新之处等,不含图表,不加注释,具有独立性和完整性,一般为400字左右。 24 | 25 | “摘要”用三号黑体加粗居中,“摘”与“要”之间空4个半角空格。摘要正文内容用小四号宋体,固定1.5倍行距。 26 | 27 | 论文的关键词是反映毕业设计(论文)主题内容的名词,一般为3-5个,排在摘要正文部分下方。关键词与摘要之间空一行。关键词之间用逗号分开,最后一个关键词后不加标点符号。 28 | 29 | 在本模板中,摘要在参数中添加,例如 `cnabstract: [我的摘要]` 。关键词添加的方法类似,例如 `cnkeywords: ("关键词1", "关键词2")`。有关这一部分的信息,可参考 demo 文档的写法。 30 | ], 31 | cn-keywords: ("关键词1", "关键词2"), 32 | en-abstract: [ 33 | 英文摘要应与中文摘相对应,250个实词左右。采用第三人称介绍该学位论文内容,叙述的基本时态为一般现在时,确实需要强调过去的事情或者已经完成的行为才使用过去时、完成时等其他时态。 34 | 35 | ABSTRACT为三号Times New Roman加粗居中。 36 | 37 | 英文摘要正文为小四号Times New Roman,固定1.5倍行距。英文关键词“KEY WORDS”大写,其后的关键词第一个字母大写,关键词之间用半角逗号隔开。 38 | 39 | #lorem(100) // 添加一段英文乱语,供排版预览效果。 40 | ], 41 | en-keywords: ("Keywords1", "Keywords2"), 42 | doc, 43 | ) 44 | 45 | = 绪论 46 | 47 | 48 | == 课题背景和意义 49 | 50 | 绪论部分主要论述选题的意义、国内外研究现状以及本文主要研究的内容、研究思路以及内容安排等。 51 | 52 | 章标题为三号黑体加粗居中;一级节标题(如,2.1 本文研究内容):四号黑体居左;二级节标题(如,2.1.1 实验方法):小四号宋体居左。 53 | 54 | 正文部分为小四号宋体,行间距1.5倍行距,首行缩进2个字符。 55 | 56 | 有时,首行缩进不起作用(Typst 的已知问题)。此时,可以使用 ```typ #h(2em)``` 手动插入两个汉字长度的空间,“手动”首行缩进。若该处不需要缩进,但自动添加了缩进,需要使用 ```typ #h(-2em)``` 手动减小该段落的缩进。*请注意,在成文后,需要自行检查首行缩进是否工作正常。* 57 | 58 | == 研究现状 59 | 60 | #strike[目前,由于宋体(SimSun)、黑体(SimHei)均是单一字重字体,而 Typst 0.10.0 尚未加入伪粗体的支持,本文档的中文部分暂时无法加粗。章节大标题等需要加粗的地方也未加粗。因 https://github.com/typst/typst/pull/2970 已经合并了改善字体描边功能的 PR,预计在之后的版本中即可直接或间接使用伪粗体,届时本模板亦将相应修改。] 61 | 62 | 在 0.11.0 中,Typst 提供了间接实现伪粗体的方式。本模板亦已通过 cuti 包加入粗体相关支持。如需使用粗体,可以用 ```typ *``` 包裹需要加粗的文字,或者使用 ```typst #text(weight: "bold")```。比如,*这是一段加粗文字的示例。* 63 | 64 | == 本文研究内容 65 | 66 | 文章的首页内容,也就是题目、学号、姓名等,都是通过参数传入模板的。请参考 demo 源代码修改。 67 | 68 | = 第二章标题 69 | 70 | 具体研究内容每一章应另起页书写,层次要清楚,内容要有逻辑性,每一章标题需要按论文实际研究内容进行填写,不可直接写成第二章 正文。研究内容因学科、选题特点可有差异,但必须言之成理,论据可靠,严格遵循本学科国际通行的学术规范。 71 | 72 | 中文为小四号宋体,英文及数字为小四号Times New Roman,首行缩进2个字符,行间距为1.5倍。正文一般不少于15000字。 73 | 74 | == 插图格式要求 75 | 76 | 插图力求精炼,且每个插图均应有图序和图名。图序与图名位于插图下方,图序一般按章节编排,如图1-1(第一章第1个图),在插图较少时可以全文连续编序,如图10。 77 | 78 | 插图居中排列,与上文文本之间空一行。图序图名设置为五号宋体居中,图序与图名之间空一格。 79 | 80 | 81 | 本模板采用按章节编号的方式。如果需要插入带自动编号的图片,需要使用`#figure`。例如,使用下面的代码插入带编号的图片: 82 | 83 | #code( 84 | ```typst 85 | #figure( 86 | image("./demo_image/24h_rain.png", width: 8.36cm),// 宽度/高度需要自行调整 87 | caption: [每小时降水量24小时均值分布图] 88 | ) <每小时降水量24小时均值分布图> 89 | ``` 90 | ) 91 | 92 | #figure( 93 | image("./demo_image/24h_rain.png", width: 8.36cm), 94 | caption: [每小时降水量24小时均值分布图] 95 | )<每小时降水量24小时均值分布图> 96 | 97 | 通常情况下,插入图、表等组件后,后续的首个段落会依然存在首行缩进。如果不需要此缩进,需要使用 ```typ #h(-2em)``` 手动取消该自然段的缩进。 98 | 99 | 如一个插图由两个及以上的分图组成,分图用(a)、(b)、(c)等标出,并标出分图名。目前,本模板尚未实现分图的字母自动编号。如需要分图,建议使用 ```typ #grid``` 来构建。例如: 100 | 101 | #code( 102 | ```typst 103 | #figure( 104 | grid( 105 | columns: (3.83cm, 5.51cm), 106 | image("./demo_image/2-2a.png") + "(a) 速度障碍集合", 107 | image("./demo_image/2-2b.png") + "(b) 避免碰撞集合" 108 | ), 109 | caption: "速度障碍法速度选择" 110 | ) 111 | ``` 112 | ) 113 | 114 | 115 | #figure( 116 | grid( 117 | columns: (3.83cm, 5.51cm), 118 | image("./demo_image/2-2a.png") + "(a) 速度障碍集合", 119 | image("./demo_image/2-2b.png") + "(b) 避免碰撞集合" 120 | ), 121 | caption: "速度障碍法速度选择" 122 | ) 123 | 124 | 实际使用中,网格划分、网格大小调整需要自行操作。 125 | 126 | 如果需要在文中引用这些图表,应当先给对应部分打 label ,再到需要引用的地方使用 ```typ @``` ,注意引用公式、图表需要添加相应的前缀,如 ```typ @tbl:``` ```typ @fig:``` ```typ @eqt:```。例如,上面的@fig:每小时降水量24小时均值分布图 中使用 ```typ <每小时降水量24小时均值分布图>``` 添加了 label ,然后,使用```typ @fig:每小时降水量24小时均值分布图```引用,即可得到“@fig:每小时降水量24小时均值分布图”。 127 | 128 | == 表格格式要求 129 | 130 | 表格的结构应简洁,一律采用三线表,应有表序和表名,且表序和表名位于表格上方。表格可以逐章单独编序(如:表2.1),也可以统一编序(如:表10),采用哪种方式应和插图及公式的编序方式统一。表序必须连续,不得重复或跳跃。 131 | 132 | 带编号、表名的表格需要使用 ```typ #figure``` 包裹,才能自动编号。方式与上方图片相仿,或者查看下面的代码说明。表格本身建议使用函数 `table` 或第三方库 `tablem` 库绘制。使用 `tablem` 库时,`#figure` 可能会认为其包裹的内容不是 `table` 类型,而编号“图X-X”。可以通过添加 `kind: table` 声明这是一个表格。 133 | 134 | 表格无法在同一页排版时,可以用续表的形式另页书写,续表需在表格右上角表序前加“续”字,如“续表2.1”,并重复表头。请注意:目前此模板内,```typ #figure``` 包裹的单个表格强制显示在同一页上,不会发生跨页现象。如果按照 https://github.com/typst/typst/pull/1121 启用了 ```typ #show figure: set block(breakable: true)```,那么跨页表格第二页暂时不会显示“续表”与表名。#strong[由于在教务处给出的Word模板中,跨页表格并没有加注“续表”,也没有给出“续表”的格式样例,因此本模板暂未实现相关功能。]如果使用 `table` 声明表头的特性,第二页会重复表头。 135 | 136 | 表格居中,边框为黑色直线1磅,中文为五号宋体,英文及数字为五号Times New Roman字体,表序与表名之间空一格,表格与下文之间空一行。#strong[在教务处给出的Word模板中,文字说明是表格边框为黑色直线1磅,但示例的表格边框是0.5磅,自相矛盾。请自行根据需求与格式要求调整框线粗细。] 137 | 138 | 在Typst中,绘制三线表的方法一般是设置 `table` 的 `stroke` 为 `none`,再通过 `table.hline()` 手动绘制横向分割线。可以使用 `table.hline(stroke: 0.5pt)` 类似的方法指定线条宽度,默认是 `1pt` (1磅)。 139 | 140 | 141 | #code( 142 | ```typst 143 | #figure( 144 | { 145 | //show table.cell.where(y:0): set text(weight: "bold") // 取消这一行的注释可以首行加粗 146 | table( 147 | columns: 13, 148 | rows: 1.8em, 149 | align: center + horizon, 150 | stroke: none, 151 | table.header( 152 | table.hline(), 153 | [], table.cell(colspan: 4)[Stage 1 (>7.1 μm)], table.cell(colspan: 4)[Stage 2 (4.8-7.1 μm)], table.cell(colspan: 4)[Stage 3 (3.2-4.7 μm)], 154 | table.hline(stroke: 0.5pt, start: 1), // 调整线条粗细 155 | [], [Con], [Low], [Medium], [High], [Con], [Low], [Medium], [High], [Con], [Low], [Medium], [High], 156 | table.hline(), 157 | ), 158 | 159 | [H], [2.52], [2.58], [2.57], [2.24], [2.48], [2.21], [2.21], [2.36], [2.66], [2.65], [2.64], [2.53], 160 | 161 | [E], [0.87], [0.88], [0.93], [0.85], [0.9], [0.86], [0.86], [0.85], [0.9], [0.9], [0.85], [0.88], 162 | table.hline(), 163 | ) 164 | }, 165 | caption: "室外细菌气溶胶香农-维纳指数(H)和均匀性指数(E)", 166 | ) 167 | ``` 168 | ) 169 | 170 | #figure( 171 | { 172 | //show table.cell.where(y:0): set text(weight: "bold") // 取消这一行的注释可以首行加粗 173 | table( 174 | columns: 13, 175 | rows: 1.8em, 176 | align: center + horizon, 177 | stroke: none, 178 | table.header( 179 | table.hline(), 180 | [], table.cell(colspan: 4)[Stage 1 (>7.1 μm)], table.cell(colspan: 4)[Stage 2 (4.8-7.1 μm)], table.cell(colspan: 4)[Stage 3 (3.2-4.7 μm)], 181 | table.hline(stroke: 0.5pt, start: 1), // 调整线条粗细 182 | [], [Con], [Low], [Medium], [High], [Con], [Low], [Medium], [High], [Con], [Low], [Medium], [High], 183 | table.hline(), 184 | ), 185 | 186 | [H], [2.52], [2.58], [2.57], [2.24], [2.48], [2.21], [2.21], [2.36], [2.66], [2.65], [2.64], [2.53], 187 | 188 | [E], [0.87], [0.88], [0.93], [0.85], [0.9], [0.86], [0.86], [0.85], [0.9], [0.9], [0.85], [0.88], 189 | table.hline(), 190 | ) 191 | }, 192 | caption: "室外细菌气溶胶香农-维纳指数(H)和均匀性指数(E)", 193 | ) 194 | 195 | // 表格太多懒得手敲了 196 | 197 | == 表达式 198 | 199 | 论文中的公式应注序号并加圆括号,序号一律用阿拉伯数字连续编序(如(28))或逐章编序(如(3.6)),编号方式应与插图、表格方式一致。序号排在版面右侧,且距右边距离相等。公式与序号之间不加虚线。本模板采用按章节编号的方式。 200 | 201 | 长公式在一行无法写完的情况下,原则上应在等号(或数学符号,如“+”、“-”号)处换行,数学符号在换行的行首。 202 | 203 | 公式及文字中的一般变量(或一般函数)(如坐标$X$、$Y$,电压$V$,频率$f$)宜用斜体,矢量用粗斜体如$bold(S)$或白斜体上加单箭头$limits(S)^arrow$,常用函数(如三角函数$cos$、对数函数$ln$等)、数字运算符、化学元素符号及分子式、单位符号、产品代号、人名地名的外文字母等用正体。 204 | 205 | Typst 的公式与 LaTeX 写法不同,参见 Typst 官方文档。 206 | 207 | 在 Typst 中,使用 `$$` 包裹公式以获得行内公式,在公式内容两侧增加空格以获得块公式。如 ```typ $alpha + beta = gamma$``` 会获得行内公式 $alpha + beta = gamma$,而加上两侧空格,写成 ```typ $ alpha + beta = gamma $``` ,就会变成带自动编号的块公式: 208 | 209 | $ alpha + beta = gamma $ 210 | 211 | 与图表相同,公式后的第一段通常也会自动缩进。 212 | 213 | 多行公式可以使用 `\ ` 换行(反斜杠紧跟空格或者反斜杠紧跟换行)。与 LaTeX 类似,`&` 可以用于声明对齐关系。 214 | 215 | #code( 216 | ```typst 217 | $ E_"ocv" &= 1.229 - 0.85 times 10^(-3) (T_"st" - T_0) \ 218 | &+ 4.3085 times 10^(-5) T_"st" [ln(P_H_2/1.01325)+1/2 ln(P_O_2/1.01325)] 219 | $ 220 | ``` 221 | ) 222 | 223 | $ E_"ocv" &= 1.229 - 0.85 times 10^(-3) (T_"st" - T_0) \ 224 | &+ 4.3085 times 10^(-5) T_"st" [ln(P_H_2/1.01325)+1/2 ln(P_O_2/1.01325)] 225 | $ 226 | 227 | 228 | == 注释 229 | 230 | 正文中有个别名词或情况需要解释时,可加注说明,注释采用页末注(将注文放在加注页的下端)。在引文的右上角标注序号①、②、……,如“马尔可夫链#footnote[马尔可夫链表示……]”。若在同一页中有两个以上的注时,按各注出现的先后,顺序编号。引文序号,以页为单位,且注释只限于写在注释符号出现的同页,不得隔页。 231 | 232 | 注释应当采用 `#footnote` 插入。如上方的“马尔科夫链”及其注释,是通过下面的代码插入的。 233 | 234 | #code( 235 | ```typst 236 | 马尔可夫链#footnote[马尔可夫链表示……] 237 | ``` 238 | ) 239 | 240 | 241 | = 总结与展望 242 | 243 | == 工作总结 244 | 245 | 上述标题第三章仅为示例,实际论文报告可根据研究内容按序编排章节,最后一章结论与展望着重总结论文的创新点或新见解及研究展望或建议。 246 | 247 | 结论是对论文主要研究结果、论点的提炼与概括,应准确、简明、完整、有条理,使人看后就能全面了解论文的意义、目的和工作内容。主要阐述自己的创造性工作及所取得的研究成果在本学术领域中的地位、作用和意义。 248 | 249 | 结论要严格区分自己取得的成果与导师及他人的科研工作成果。在评价自己的研究工作成果时,要实事求是,除非有足够的证据表明自己的研究是“首次”的、“领先”的、“填补空白”的,否则应避免使用这些或类似词语。 250 | 251 | == 工作展望 252 | 253 | 展望或建议,是在总结研究工作和现有结论的基础上,对该领域今后的发展方向及重要研究内容进行预测,同时对所获研究结果的应用前景和社会影响加以评价,从而对今后的研究有所启发。 254 | 255 | == 为了参考文献而加的章节 256 | 257 | 参考文献需要使用 bib 格式的引用文献表,再在正文中通过 `@labelname` 方式引用。如 258 | 259 | 260 | #code( 261 | ```typst 262 | 这里有一段话 @kopka2004guide. 263 | 264 | 引用多个会自动合并 @kopka2004guide @wang2010guide 。 265 | ``` 266 | ) 267 | 268 | 这里有一段话 @kopka2004guide,引用多个会自动合并 @kopka2004guide @wang2010guide 。 269 | 270 | 目前参考文献格式不符合教务处要求,会在今后重制/寻找合适的 csl 文件。 271 | 272 | 当前(Typst 0.12.x)的 GB/T 7714-2015 参考文献功能仍有较多问题;东大使用的参考文献也不是标准的 GB/T 7714-2015 格式。目前,我们尝试使用曲线方法解决: 273 | 274 | 为了生成中英文双语的参考文献表,本模板实验性地引入了 `bilingual-bibliography` 。有关该功能的详细信息,请访问 https://github.com/nju-lug/modern-nju-thesis/issues/3 。如果出现参考文献显示不正常的情况,请前往 https://github.com/csimide/SEU-Typst-Template/issues/1 反馈。 275 | 276 | 模板提供了 `bilingual-bib` 参数,用于控制是否使用 `bilingual-bibliography`。当 `bilingual-bib` 参数设置为 `true` 时,模板会使用 `bilingual-bibliography` 渲染。 277 | 278 | 本模板附带的 `gb-t-7714-2015-numeric-seu.csl` 是“修复”部分 bug 的 CSL 文件。该格式和东大格式不完全吻合,但比自带的 `gb7714-2015` 稍微符合一些。 279 | 280 | 参考文献过后,需要使用```typ #show: show-appendix```进入附录部分。 281 | 282 | #bibliography( 283 | "ref.bib", // 替换为自己的bib路径 284 | style: "gb-t-7714-2015-numeric-seu-bachelor.csl" 285 | ) 286 | 287 | #show: show-appendix 288 | 289 | = 这里是附录内容 290 | 291 | == 附录测试1 292 | 293 | 在参考文献之后的章节会自动编为附录。同样,图表等要素在此都会使用 A B C 序号。例如: 294 | 295 | $ a^2 + b^2 = c^2 $ 296 | 297 | #figure( 298 | [(假装这里是表格内容)], 299 | caption: [附录中的一个表格], 300 | kind: table, 301 | ) 302 | 303 | #thanks[ 304 | 305 | 学位论文正文和附录之后,一般应放置致谢(后记或说明),主要感谢指导老师和对论文工作有直接贡献和帮助的人士和单位。致谢言语应谦虚诚恳,实事求是。字数一般不超过1000个汉字。 306 | 307 | “致谢”用三号黑体加粗居中,两字之间空4个半角空格。致谢内容为小四号宋体,1.5倍行距。 308 | 309 | 若需要渲染致谢,请用 ```typ #thanks[内容]```。 310 | ] -------------------------------------------------------------------------------- /init-files/bachelor_trans.typ: -------------------------------------------------------------------------------- 1 | #import "../seu-thesis/lib.typ": bachelor-trans-conf, bachelor-utils 2 | #let (thanks, show-appendix) = bachelor-utils 3 | 4 | 5 | #show: bachelor-trans-conf.with( 6 | student-id: "00121001", 7 | author: "王东南", 8 | school: "示例学院", 9 | major: "示例专业", 10 | advisor: "湖牌桥", 11 | thesis-name-cn: "新兴排版方式下的摸鱼科学优化研究", 12 | thesis-name-raw: "Optimization of Fish-Touching Strategies \n in Emerging Typesetting Environments", 13 | date: "某个完成日期", 14 | cn-abstract: [示例摘要], 15 | cn-keywords: ("关键词1", "关键词2"), 16 | en-abstract: [如果需要隐藏英文摘要页,只需要将 `en-abstract` 和 `en-keywords` 都设为 none。 \ #lorem(100)], 17 | en-keywords: ("Keywords1", "Keywords2"), 18 | outline-depth: 3, 19 | ) 20 | 21 | = 使用说明 22 | 23 | 翻译模板的使用方法与毕设模板完全相同,因此不再重复叙述。 -------------------------------------------------------------------------------- /init-files/degree_thesis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/init-files/degree_thesis.pdf -------------------------------------------------------------------------------- /init-files/degree_thesis.typ: -------------------------------------------------------------------------------- 1 | #import "../seu-thesis/lib.typ": degree-conf, degree-utils 2 | #let (thanks, show-appendix) = degree-utils 3 | 4 | /* 5 | 使用模板前,请先安装 https://github.com/csimide/SEU-Typst-Template/tree/master/fonts 内的所有字体。 6 | 如果使用 Web App,请将这些字体上传到 Web App 项目的根目录中。 7 | */ 8 | 9 | // 由于研究生院模板没有严格规定代码块的字体,为了美观,在此设定代码块字体 10 | #show raw: set text(font: ("Fira Code", "SimHei")) 11 | #import "@preview/codelst:2.0.2": sourcecode 12 | #let code = sourcecode 13 | 14 | #let terminology = [ 15 | 16 | 如果有必要可以设置此注释表。此部分内容可根据论文中采用的符号、变量、缩略词等专用术语加以定义和注释,以便于论文阅读和迅速查出某符号的明确含义。 17 | 18 | 术语表建议使用 ```typ #let``` 语句另行定义,再通过参数传入模板。 19 | 20 | 一般来说,请用 ```typ #table``` 绘制表格。如果想让术语表也有编号,可以使用 ```typ #figure```。 21 | 22 | `table` 的用法请见 Typst 文档。 23 | 24 | #figure( 25 | table( 26 | columns: (1fr, 1fr), 27 | align: center + horizon, 28 | rows: auto, 29 | inset: 8pt, 30 | stroke: none, 31 | //auto-vlines: false, 32 | table.hline(), 33 | table.header[*符号、变量、缩略词等*][*含义*], 34 | table.hline(stroke: 0.5pt), 35 | [SEU],table.vline(stroke: 0.5pt), [东南大学], 36 | table.hline(stroke: 0.5pt), 37 | [Typst],[Typst is a new markup-based typesetting system for the sciences.], 38 | table.hline(), 39 | ), 40 | kind: table, 41 | caption: [本论文专用术语(符号、变量、缩略词等)的注释表] 42 | ) 43 | 44 | 当 `terminology` 为 `none` 时,此注释表页面不会被渲染。 45 | ] 46 | 47 | 48 | #show: doc => degree-conf( 49 | author: (CN: "王东南", EN: "WANG Dong-nan", ID: "012345"), 50 | thesis-name: ( 51 | CN: "摸鱼学硕士学位论文", 52 | EN: [ 53 | A Thesis submitted to \ 54 | Southeast University \ 55 | For the Academic Degree of Master of Touching Fish 56 | ], 57 | heading: "东南大学硕士学位论文" 58 | ), 59 | title: ( 60 | CN: "摸鱼背景下的Typst模板使用研究", 61 | EN: "A Study of the Use of the Typst Template During Touching Fish" 62 | ), 63 | advisors: ( 64 | (CN: "湖牌桥", EN:"HU Pai-qiao", CN-title: "教授", EN-title: "Prof."), 65 | (CN: "苏锡浦", EN:"SU Xi-pu", CN-title: "副教授", EN-title: "Associate Prof.") 66 | ), 67 | school: ( 68 | CN: "摸鱼学院", 69 | EN: "School of Touchingfish" 70 | ), 71 | major: ( 72 | main: "摸鱼科学", 73 | submajor: "计算机摸鱼" 74 | ), 75 | degree: "摸鱼学硕士", 76 | category-number: "N94", 77 | secret-level: "公开", 78 | UDC: "303", 79 | school-number: "10286", 80 | committee-chair: "张三 教授", 81 | readers: ( 82 | "李四 副教授", 83 | "王五 副教授" 84 | ), 85 | date: ( 86 | CN: ( 87 | defend-date: "2099年01月02日", 88 | authorize-date: "2099年01月03日", 89 | finish-date: "2024年01月15日" 90 | ), 91 | EN: ( 92 | finish-date: "Jan 15, 2024" 93 | ) 94 | ), 95 | thanks: "本论文受到摸鱼基金委的基金赞助(123456)", 96 | degree-form: "应用研究", 97 | cn-abstract: [ 98 | 论文摘要包括题名、硕士(博士)研究生姓名、导师姓名、学校名称、正文、关键词中文约 500 字左右,英文约 200~300 词左右,二者应基本对应。它是论文内容的高度概括,应说明研究目的、研究方法、成果和结论,要突出本论文的创造性成果或新的见解,用语简洁、准确。论文摘要后还应注明本文的关键词 3 至 5 个。关键词应为公知公用的词和学术术语,不可采用自造字词和略写、符号等,词组不宜过长。 99 | ], 100 | cn-keywords: ("关键词1", "关键词2"), 101 | en-abstract: [ 102 | 英文摘要采用第三人称单数语气介绍该学位论文内容,目的是便于其他文摘摘录,因此在写作英文文摘时不宜用第一人称的语气陈述。叙述的基本时态为一般现在时,确实需要强调过去的事情或者已经完成的行为才使用过去时、完成时等其他时态。可以采用被动语态,但要避免出现用“This paper”作为主语代替作者完成某些研究行为。中国姓名译为英文时用汉语拼音,按照姓前名后的原则,姓、名均用全名,不宜用缩写。姓全用大写,名的第一个字母大写,名为双中文字时两个字的拼音之间可以不用短划线,但容易引起歧义时必须用短划线。例如“冯长根”译为“FENG Changgen”或“FENG Chang-gen”,而“冯长安”则必须译为“FENG Chang-an”。论文英文封面上的署名也遵守此规定。 103 | 104 | #lorem(100) 105 | ], 106 | en-keywords: ("Keywords1", "Keywords2"), 107 | always-start-odd: true, 108 | terminology: terminology, 109 | anonymous: false, // 选项暂时无用,未来用于渲染盲审版本 110 | first-level-title-page-disable-heading: false, // 一级标题页不显示页眉 111 | // 启用此选项后,“第X章 XXXXX” 一级标题所在页面将不显示页眉 112 | bilingual-bib: true, 113 | doc, 114 | ) 115 | 116 | 117 | = 封面、扉页、摘要说明 118 | 119 | 模板的封面、扉页、摘要内容都是在参数中传入的。使用方法请参考本 Demo 文档。 120 | 121 | 封面的部分横线长度可能不合适,请在 https://github.com/csimide/SEU-Typst-Template/issues 提交反馈以便修改。 122 | 123 | 若摘要等过长,也可以先行定义摘要变量,再将其作为参数传入。 124 | 125 | 126 | = 正文内容说明 127 | 128 | 正文是学位论文的主体。内容可因研究课题的性质不同而有所变化。一般可包括:文献综述、理论基础、计算方法、实验方法、经过整理加工的实验结果的分析讨论、见解和结论。正文一律用阿拉伯数字编排页码,页码在底部居中。正文之前的摘要、目录等内容单独编排罗马数字页码。 129 | 130 | == 绪论(前言) 131 | 132 | 本研究课题国内外已有的重要文献的扼要概括,阐明研究此课题的目的、意义,研究的主要内容和所要解决的问题。本研究工作在国民经济建设和社会发展中的理论意义与实用价值。 133 | 134 | == 文献综述 135 | 136 | 在查阅国内外文献和了解国内外有关科技情况的基础上,围绕课题涉及的问题,综述前人工作情况,达到承前启后的目的。要求:(1)总结课题方向至少 10 年以来的国内外动态;(2)明确前人的工作水平;(3)介绍目前尚存在的问题;(4)说明本课题的主攻方向。文献总结应达到可独立成为一篇综述文章的要求。 137 | 138 | 139 | == 理论分析、数值计算或统计分析 140 | 141 | 利用研究生本人所掌握的理论知识对所选课题进行科学地、严密地理论分析、数值计算或统计分析,剖析课题,提出自己的见解。 142 | 143 | == 实验原理、实验方法及实验装置 144 | 145 | 学位论文要求对实验原理、方法、装置、步骤和有关参数有较详细的阐述,以便评阅人及答辩委员会审核实验的可靠性,并能对实验进行重复以便验证结果的可靠性,也为以后的研究者提供一个较完整的研究方法。 146 | 147 | == 实验结果及分析 148 | 149 | 列出数据的图或表,并对数据结果进行讨论,对比分析、结果推论要严格准确,避免采用模棱两可的评定语言。对反常的数据要保留并做解释或者说明,不可随意剔除数据做出有违科学公正的行为。引用别人的研究成果及数据应加注参考文献,较长的公式推导可列入附录。采纳文献及引用数据应为可以公开并能重复查到的文献资源,并需标明准确出处(如页码或图表序号等)。正文引用文献一律用右上角方括号内的次序号(阿拉伯数字)以“上标”格式标示。 150 | 151 | == 图、表、公式、计量单位和数字用法的规定 152 | 153 | === 图 154 | 155 | 图包括曲线图、构造图、示意图、图解、框图、流程图、地图、照片等。图应具有“自明性”,即只看图、图题和图例,不阅读全文,就可理解图意。图应编排序号,可按章用阿拉伯数字顺序编排,例如图 3-1。插图较少时可按全文编排,如图 1、图 2……,若有分图用(a)(b)(c)表示,图注在图名下方,内容按序编号并用分号“;”隔开。 156 | 157 | 每一图应有简短确切的题名,连同图号置于图下。图题、图号字体与正文相同,字体也可改用仿宋以示与正文的区别。必要时,应将图上的符号、标记、代码以及实验条件等,用最简练的文字,横排于图题下方,作为图例说明。 158 | 159 | 本模板采用按章节编号的方式。如果需要插入带自动编号的图片,需要使用```typ #figure```。例如,使用下面的代码插入带编号的图片: 160 | 161 | #code( 162 | ```typst 163 | #figure( 164 | image("./demo_image/24h_rain.png", width: 8.36cm),// 宽度/高度需要自行调整 165 | caption: [每小时降水量24小时均值分布图] 166 | ) 167 | ``` 168 | ) 169 | 170 | #figure( 171 | image("./demo_image/24h_rain.png", width: 8.36cm), 172 | caption: [每小时降水量24小时均值分布图] 173 | ) 174 | 175 | 通常情况下,插入图、表等组件后,后续的首个段落会依然存在首行缩进。如果不需要此缩进,需要使用 ```typ #h(-2em)``` 手动取消该自然段的缩进。 176 | 177 | 178 | 如一个插图由两个及以上的分图组成,分图用(a)、(b)、(c)等标出,并标出分图名。目前,本模板尚未实现分图的字母自动编号。如需要分图,建议使用 `#grid` 来构建。例如: 179 | 180 | #code( 181 | ```typst 182 | #figure( 183 | grid( 184 | columns: (3.83cm, 5.51cm), 185 | image("./demo_image/2-2a.png") + "(a) 速度障碍集合;", 186 | image("./demo_image/2-2b.png") + "(b) 避免碰撞集合" 187 | ), 188 | caption: "速度障碍法速度选择" 189 | ) 190 | ``` 191 | ) 192 | 193 | #figure( 194 | grid( 195 | columns: (3.83cm, 5.51cm), 196 | image("./demo_image/2-2a.png") + "(a) 速度障碍集合;", 197 | image("./demo_image/2-2b.png") + "(b) 避免碰撞集合" 198 | ), 199 | caption: "速度障碍法速度选择" 200 | ) 201 | 202 | 实际使用中,网格划分、网格大小调整需要自行操作。 203 | 204 | === 表 205 | 206 | 表的编排,一般是内容和测试项目由左至右横读,数据依序竖排。表应有自明性并采用阿拉伯数字编排序号,如表 1、表 2 等,表格较多时可按章排序,如表 1.1、@table1 等。 207 | 208 | 带编号、表名的表格需要使用 `#figure` 包裹,才能自动编号。方式与上方图片相仿,或者查看下面的代码说明。表格本身建议使用函数 `table` 、或第三方库 `tablem` 库绘制。使用 `tablem` 库时,`#figure` 可能会认为其包裹的内容不是 `table` 类型,而编号“图X-X”。可以通过添加 `kind: table` 声明这是一个表格。 209 | 210 | #code( 211 | ```typst 212 | #figure( 213 | { 214 | set table.cell(stroke: (top: 0.8pt, bottom: 0.8pt, left: 0pt, right: 0pt)) 215 | show table.cell.where(y:0): set text(weight: "bold") 216 | table( 217 | columns: 13, 218 | rows: 1.8em, 219 | align: center + horizon, 220 | table.header( 221 | [], table.cell(colspan: 4)[Stage 1 (>7.1 μm)], table.cell(colspan: 4)[Stage 2 (4.8-7.1 μm)], table.cell(colspan: 4)[Stage 3 (3.2-4.7 μm)], 222 | ), 223 | 224 | [], [Con], [Low], [Medium], [High], [Con], [Low], [Medium], [High], [Con], [Low], [Medium], [High], 225 | 226 | [H], [2.52], [2.58], [2.57], [2.24], [2.48], [2.21], [2.21], [2.36], [2.66], [2.65], [2.64], [2.53], 227 | 228 | [E], [0.87], [0.88], [0.93], [0.85], [0.9], [0.86], [0.86], [0.85], [0.9], [0.9], [0.85], [0.88] 229 | ) 230 | }, 231 | caption: "室外细菌气溶胶香农-维纳指数(H)和均匀性指数(E)", 232 | ) 233 | ``` 234 | ) 235 | 236 | #figure( 237 | { 238 | set table.cell(stroke: (top: 0.8pt, bottom: 0.8pt, left: 0pt, right: 0pt)) 239 | show table.cell.where(y:0): set text(weight: "bold") 240 | table( 241 | columns: 13, 242 | rows: 1.8em, 243 | align: center + horizon, 244 | table.header( 245 | [], table.cell(colspan: 4)[Stage 1 (>7.1 μm)], table.cell(colspan: 4)[Stage 2 (4.8-7.1 μm)], table.cell(colspan: 4)[Stage 3 (3.2-4.7 μm)], 246 | ), 247 | 248 | [], [Con], [Low], [Medium], [High], [Con], [Low], [Medium], [High], [Con], [Low], [Medium], [High], 249 | 250 | [H], [2.52], [2.58], [2.57], [2.24], [2.48], [2.21], [2.21], [2.36], [2.66], [2.65], [2.64], [2.53], 251 | 252 | [E], [0.87], [0.88], [0.93], [0.85], [0.9], [0.86], [0.86], [0.85], [0.9], [0.9], [0.85], [0.88] 253 | ) 254 | }, 255 | caption: "室外细菌气溶胶香农-维纳指数(H)和均匀性指数(E)", 256 | ) 257 | 258 | 每一表应有简短确切的题名,连同表号置于表上。必要时,应将表中的符号、标记、代码以及需要说明事项,以最简练的文字,横排于表题下,作为表注,也可以附注于表下。表内附注的序号宜用小号阿拉伯数字并加右圆括号置于被标注对象的右上角,如:×××1),不宜用星号“\*”,以免与数学上共轭的符号相混。目前,本模板暂未实现表内“1)”格式的附注。 259 | 260 | 表的各栏均应标明“量(或测试项目)、标准规定符号、单位”。只有在无必要标注的情况下方可省略。表中的缩略词和符号,必须与正文中一致。 261 | 262 | 表内同一栏的数字必须上下对齐。表内不宜用“同上”、“同左”、“″”和类似词,应一律填入具体数字或文字。表内“空白”代表未测或无此项,“-”或“…”代表未发现(当“-”可能与代表阴性反应相混时用“…”代替),“0”表示实测结果确为零。 263 | 264 | === 数学、物理符号和化学式 265 | 266 | 正文中的公式、算式或方程式等应编排序号,序号标注于该式所在行的最右边;当有续行时,应标注于最后一行的最右边。 267 | 268 | 公式及文字中的一般变量(或一般函数)(如坐标$X$、$Y$,电压$V$,频率$f$)宜用斜体,矢量用粗斜体如$bold(S)$或白斜体上加单箭头$limits(S)^arrow$,常用函数(如三角函数$cos$、对数函数$ln$等)、数字运算符、化学元素符号及分子式、单位符号、产品代号、人名地名的外文字母等用正体。 269 | 270 | Typst 的公式与 LaTeX 写法不同,参见 Typst 官方文档。 271 | 272 | 在 Typst 中,使用 ```typ $$``` 包裹公式以获得行内公式,在公式内容两侧增加空格以获得块公式。如 ```typ $alpha + beta = gamma$``` 会获得行内公式 $alpha + beta = gamma$,而加上两侧空格,写成 ```typ $ alpha + beta = gamma $``` ,就会变成带自动编号的块公式: 273 | 274 | $ alpha + beta = gamma $ 275 | 276 | 与图表相同,公式后的第一段通常也会自动缩进。 277 | 278 | 多行公式可以使用 `\ ` 换行(反斜杠紧跟空格或者反斜杠紧跟换行)。与 LaTeX 类似,`&` 可以用于声明对齐关系。 279 | 280 | #code( 281 | ```typst 282 | $ E_"ocv" &= 1.229 - 0.85 times 10^(-3) (T_"st" - T_0) \ 283 | &+ 4.3085 times 10^(-5) T_"st" [ln(P_H_2/1.01325)+1/2 ln(P_O_2/1.01325)] 284 | $ 285 | ``` 286 | ) 287 | 288 | $ 289 | E_"ocv" &= 1.229 - 0.85 times 10^(-3) (T_"st" - T_0) \ 290 | &+ 4.3085 times 10^(-5) T_"st" [ln(P_H_2/1.01325)+1/2 ln(P_O_2/1.01325)] 291 | $ 292 | 293 | 294 | 公式首行的起始位置位于行首算起第五个中文字符之处,即在段落起始行的首行缩进位置再退后两个中文字符。不要用居中、居左或居行首排列。公式编号按阿拉伯数字顺序编号,如(1)(2)……,公式较多时可按章顺序编号,如(1.1)(1.2)……。 295 | 296 | *由于目前实现公式首行空四格的做法是修改对齐方式,故如遇多行公式,请手动为每行公式添加对齐,否则公式的位置将错位。* 297 | 298 | 公式引用使用式 1、式 1.1 等,英语文本中用 Eq.1、Eq.1.1 等。在 Typst 中,可以给公式添加 label 再引用。例如引用 @eqt:eqexample。 299 | 300 | 请注意,引用公式、图表需要添加相应的前缀,如 ```typ @tbl:``` ```typ @fig:``` ```typ @eqt:```。 301 | 302 | #code( 303 | ```typst 304 | $ alpha + beta = gamma $ 305 | 306 | 例如引用@eqt:eqexample。 307 | ``` 308 | ) 309 | 310 | 较短的公式一般一式一行并按顺序编号,后面一式若为前面一式的注解(如下标范围 i=1,3,5,……)可用括号括起来与前面一式并排一行。较长的公式必须转行时,只能在=、≈、+、-、×、÷、<、>处转行。上下式尽可能在等号“=”处对齐。公式中符号尚未说明者应有说明,符号说明之间用分号隔开,一般一个符号占一行。 311 | 312 | 不需编号的公式也可以不用另起行。如:$I=V \/ R$ 。在上文的“行内公式”已经解说,此处不再赘述。由于 Typst 默认尝试使用数学方式表现,例如 ```typ $I=V / R$``` 会显示为 $I=V / R$,而研院的排版要求中说明“不宜采用竖式,以便使行距均匀,编排整齐。”故有时需要使用转义方式输入斜杠,如 ```typ $I=V \/ R$```。 313 | 314 | === 计量单位和数字用法 315 | 316 | 论文必须采用 1984 年 2 月 27 日国务院发布的《中华人民共和国法定计量单位》,并遵照《中华人民共和国法定计量单位使用方法》执行。各种量、单位和符号,必须遵循国家标准的规定执行。数字和单位用法应遵照 GB/T 15835,例如: 317 | 318 | 不宜在文字中间夹杂使用数学(物理)符号、计量单位符号,例如“钢轨每 m 重量<50kg”应写成“钢轨每米重量小于 50kg”; 319 | 320 | 纯小数在小数点前面的 0 不能省略; 321 | 322 | 百分数及幂次数量范围应完整表达,如“20%\~40%”不应写作“20\~40%”,“3×102 323 | \~5×102”不能写成“3\~5×102”;避免让单位误为词头,如力矩单位 N·m 或 Nm 不能写成 mN;组合单位中的斜线不能多于一条,如 w/(m2·℃)不能写成 w/m2/℃。 324 | 325 | 注意:`~` 在 Typst 的书写环境中是不断行空格。如果需要输入 `~` 本身,可能需要转义为 `\~` 输入。 326 | 327 | == 结论 328 | 329 | 结论应该观点明确、严谨、完整、准确,文字必须简明扼要,要阐明本人在科研工作中的创造性成果、新见解及其意义,本文成果在本领域中的地位和作用,对存在的问题和不足应做出客观的叙述和提出建议。 330 | 331 | 应严格区分自己的成果与导师科研成果和前人已有研究的界限。 332 | 333 | == 为引用文献而添加的章节 334 | 335 | 336 | 参考文献需要使用 bib 格式的引用文献表,再在正文中通过 ```typ @labelname``` 方式引用。如 337 | 338 | 339 | #code( 340 | ```typst 341 | 这里有一段话 @kopka2004guide. 342 | 343 | 引用多个会自动合并 @kopka2004guide @wang2010guide 。 344 | ``` 345 | ) 346 | 347 | 这里有一段话 @kopka2004guide,引用多个会自动合并 @kopka2004guide @wang2010guide 。 348 | 349 | 350 | 目前参考文献格式不符合研究生院要求,会在今后重制/寻找合适的 csl 文件。 351 | 352 | 完成上述操作后,*在致谢章节之后!致谢章节之后!致谢章节之后!*,添加 353 | 354 | #code( 355 | ```typst 356 | #bibliography( 357 | "ref.bib", // 替换为自己的bib路径 358 | style: "gb-t-7714-2015-numeric-seu-degree.csl" 359 | ) 360 | ``` 361 | ) 362 | 363 | 就会自动生成参考文献表。demo 使用的 `ref.bib` 来自 https://github.com/lucifer1004/pkuthss-typst 。 364 | 365 | 当前(Typst 0.12.x)的 GB/T 7714-2015 参考文献功能仍有较多问题;东大使用的参考文献也不是标准的 GB/T 7714-2015 格式。目前,我们尝试使用曲线方法解决: 366 | 367 | 为了生成中英文双语的参考文献表,本模板实验性地引入了 `bilingual-bibliography` 。有关该功能的详细信息,请访问 https://github.com/nju-lug/modern-nju-thesis/issues/3 。如果出现参考文献显示不正常的情况,请前往 https://github.com/csimide/SEU-Typst-Template/issues/1 反馈。 368 | 369 | 模板提供了 `bilingual-bib` 参数,用于控制是否使用 `bilingual-bibliography`。当 `bilingual-bib` 参数设置为 `true` 时,模板会使用 `bilingual-bibliography` 渲染。 370 | 371 | 本模板附带的 `gb-t-7714-2015-numeric-seu-degree.csl` 是“修复”部分 bug 的学位论文用 CSL 文件。该格式和东大格式不完全吻合,但比自带的 `gb7714-2015` 稍微符合一些。 372 | 373 | 374 | 375 | #thanks[ 376 | 377 | 致谢应当作为正文部分的最后一个章节出现。 378 | 379 | 可以在正文后对本论文学术研究有特别贡献的组织或个人表达谢意: 380 | 381 | 1、对提供资助或者支持的基金(基金项目应该包括基金名称、项目名称、项目编号、项目负责人、研究起止年月等)、合同单位、企业、组织或者个人; 382 | 383 | 2、协助完成研究工作或提供便利的组织或个人; 384 | 385 | 3、给予转载或者引用权的资料、图片、文献、研究设想的所有者。 386 | 387 | 致谢章节应当使用 ```typ #thanks[内容]``` 显示。 388 | 389 | 在致谢章节后,请添加 ```typ #bibliography``` 引用文献表。 390 | 391 | 参考文献过后,需要使用```typ #show: show-appendix```进入附录部分。 392 | 393 | ] 394 | 395 | #bibliography( 396 | "ref.bib", // 替换为自己的bib路径 397 | style: "gb-t-7714-2015-numeric-seu-degree.csl" 398 | ) 399 | 400 | #show: show-appendix // 进入附录部分 401 | 402 | 403 | = 附录说明 404 | 405 | 如果有必要可以设置附录。该部分包括与论文有关的原始数据明细表,较多的图表,计算程序及说明,过长的公式推导,或取材于复制品而不便于编入正文的材料等。附录一般与论文全文装订在一起,与正文一起编页码。如果附录内容很多,可独立成册。若有多个附录,则按大写英文字母编号排序,如附录 A、附录 B 等,每一个附录均另起一页。附录中的公式及图表编号应冠以附录序号字母加一短划线,如公式(A-2)、图 A-2,表 B-2 等。 406 | 407 | $ 408 | &1+2+ \ 409 | &3+4+\ 410 | &66666666 411 | $ 412 | 413 | #figure( 414 | { 415 | set table.cell(stroke: (top: 0.8pt, bottom: 0.8pt, left: 0pt, right: 0pt)) 416 | show table.cell.where(y:0): set text(weight: "bold") 417 | table( 418 | columns: 13, 419 | rows: 1.8em, 420 | align: center + horizon, 421 | table.header( 422 | [], table.cell(colspan: 4)[Stage 1 (>7.1 μm)], table.cell(colspan: 4)[Stage 2 (4.8-7.1 μm)], table.cell(colspan: 4)[Stage 3 (3.2-4.7 μm)], 423 | ), 424 | 425 | [], [Con], [Low], [Medium], [High], [Con], [Low], [Medium], [High], [Con], [Low], [Medium], [High], 426 | 427 | [H], [2.52], [2.58], [2.57], [2.24], [2.48], [2.21], [2.21], [2.36], [2.66], [2.65], [2.64], [2.53], 428 | 429 | [E], [0.87], [0.88], [0.93], [0.85], [0.9], [0.86], [0.86], [0.85], [0.9], [0.9], [0.85], [0.88] 430 | ) 431 | }, 432 | caption: "室外细菌气溶胶香农-维纳指数(H)和均匀性指数(E)", 433 | ) 434 | 435 | = 余下部分说明 436 | 437 | 在研院的格式要求中,余下部分还有索引、作者简介、后记(或鸣谢)、封底。目前本模板尚未支持这四个部分。 -------------------------------------------------------------------------------- /init-files/demo_image/2-2a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/init-files/demo_image/2-2a.png -------------------------------------------------------------------------------- /init-files/demo_image/2-2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/init-files/demo_image/2-2b.png -------------------------------------------------------------------------------- /init-files/demo_image/24h_rain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/init-files/demo_image/24h_rain.png -------------------------------------------------------------------------------- /init-files/gb-t-7714-2015-numeric-seu-bachelor.csl: -------------------------------------------------------------------------------- 1 | 2 | 476 | -------------------------------------------------------------------------------- /init-files/gb-t-7714-2015-numeric-seu-degree.csl: -------------------------------------------------------------------------------- 1 | 2 | 479 | -------------------------------------------------------------------------------- /init-files/ref.bib: -------------------------------------------------------------------------------- 1 | @article{wang2010guide, 2 | title = {科技论文中文摘要写作要点分析}, 3 | author = {王晓华 and 闫其涛 and 程智强 and 张睿}, 4 | journal = {编辑学报}, 5 | number = {S1}, 6 | pages = {53--55}, 7 | year = {2010} 8 | } 9 | 10 | @book{kopka2004guide, 11 | title = {Guide to LATEX}, 12 | author = {Kopka, Helmut and Daly, Patrick W and Rahtz, SPQ}, 13 | volume = {4}, 14 | year = {2004}, 15 | publisher = {Addison-Wesley Boston, MA} 16 | } 17 | 18 | -------------------------------------------------------------------------------- /init-files/thesis.typ: -------------------------------------------------------------------------------- 1 | /* 2 | 使用模板前,请先安装 https://github.com/csimide/SEU-Typst-Template/tree/master/fonts 内的所有字体。 3 | 如果使用 Web App,请将这些字体上传到 Web App 项目的根目录中。 4 | */ 5 | 6 | // 仅当使用 Web App 时,才应该使用此文件,否则都应该直接修改 `bachelor_thesis.typ` 或 `degree_thesis.typ` 文件。 7 | 8 | // 由于本模板组包括两个模板: bachelor 和 degree 9 | // 但是只能设置一个 entrypoint 10 | // 因此使用奇怪的方法来切换模板 11 | 12 | // 默认渲染 degree 13 | #include "degree_thesis.typ" 14 | // 注释上面一行,并取消注释下面这一行,可以渲染 bachelor 15 | // #include "bachelor_thesis.typ" 16 | 17 | // 然后,请修改对应的实际 typ 文件,即 `bachelor_thesis.typ` 或 `degree_thesis.typ` -------------------------------------------------------------------------------- /ref/bachelor_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/ref/bachelor_cover.png -------------------------------------------------------------------------------- /ref/东南大学本科毕业设计(论文)参考模板 (2024年1月修订).docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/ref/东南大学本科毕业设计(论文)参考模板 (2024年1月修订).docx -------------------------------------------------------------------------------- /ref/东南大学本科毕业设计(论文)参考模板 (2025年3月修订).docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/ref/东南大学本科毕业设计(论文)参考模板 (2025年3月修订).docx -------------------------------------------------------------------------------- /seu-thesis/assets/bachelor_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/seu-thesis/assets/bachelor_back.png -------------------------------------------------------------------------------- /seu-thesis/assets/bachelor_cover_adjusted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/seu-thesis/assets/bachelor_cover_adjusted.png -------------------------------------------------------------------------------- /seu-thesis/assets/bachelor_title.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /seu-thesis/assets/cover_school.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/seu-thesis/assets/cover_school.png -------------------------------------------------------------------------------- /seu-thesis/assets/icon/Box.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /seu-thesis/assets/icon/Checked.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /seu-thesis/assets/vi/seu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/seu-thesis/assets/vi/seu.png -------------------------------------------------------------------------------- /seu-thesis/assets/vi/seu_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/seu-thesis/assets/vi/seu_logo.png -------------------------------------------------------------------------------- /seu-thesis/assets/vi/东南大学校标文字组合-彩色.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/seu-thesis/assets/vi/东南大学校标文字组合-彩色.png -------------------------------------------------------------------------------- /seu-thesis/assets/vi/东南大学校标文字组合.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/seu-thesis/assets/vi/东南大学校标文字组合.png -------------------------------------------------------------------------------- /seu-thesis/lib.typ: -------------------------------------------------------------------------------- 1 | #import "templates/bachelor.typ": bachelor-conf, bachelor-utils 2 | #import "templates/degree.typ": degree-conf, degree-utils 3 | #import "templates/bachelor-trans.typ": bachelor-trans-conf 4 | #import "templates/bachelor-mid-term.typ": bachelor-mid-term-conf 5 | -------------------------------------------------------------------------------- /seu-thesis/pages/back-bachelor-fn.typ: -------------------------------------------------------------------------------- 1 | #let bachelor-back() = page( 2 | paper: "a4", 3 | background: image("../assets/bachelor_back.png") 4 | )[] 5 | 6 | // 测试部分 7 | #bachelor-back() -------------------------------------------------------------------------------- /seu-thesis/pages/cover-bachelor-fn.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/packages.typ": fakebold 2 | #import "../utils/fonts.typ": 字体, 字号, chineseunderline, justify-words 3 | 4 | #let bachelor-cover-conf( 5 | student-id: "00121001", 6 | author: "王东南", 7 | school: "示例学院", 8 | major: "示例专业", 9 | advisor: "湖牌桥", 10 | thesis-name: "示例论文标题\n此行空白时下划线自动消失", 11 | date: "某个起止日期", 12 | cover-date: datetime.today(), 13 | ) = page( 14 | paper: "a4", 15 | margin: ( 16 | top: 2cm + 0.7cm, 17 | bottom: 2cm + 0.5cm, 18 | left: 2cm + 0.5cm, 19 | right: 2cm, 20 | ), 21 | // 原模板中调整了图片亮度和对比度,因此直接导出了调整后的版本 22 | // 原始图片在本仓库的 ref 目录中 23 | background: image("../assets/bachelor_cover_adjusted.png"), 24 | )[ 25 | 26 | #set text(lang: "zh", region: "cn") 27 | 28 | #set align(center) 29 | //#hide[#heading(outlined: false, bookmarked: true)[封面]] 30 | 31 | #v(1.2cm) 32 | 33 | #image("../assets/vi/东南大学校标文字组合-彩色.png", width: 8.57cm) 34 | 35 | #v(13pt) 36 | 37 | #block( 38 | height: 2cm, 39 | { 40 | // 字号/字距调节太麻烦,并且需要另行安装思源宋体,故使用 svg 代替 41 | // text(font: 字体.思源宋体, size: 36pt, weight: 900, tracking: 0pt, "本科毕业设计(论文)报告") 42 | image("../assets/bachelor_title.svg", width: 16.48cm) 43 | }, 44 | ) 45 | 46 | #v(47pt) 47 | 48 | #block( 49 | height: 2.5cm, 50 | { 51 | set text(font: 字体.黑体, size: 字号.二号, weight: "regular") 52 | set par(spacing: 0.9cm) 53 | block( 54 | width: 12.84cm, 55 | chineseunderline(thesis-name), 56 | ) 57 | }, 58 | ) 59 | 60 | #v(23pt) 61 | 62 | #{ 63 | set text(font: 字体.思源黑体, size: 字号.小二, weight: "medium") 64 | let label(s) = align( 65 | left, 66 | pad(top: 5pt, text(font: 字体.思源黑体, size: 字号.四号, weight: "medium", justify-words(s, width: 4em) + ":")), 67 | ) 68 | // 模板中直接使用宋体,无 Times New Roman 回退 69 | let value(s) = text(font: "SimSun", size: 字号.小二, chineseunderline(s, bottom: 8pt)) 70 | grid( 71 | columns: (3.44cm, 7.99cm), 72 | rows: 1.21cm, 73 | gutter: 0pt, 74 | label("学号"), value(student-id), 75 | label("姓名"), value(author), 76 | label("学院"), value(school), 77 | label("专业"), value(major), 78 | label("指导教师"), value(advisor), 79 | label("起止日期"), value(date), 80 | ) 81 | } 82 | 83 | #v(20pt) 84 | 85 | // 模板中直接使用楷体,无 Times New Roman 回退 86 | #text(font: "KaiTi", size: 字号.四号, cover-date.display("[year]年[month padding:none]月[day padding:none]日")) 87 | ] 88 | 89 | // 测试部分 90 | #bachelor-cover-conf( 91 | student-id: "00121001", 92 | author: "王东南", 93 | school: "示例学院", 94 | major: "示例专业", 95 | advisor: "湖牌桥", 96 | thesis-name: "示例论文标题\n此行空白时下划线自动消失", 97 | date: "某个起止日期", 98 | ) 99 | -------------------------------------------------------------------------------- /seu-thesis/pages/cover-bachelor-trans-fn.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/packages.typ": fakebold 2 | #import "../utils/fonts.typ": 字体, 字号, chineseunderline, justify-words 3 | 4 | #let bachelor-trans-cover-conf( 5 | student-id: none, 6 | author: none, 7 | school: none, 8 | major: none, 9 | advisor: none, 10 | thesis-name-cn: none, 11 | thesis-name-raw: none, 12 | date: none, 13 | ) = page( 14 | paper: "a4", 15 | margin: ( 16 | top: 2cm + 0.7cm, 17 | bottom: 2cm + 0.5cm, 18 | left: 2cm + 0.5cm, 19 | right: 2cm, 20 | ), 21 | { 22 | set text(lang: "zh") 23 | set par(leading: 0.65em, spacing: 1.2em, first-line-indent: 0pt) 24 | 25 | set align(center) 26 | //#hide[#heading(outlined: false, bookmarked: true)[封面]] 27 | 28 | image("../assets/vi/东南大学校标文字组合.png", width: 7.01cm) 29 | block( 30 | height: 2cm, 31 | { 32 | text(font: 字体.黑体, size: 字号.一号, tracking: 3.6pt, fakebold[本科毕业设计(论文)资料翻译]) 33 | }, 34 | ) 35 | 36 | v(3pt) 37 | 38 | set text(font: 字体.宋体, size: 字号.三号) 39 | 40 | block( 41 | width: 100%, 42 | align( 43 | left, 44 | { 45 | h(1.7em) + [翻译资料名称(外文)] 46 | }, 47 | ), 48 | ) 49 | 50 | 51 | v(-6pt) 52 | 53 | block( 54 | height: 1.8cm, 55 | width: 100%, 56 | align(center + top, thesis-name-raw), 57 | ) 58 | 59 | v(-6pt) 60 | 61 | block( 62 | width: 100%, 63 | align( 64 | left, 65 | { 66 | h(1.7em) + [翻译资料名称(中文)] 67 | }, 68 | ), 69 | ) 70 | 71 | v(-6pt) 72 | 73 | block( 74 | height: 1.8cm, 75 | width: 100%, 76 | align(center + top, thesis-name-cn), 77 | ) 78 | 79 | v(49pt) 80 | 81 | set text(font: 字体.宋体, size: 字号.小二, weight: "regular") 82 | 83 | grid( 84 | columns: (5em, 10.3em), 85 | column-gutter: 2.6em, 86 | rows: 1.13cm, 87 | justify-words("学号", width: 4em) + ":", chineseunderline(student-id), 88 | justify-words("姓名", width: 4em) + ":", chineseunderline(author), 89 | justify-words("学院", width: 4em) + ":", chineseunderline(school), 90 | justify-words("专业", width: 4em) + ":", chineseunderline(major), 91 | justify-words("指导教师", width: 4em) + ":", chineseunderline(advisor), 92 | justify-words("起止日期", width: 4em) + ":", chineseunderline(date), 93 | ) 94 | }, 95 | ) 96 | 97 | // 测试部分 98 | #bachelor-trans-cover-conf( 99 | student-id: "00121001", 100 | author: "王东南", 101 | school: "示例学院", 102 | major: "示例专业", 103 | advisor: "湖牌桥", 104 | thesis-name-cn: "新兴排版方式下的摸鱼科学优化研究", 105 | thesis-name-raw: "Optimization of Fish-Touching Strategies \n in Emerging Typesetting Environments", 106 | date: "某个完成日期", 107 | ) 108 | -------------------------------------------------------------------------------- /seu-thesis/pages/cover-degree-fn.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/packages.typ": fakebold 2 | #import "../utils/fonts.typ": 字体, 字号, chineseunderline, justify-words 3 | 4 | #let degree-cover-conf( 5 | author: (CN: "王东南", EN: "WANG Dong-nan", ID: "012345"), 6 | thesis-name: ( 7 | CN: "硕士学位论文", 8 | EN: [ 9 | A Thesis submitted to \ 10 | Southeast University \ 11 | For the Academic Degree of Master of Touching Fish 12 | ], 13 | heading: "东南大学硕士学位论文", 14 | ), 15 | title: ( 16 | CN: "摸鱼背景下的Typst模板使用研究", 17 | EN: "A Study of the Use of the Typst Template During Touching Fish", 18 | ), 19 | advisors: ( 20 | (CN: "湖牌桥", EN: "HU Pai-qiao", CN-title: "教授", EN-title: "Prof."), 21 | ( 22 | CN: "苏锡浦", 23 | EN: "SU Xi-pu", 24 | CN-title: "副教授", 25 | EN-title: "Associate Prof.", 26 | ), 27 | ), 28 | school: ( 29 | CN: "摸鱼学院", 30 | EN: "School of Touchingfish", 31 | ), 32 | major: ( 33 | main: "摸鱼科学", 34 | submajor: "计算机摸鱼", 35 | ), 36 | degree: "摸鱼学硕士", 37 | category-number: "N94", 38 | secret-level: "公开", 39 | UDC: "303", 40 | school-number: "10286", 41 | committee-chair: "张三 教授", 42 | readers: ( 43 | "李四 副教授", 44 | "王五 副教授", 45 | ), 46 | date: ( 47 | CN: ( 48 | defend-date: "2099年01月02日", 49 | authorize-date: "2099年01月03日", 50 | finish-date: "2024年01月15日", 51 | ), 52 | EN: ( 53 | finish-date: "Jan 15, 2024", 54 | ), 55 | ), 56 | degree-form: none, 57 | anonymous: false, 58 | ) = page( 59 | margin: (top: 2cm, bottom: 2cm, left: 2cm, right: 2cm), 60 | numbering: none, 61 | header: none, 62 | footer: none, 63 | { 64 | set text(font: 字体.宋体, size: 字号.小四, weight: "regular", lang: "zh") 65 | set align(center + top) 66 | set par(first-line-indent: 0pt) 67 | 68 | place( 69 | top + center, 70 | { 71 | image("../assets/cover_school.png", height: 11cm) 72 | }, 73 | ) 74 | 75 | place( 76 | top + left, 77 | dy: 0.5cm, 78 | { 79 | // 原始模板左侧列和右侧校徽不等高 80 | set text( 81 | font: 字体.宋体, 82 | size: 字号.小五, 83 | weight: "regular", 84 | lang: "zh", 85 | region: "cn", 86 | ) 87 | set align(center) 88 | let justify-4em(s) = justify-words(s, width: 4em) 89 | grid( 90 | columns: (4em, 1em, 8em), 91 | row-gutter: 0.4em, 92 | justify-4em("学校代码"), 93 | ":", 94 | chineseunderline(school-number), 95 | justify-4em("分类号"), 96 | ":", 97 | chineseunderline(category-number), 98 | justify-4em("密级"), 99 | ":", 100 | chineseunderline(secret-level), 101 | justify-4em("UDC"), 102 | ":", 103 | chineseunderline(UDC), 104 | justify-4em("学号"), 105 | ":", 106 | chineseunderline(author.ID), 107 | ) 108 | }, 109 | ) 110 | 111 | place( 112 | top + right, 113 | image("../assets/vi/seu_logo.png", width: 1.97cm), 114 | ) 115 | 116 | v(277.3pt) 117 | 118 | block( 119 | height: 100% - 277.3pt, 120 | grid( 121 | rows: (auto, 1fr, auto, 1fr, auto, 1fr, auto, 1fr, auto), 122 | // 大标题,如“硕士学位论文” 123 | block(fakebold(text( 124 | font: 字体.标题宋体, 125 | size: 字号.小初, 126 | thesis-name.CN 127 | ))), 128 | // 空间 129 | [], 130 | // 标题 + 学位论文形式 131 | { 132 | block(text( 133 | font: 字体.黑体, 134 | size: 字号.一号, 135 | title.CN 136 | )) 137 | if not degree-form in (none, [], [ ], "") { 138 | block(text( 139 | font: 字体.标题宋体, 140 | size: 字号.三号, 141 | "(学位论文形式:" + degree-form + ")" 142 | ), below: 2em) 143 | } 144 | }, 145 | // 空间 146 | [], 147 | // 研究生姓名和导师姓名 148 | { 149 | set text(font: 字体.黑体, size: 字号.小二) 150 | set par(leading: 1em) 151 | 152 | grid( 153 | columns: (5em, 1em, 10em), 154 | row-gutter: 1em, 155 | 156 | text(font: 字体.宋体)[研究生姓名], 157 | [:], 158 | {chineseunderline(author.CN)}, 159 | 160 | text(font: 字体.宋体, justify-words("导师姓名", width: 5em)), 161 | [:], 162 | chineseunderline( 163 | advisors.map(it => it.CN + " " + it.CN-title).join("\n") 164 | ) 165 | ) 166 | }, 167 | // 空间 168 | [], 169 | // 下方内容 170 | { 171 | let justify-7em(s) = justify-words(s, width: 7em) 172 | let justify-6em(s) = justify-words(s, width: 6em) 173 | 174 | set text(font: 字体.黑体, size: 字号.小四) 175 | grid( 176 | columns: (17em, 16em), 177 | column-gutter: 1em, 178 | grid( 179 | columns: (7em, 10em), 180 | row-gutter: 1em, 181 | text(font: 字体.宋体, justify-7em("申请学位类别")), 182 | chineseunderline(degree), 183 | text(font: 字体.宋体, justify-7em("一级学科名称")), 184 | chineseunderline(major.main), 185 | text(font: 字体.宋体, justify-7em("二级学科名称")), 186 | chineseunderline(major.submajor), 187 | text(font: 字体.宋体, "答辩委员会主席"), 188 | chineseunderline(committee-chair), 189 | ), 190 | grid( 191 | columns: (6em, 10em), 192 | row-gutter: 1em, 193 | text(font: 字体.宋体, "学位授予单位"), 194 | chineseunderline("东 南 大 学"), 195 | text(font: 字体.宋体, "论文答辩日期"), 196 | chineseunderline(date.CN.defend-date), 197 | text(font: 字体.宋体, "学位授予日期"), 198 | chineseunderline(date.CN.authorize-date), 199 | text(font: 字体.宋体, justify-6em("评阅人")), 200 | chineseunderline(readers.join("\n")), 201 | ) 202 | ) 203 | }, 204 | // 空间 205 | [], 206 | // 日期 207 | text(font: 字体.宋体, size: 字号.四号, date.CN.finish-date) 208 | ), 209 | ) 210 | }, 211 | ) 212 | 213 | #degree-cover-conf( 214 | author: (CN: "王东南", EN: "WANG Dong-nan", ID: "012345"), 215 | thesis-name: ( 216 | CN: "硕士学位论文", 217 | EN: [ 218 | A Thesis submitted to \ 219 | Southeast University \ 220 | For the Academic Degree of Master of Touching Fish 221 | ], 222 | heading: "东南大学硕士学位论文", 223 | ), 224 | title: ( 225 | CN: "摸鱼背景下的Typst模板使用研究", 226 | EN: "A Study of the Use of the Typst Template During Touching Fish", 227 | ), 228 | advisors: ( 229 | (CN: "湖牌桥", EN: "HU Pai-qiao", CN-title: "教授", EN-title: "Prof."), 230 | ( 231 | CN: "苏锡浦", 232 | EN: "SU Xi-pu", 233 | CN-title: "副教授", 234 | EN-title: "Associate Prof.", 235 | ), 236 | ), 237 | school: ( 238 | CN: "摸鱼学院", 239 | EN: "School of Touchingfish", 240 | ), 241 | major: ( 242 | main: "摸鱼科学", 243 | submajor: "计算机摸鱼", 244 | ), 245 | degree: "摸鱼学硕士", 246 | category-number: "N94", 247 | secret-level: "公开", 248 | UDC: "303", 249 | school-number: "10286", 250 | committee-chair: "张三 教授", 251 | readers: ( 252 | "李四 副教授", 253 | "王五 副教授", 254 | ), 255 | date: ( 256 | CN: ( 257 | defend-date: "2099年01月02日", 258 | authorize-date: "2099年01月03日", 259 | finish-date: "2024年01月15日", 260 | ), 261 | EN: ( 262 | finish-date: "Jan 15, 2024", 263 | ), 264 | ), 265 | degree-form: "应用研究", 266 | anonymous: false, 267 | ) -------------------------------------------------------------------------------- /seu-thesis/pages/statement-bachelor-ic.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/fonts.typ": 字体, 字号 2 | 3 | #page( 4 | paper: "a4", 5 | margin: ( 6 | top: 2cm + 0.5cm, 7 | bottom: 2cm + 0.5cm, 8 | left: 2cm + 0.25cm, 9 | right: 2cm + 0.25cm, 10 | ), 11 | { 12 | v(80pt - 0.4cm) 13 | set align(left) 14 | set text(font: 字体.宋体, size: 字号.小四, lang: "zh", region: "cn") 15 | set par(leading: 11.3pt, justify: true, first-line-indent: 0pt) 16 | set line(stroke: 0.6pt) 17 | align( 18 | center, 19 | text( 20 | font: 字体.黑体, 21 | size: 字号.小二, 22 | )[东南大学毕业(设计)论文独创性声明], 23 | ) 24 | v(24pt) 25 | h(2em) 26 | [本人声明所呈交的毕业(设计)论文是我个人在导师指导下进行的研究工作及取得的研究成果。尽我所知,除了文中特别加以标注和致谢的地方外,论文中不包含其他人已经发表或撰写过的研究成果,也不包含为获得东南大学或其它教育机构的学位或证书而使用过的材料。与我一同工作的同志对本研究所做的任何贡献均已在论文中作了明确的说明并表示了谢意。] 27 | v(18pt) 28 | grid( 29 | columns: 11, 30 | h(48pt), 31 | [论文作者签名:], 32 | line(length: 8em, start: (6pt, 10pt)), 33 | h(18pt), 34 | [日期:], 35 | line(length: 3.5em, start: (6pt, 10pt)), 36 | [年], 37 | line(length: 2.5em, start: (2pt, 10pt)), 38 | [月], 39 | line(length: 2.5em, start: (2pt, 10pt)), 40 | [日], 41 | ) 42 | 43 | v(140pt) 44 | 45 | align( 46 | center, 47 | text( 48 | font: 字体.黑体, 49 | size: 字号.小二, 50 | )[东南大学毕业(设计)论文使用授权声明], 51 | ) 52 | v(13pt) 53 | h(2em) 54 | [东南大学有权保留本人所送交毕业(设计)论文的复印件和电子文档,可以采用影印、缩印或其他复制手段保存论文。本人电子文档的内容和纸质论文的内容相一致。除在保密期内的保密论文外,允许论文被查阅和借阅,可以公布(包括刊登)论文的全部或部分内容。论文的公布(包括刊登)授权东南大学教务处办理。] 55 | v(16pt) 56 | grid( 57 | columns: (24pt, 200pt, 22pt, 1fr), 58 | row-gutter: 10pt, 59 | rows: 2, 60 | [], 61 | grid( 62 | columns: 2, 63 | [论文作者签名:], 64 | line(length: 115pt, start: (6pt, 10pt)), 65 | ), 66 | [], 67 | grid( 68 | columns: 2, 69 | [导师签名:], 70 | line(length: 140pt, start: (6pt, 10pt)), 71 | ), 72 | [], 73 | grid( 74 | columns: 7, 75 | [日期:], 76 | line(length: 3.5em, start: (6pt, 10pt)), 77 | [年], 78 | line(length: 2.9em, start: (2pt, 10pt)), 79 | [月], 80 | line(length: 2.9em, start: (2pt, 10pt)), 81 | [日], 82 | ), 83 | [], 84 | grid( 85 | columns: 7, 86 | [日期:], 87 | line(length: 2.5em, start: (6pt, 10pt)), 88 | [年], 89 | line(length: 2.9em, start: (2pt, 10pt)), 90 | [月], 91 | line(length: 2.9em, start: (2pt, 10pt)), 92 | [日], 93 | ), 94 | ) 95 | }, 96 | ) -------------------------------------------------------------------------------- /seu-thesis/pages/statement-degree-fn.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/fonts.typ": 字体, 字号 2 | 3 | #let degree-statement-conf( 4 | anonymous: false, 5 | ) = page( 6 | header: none, 7 | footer: none, 8 | numbering: none, 9 | margin: 2.5cm, 10 | { 11 | 12 | show heading.where(level: 1): it => { 13 | set align(center) 14 | set text(font: 字体.黑体, size: 15pt) 15 | it.body.text.clusters().join(h(0.3em)) 16 | v(2em) 17 | } 18 | 19 | set text(font: 字体.宋体, size: 10.6pt, lang: "zh") 20 | // 字号来自“附件1:学位论文独创性和使用授权声明.pdf” 21 | 22 | set par(first-line-indent: (amount: 2em, all: true), leading: 1.5em, justify: true) 23 | set block(spacing: 1.5em) 24 | 25 | set align(horizon) 26 | block({ 27 | align( 28 | center, 29 | text( 30 | font: 字体.黑体, 31 | size: 15pt, 32 | tracking: 0.3em, 33 | )[东南大学学位论文独创性声明], 34 | ) 35 | v(1.5em) 36 | 37 | [ 38 | 本人声明所呈交的学位论文是我个人在导师指导下进行的研究工作及取得的研究成果。尽我所知,除了文中特别加以标注和致谢的地方外,论文中不包含其他人已经发表或撰写过的研究成果,也不包含为获得东南大学或其它教育机构的学位或证书而使用过的材料。与我一同工作的同志对本研究所做的任何贡献均已在论文中作了明确的说明并表示了谢意。 39 | ] 40 | 41 | v(1cm) 42 | 43 | align( 44 | right, 45 | grid( 46 | columns: (auto, 6em, auto, 6em), 47 | column-gutter: 3pt, 48 | [研究生签名:], 49 | line(start: (0pt, 0.9em), length: 6em, stroke: 0.5pt), 50 | [日期:], 51 | line(start: (0pt, 0.9em), length: 6em, stroke: 0.5pt), 52 | ), 53 | ) 54 | 55 | v(4cm) 56 | 57 | align( 58 | center, 59 | text( 60 | font: 字体.黑体, 61 | size: 15pt, 62 | tracking: 0.3em, 63 | )[东南大学学位论文使用授权声明], 64 | ) 65 | 66 | v(1.5em) 67 | 68 | [ 69 | 东南大学、中国科学技术信息研究所、国家图书馆、《中国学术期刊(光盘版)》电子杂志社有限公司、万方数据电子出版社、北京万方数据股份有限公司有权保留本人所送交学位论文的复印件和电子文档,可以采用影印、缩印或其他复制手段保存论文。本人电子文档的内容和纸质论文的内容相一致。除在保密期内的保密论文外,允许论文被查阅和借阅,可以公布(包括以电子信息形式刊登)论文的全部内容或中、英文摘要等部分内容。论文的公布(包括以电子信息形式刊登)授权东南大学研究生院办理。 70 | ] 71 | 72 | v(1cm) 73 | 74 | align( 75 | right, 76 | grid( 77 | columns: (auto, 6em, auto, 6em, auto, 6em), 78 | column-gutter: 3pt, 79 | [研究生签名:], 80 | line(start: (0pt, 0.9em), length: 6em, stroke: 0.5pt), 81 | [导师签名:], 82 | line(start: (0pt, 0.9em), length: 6em, stroke: 0.5pt), 83 | [日期:], 84 | line(start: (0pt, 0.9em), length: 6em, stroke: 0.5pt), 85 | ), 86 | ) 87 | }) 88 | }, 89 | ) 90 | 91 | #degree-statement-conf(anonymous: false) -------------------------------------------------------------------------------- /seu-thesis/pages/title-page-degree-cn-fn.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/packages.typ": fakebold, show-cn-fakebold 2 | #import "../utils/fonts.typ": 字体, 字号, chineseunderline, justify-words 3 | 4 | #let title-cn-conf( 5 | author: (CN: "王东南", EN: "WANG Dong-nan", ID: "012345"), 6 | thesis-name: ( 7 | CN: "硕士学位论文", 8 | EN: [ 9 | A Thesis submitted to \ 10 | Southeast University \ 11 | For the Academic Degree of Master of Touching Fish 12 | ], 13 | heading: "东南大学硕士学位论文", 14 | ), 15 | title: ( 16 | CN: "摸鱼背景下的Typst模板使用研究", 17 | EN: "A Study of the Use of the Typst Template During Touching Fish", 18 | ), 19 | advisors: ( 20 | (CN: "湖牌桥", EN: "HU Pai-qiao", CN-title: "教授", EN-title: "Prof."), 21 | ( 22 | CN: "苏锡浦", 23 | EN: "SU Xi-pu", 24 | CN-title: "副教授", 25 | EN-title: "Associate Prof.", 26 | ), 27 | ), 28 | school: ( 29 | CN: "摸鱼学院", 30 | EN: "School of Touchingfish", 31 | ), 32 | major: ( 33 | main: "摸鱼科学", 34 | submajor: "计算机摸鱼", 35 | ), 36 | date: ( 37 | CN: ( 38 | defend-date: "2099年01月02日", 39 | authorize-date: "2099年01月03日", 40 | finish-date: "2024年01月15日", 41 | ), 42 | EN: ( 43 | finish-date: "Jan 15, 2024", 44 | ), 45 | ), 46 | thanks: "本论文受到摸鱼基金委的基金赞助(123456)", 47 | anonymous: false, 48 | ) = page( 49 | margin: (top: 3cm, bottom: 2cm, left: 2cm, right: 2cm), 50 | numbering: none, 51 | header: none, 52 | footer: none, 53 | { 54 | set align(center) 55 | set par(first-line-indent: 0pt) 56 | image("../assets/vi/seu.png", width: 180pt) 57 | 58 | block(fakebold(text(font: 字体.标题宋体, size: 字号.小初, thesis-name.CN))) 59 | 60 | v(40pt) 61 | 62 | block(text(font: 字体.黑体, size: 字号.一号, weight: "bold", title.CN)) 63 | 64 | v(40pt) 65 | 66 | set text(font: 字体.宋体, size: 字号.小二, weight: "bold") 67 | grid( 68 | columns: (5em, 1em, 10em), 69 | row-gutter: 3em, 70 | text(font: 字体.黑体, "专业名称".clusters().join(h(1em / 3))), 71 | ":", 72 | chineseunderline(major.main), 73 | text(font: 字体.黑体, "研究生姓名"), 74 | ":", 75 | chineseunderline(author.CN), 76 | text(font: 字体.黑体, "导师姓名".clusters().join(h(1em / 3))), 77 | ":", 78 | chineseunderline(advisors.map(it => it.CN + " " + it.CN-title).join("\n")), 79 | ) 80 | 81 | if thanks != none { 82 | place(bottom + left, text(font: 字体.宋体, size: 字号.小四, thanks)) 83 | } 84 | }, 85 | ) 86 | 87 | #title-cn-conf( 88 | author: (CN: "王东南", EN: "WANG Dong-nan", ID: "012345"), 89 | thesis-name: ( 90 | CN: "硕士学位论文", 91 | EN: [ 92 | A Thesis submitted to \ 93 | Southeast University \ 94 | For the Academic Degree of Master of Touching Fish 95 | ], 96 | heading: "东南大学硕士学位论文", 97 | ), 98 | title: ( 99 | CN: "摸鱼背景下的Typst模板使用研究", 100 | EN: "A Study of the Use of the Typst Template During Touching Fish", 101 | ), 102 | advisors: ( 103 | (CN: "湖牌桥", EN: "HU Pai-qiao", CN-title: "教授", EN-title: "Prof."), 104 | ( 105 | CN: "苏锡浦", 106 | EN: "SU Xi-pu", 107 | CN-title: "副教授", 108 | EN-title: "Associate Prof.", 109 | ), 110 | ), 111 | school: ( 112 | CN: "摸鱼学院", 113 | EN: "School of Touchingfish", 114 | ), 115 | major: ( 116 | main: "摸鱼科学", 117 | submajor: "计算机摸鱼", 118 | ), 119 | date: ( 120 | CN: ( 121 | defend-date: "2099年01月02日", 122 | authorize-date: "2099年01月03日", 123 | finish-date: "2024年01月15日", 124 | ), 125 | EN: ( 126 | finish-date: "Jan 15, 2024", 127 | ), 128 | ), 129 | thanks: "本论文受到摸鱼基金委的基金赞助(123456)", 130 | anonymous: false, 131 | ) -------------------------------------------------------------------------------- /seu-thesis/pages/title-page-degree-en-fn.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/fonts.typ": 字体, 字号 2 | 3 | #let title-en-conf( 4 | author: (CN: "王东南", EN: "WANG Dong-nan", ID: "012345"), 5 | thesis-name: ( 6 | CN: "硕士学位论文", 7 | EN: [ 8 | A Thesis submitted to \ 9 | Southeast University \ 10 | For the Academic Degree of Master of Touching Fish 11 | ], 12 | heading: "东南大学硕士学位论文", 13 | ), 14 | title: ( 15 | CN: "摸鱼背景下的Typst模板使用研究", 16 | EN: "A Study of the Use of the Typst Template During Touching Fish", 17 | ), 18 | advisors: ( 19 | (CN: "湖牌桥", EN: "HU Pai-qiao", CN-title: "教授", EN-title: "Prof."), 20 | ( 21 | CN: "苏锡浦", 22 | EN: "SU Xi-pu", 23 | CN-title: "副教授", 24 | EN-title: "Associate Prof.", 25 | ), 26 | ), 27 | school: ( 28 | CN: "摸鱼学院", 29 | EN: "School of Touchingfish", 30 | ), 31 | date: ( 32 | CN: ( 33 | defend-date: "2099年01月02日", 34 | authorize-date: "2099年01月03日", 35 | finish-date: "2024年01月15日", 36 | ), 37 | EN: ( 38 | finish-date: "Jan 15, 2024", 39 | ), 40 | ), 41 | anonymous: false, 42 | ) = page( 43 | margin: (top: 3cm, bottom: 2cm, left: 2cm, right: 2cm), 44 | numbering: none, 45 | header: none, 46 | footer: none, 47 | { 48 | set par(first-line-indent: 0pt) 49 | set align(center) 50 | 51 | 52 | block(text(font: 字体.宋体, size: 24pt, weight: "bold", upper(title.EN))) 53 | 54 | v(1cm) 55 | 56 | set text(font: 字体.宋体, size: 16pt, weight: "regular") 57 | set par(leading: 1.5em) 58 | set block(spacing: 1.8cm) 59 | 60 | block( 61 | height: 100% - 160pt, 62 | grid( 63 | rows: (auto, 1fr, auto, 1fr, auto, 1fr, auto), 64 | thesis-name.EN, 65 | [], 66 | "BY" + "\n" + author.EN, 67 | [], 68 | "Supervised by" + "\n" + advisors.map(it => it.EN-title + " " + it.EN).join("\n and \n"), 69 | [], 70 | school.EN + "\n" + "Southeast University" + "\n" + date.EN.finish-date, 71 | ), 72 | ) 73 | }, 74 | ) 75 | 76 | #title-en-conf( 77 | author: (CN: "王东南", EN: "WANG Dong-nan", ID: "012345"), 78 | thesis-name: ( 79 | CN: "硕士学位论文", 80 | EN: [ 81 | A Thesis submitted to \ 82 | Southeast University \ 83 | For the Academic Degree of Master of Touching Fish 84 | ], 85 | heading: "东南大学硕士学位论文", 86 | ), 87 | title: ( 88 | CN: "摸鱼背景下的Typst模板使用研究", 89 | EN: "A Study of the Use of the Typst Template During Touching Fish", 90 | ), 91 | advisors: ( 92 | (CN: "湖牌桥", EN: "HU Pai-qiao", CN-title: "教授", EN-title: "Prof."), 93 | ( 94 | CN: "苏锡浦", 95 | EN: "SU Xi-pu", 96 | CN-title: "副教授", 97 | EN-title: "Associate Prof.", 98 | ), 99 | ), 100 | school: ( 101 | CN: "摸鱼学院", 102 | EN: "School of Touchingfish", 103 | ), 104 | date: ( 105 | CN: ( 106 | defend-date: "2099年01月02日", 107 | authorize-date: "2099年01月03日", 108 | finish-date: "2024年01月15日", 109 | ), 110 | EN: ( 111 | finish-date: "Jan 15, 2024", 112 | ), 113 | ), 114 | anonymous: false, 115 | ) -------------------------------------------------------------------------------- /seu-thesis/parts/abstract-bachelor-fn.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/fonts.typ": 字体, 字号 2 | 3 | #let abstract-conf( 4 | cn-abstract: none, 5 | cn-keywords: none, 6 | en-abstract: none, 7 | en-keywords: none, 8 | ) = { 9 | // 摘要使用罗马字符的页码 10 | set page(numbering: "I", number-align: center) 11 | counter(page).update(1) 12 | 13 | set text(font: 字体.宋体, size: 字号.小四) 14 | 15 | if not cn-abstract in (none, [], "") or not cn-keywords in (none, ()) { 16 | { 17 | set par(first-line-indent: (amount: 2em, all: true), leading: 14pt, justify: true, spacing: 14pt) 18 | // 我不理解为什么两个摘要需要不同的间距 19 | 20 | heading(outlined: true, bookmarked: true, level: 1, numbering: none)[摘要] 21 | 22 | v(3pt) 23 | 24 | cn-abstract 25 | 26 | v(18pt) 27 | 28 | // 英文 29 | set par(first-line-indent: 0em) 30 | 31 | if not cn-keywords in (none, ()) { 32 | assert(type(cn-keywords) == array) 33 | "关键词:" + cn-keywords.join(",") 34 | } 35 | } 36 | } 37 | 38 | if not en-abstract in (none, [], "") or not en-keywords in (none, ()) { 39 | { 40 | pagebreak(weak: true) 41 | 42 | set par(first-line-indent: (amount: 2em, all: true), leading: 15pt, justify: true, spacing: 15pt) 43 | // 我不理解为什么两个摘要需要不同的间距 44 | 45 | heading( 46 | outlined: true, 47 | bookmarked: true, 48 | level: 1, 49 | numbering: none, 50 | )[ABSTRACT] 51 | 52 | v(3pt) 53 | 54 | en-abstract 55 | 56 | v(20pt) 57 | 58 | if not en-keywords in (none, ()) { 59 | assert(type(en-keywords) == array) 60 | "KEY WORDS: " + en-keywords.join(", ") 61 | } 62 | } 63 | } 64 | } 65 | 66 | #abstract-conf( 67 | cn-abstract: [示例摘要], 68 | cn-keywords: ("关键词1", "关键词2"), 69 | en-abstract: none, 70 | en-keywords: ("Keywords1", "Keywords2"), 71 | ) 72 | -------------------------------------------------------------------------------- /seu-thesis/parts/abstract-degree-fn.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/fonts.typ": 字体, 字号 2 | #import "../utils/packages.typ": fakebold 3 | 4 | #let abstract-conf( 5 | cn-abstract: none, 6 | cn-keywords: none, 7 | en-abstract: none, 8 | en-keywords: none, 9 | page-break: none, 10 | ) = { 11 | // 摘要使用罗马字符的页码 12 | set page(numbering: "I", number-align: center) 13 | counter(page).update(1) 14 | 15 | set text(font: 字体.宋体, size: 字号.小四) 16 | set par(first-line-indent: (amount: 2em, all: true), leading: 9.6pt, justify: true, spacing: 9.6pt) 17 | 18 | if not cn-abstract in (none, [], "") or not cn-keywords in (none, ()) { 19 | { 20 | heading(numbering: none, level: 1, outlined: true, bookmarked: true)[摘要] 21 | 22 | cn-abstract 23 | 24 | v(1em) 25 | 26 | parbreak() 27 | 28 | if not cn-keywords in (none, ()) { 29 | assert(type(cn-keywords) == array) 30 | fakebold[关键词:] + cn-keywords.join(",") 31 | } 32 | } 33 | } 34 | 35 | if not en-abstract in (none, [], "") or not en-keywords in (none, ()) { 36 | { 37 | if type(page-break) == function { 38 | page-break() 39 | } else { 40 | pagebreak(weak: true) 41 | } 42 | 43 | heading( 44 | numbering: none, 45 | level: 1, 46 | outlined: true, 47 | bookmarked: true, 48 | )[ABSTRACT] 49 | 50 | en-abstract 51 | 52 | v(1em) 53 | parbreak() 54 | 55 | if not en-keywords in (none, ()) { 56 | assert(type(en-keywords) == array) 57 | text(weight: "bold")[Keywords: ] + en-keywords.join(",") 58 | } 59 | } 60 | } 61 | } 62 | 63 | #abstract-conf( 64 | cn-abstract: [示例摘要], 65 | cn-keywords: ("关键词1", "关键词2"), 66 | en-abstract: none, 67 | en-keywords: ("Keywords1", "Keywords2"), 68 | ) 69 | -------------------------------------------------------------------------------- /seu-thesis/parts/main-body-bachelor-fn.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/states.typ": part-state 2 | #import "../utils/fonts.typ": 字体, 字号 3 | 4 | #let main-body-bachelor-conf( 5 | header-text: "东南大学本科毕业设计(论文)", 6 | doc 7 | ) = { 8 | set page( 9 | header: { 10 | set align(center) 11 | set text(font: 字体.宋体, size: 字号.小五, lang: "zh") 12 | set par(first-line-indent: 0pt, leading: 16pt, justify: true, spacing: 16pt) 13 | 14 | header-text 15 | v(-12pt) 16 | line(length: 100%, stroke: (thickness: 0.5pt)) 17 | 18 | counter(footnote).update(0) 19 | }, 20 | numbering: "1", 21 | footer: { 22 | set align(center) 23 | set text(font: 字体.宋体, size: 字号.小五, lang: "zh") 24 | h(16pt) 25 | context counter(page).display() 26 | }, 27 | header-ascent: 10%, 28 | footer-descent: 10%, 29 | ) 30 | 31 | pagebreak(weak: false) 32 | 33 | 34 | counter(page).update(1) 35 | counter(heading.where(level: 1)).update(0) 36 | 37 | doc 38 | } -------------------------------------------------------------------------------- /seu-thesis/parts/main-body-degree-fn.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/states.typ": part-state 2 | #import "../utils/fonts.typ": 字体, 字号 3 | #import "../utils/get-heading-title.typ": get-heading-at-page 4 | 5 | #let main-body-bachelor-conf( 6 | thesis-name: [], 7 | first-level-title-page-disable-heading: false, // 一级标题页不显示页眉 8 | // 启用此选项后,“第X章 XXXXX” 一级标题所在页面将不显示页眉 9 | doc 10 | ) = { 11 | set page( 12 | header: { 13 | set align(center) 14 | set text(font: 字体.宋体, size: 字号.小五, lang: "zh") 15 | set par(first-line-indent: 0pt, leading: 16pt, justify: true, spacing: 16pt) 16 | 17 | context { 18 | let loc = here() 19 | 20 | // 上一个一级标题会被装入这里,如果是 none 则不渲染本页的页眉 21 | // 同时,需要确定本页上是否有一级标题 22 | let (last-level-1-heading, is-level-1-heading-on-this-page) = get-heading-at-page(loc) 23 | // 如果在本页,那么就要处理“一级标题是否显示页眉”参数 24 | if is-level-1-heading-on-this-page and first-level-title-page-disable-heading { 25 | last-level-1-heading = none 26 | } 27 | 28 | if last-level-1-heading == none { 29 | [] 30 | } else if calc.even(loc.page()) { 31 | thesis-name.heading 32 | v(-1em) 33 | line(length: 100%, stroke: (thickness: 0.5pt)) 34 | } else { 35 | if last-level-1-heading.numbering != none { 36 | (last-level-1-heading.numbering)( 37 | counter(heading.where(level: 1)).at( 38 | last-level-1-heading.location(), 39 | ).first(), 40 | ) 41 | h(0.5em) 42 | } 43 | last-level-1-heading.body 44 | v(-1em) 45 | line(length: 100%, stroke: (thickness: 0.5pt)) 46 | } 47 | } 48 | // locate 结束 49 | counter(footnote).update(0) 50 | }, 51 | numbering: "1", 52 | header-ascent: 10%, 53 | footer-descent: 10%, 54 | ) 55 | 56 | pagebreak(weak: false) 57 | 58 | counter(page).update(1) 59 | counter(heading.where(level: 1)).update(0) 60 | part-state.update("正文") 61 | 62 | doc 63 | } -------------------------------------------------------------------------------- /seu-thesis/parts/outline-bachelor-fn.typ: -------------------------------------------------------------------------------- 1 | #let outline-conf(outline-depth: 3, show-self-in-outline: true) = { 2 | set page( 3 | numbering: "I", 4 | number-align: center, 5 | ) 6 | set par(first-line-indent: 0pt, leading: 13.84pt) 7 | // 试出来的数值 8 | 9 | heading( 10 | numbering: none, 11 | outlined: show-self-in-outline, 12 | bookmarked: true, 13 | )[目录] 14 | 15 | v(3pt) 16 | 17 | show outline.entry.where(level: 1): it => { 18 | if it.element.numbering == none and it.element.body.text.clusters().len() == 2 { 19 | show regex("\p{script=Han}{2}"): it => { 20 | it.text.first() 21 | h(2em) 22 | it.text.last() 23 | } 24 | it 25 | } else { it } 26 | } 27 | set outline.entry(fill: repeat([.], gap: 0.05em)) 28 | 29 | outline(title: none, depth: outline-depth, indent: 2em) 30 | // 如果要和 Word 模板完全一样,需要改成 indent: n => (n + 1) * 2em 31 | } 32 | -------------------------------------------------------------------------------- /seu-thesis/parts/outline-degree-fn.typ: -------------------------------------------------------------------------------- 1 | #let outline-conf(outline-depth: 3, show-self-in-outline: true) = { 2 | set page( 3 | numbering: "I", 4 | number-align: center, 5 | ) 6 | set par(first-line-indent: 0pt, leading: 10pt) 7 | 8 | heading( 9 | numbering: none, 10 | outlined: show-self-in-outline, 11 | bookmarked: true, 12 | )[目录] 13 | show outline.entry.where(level: 1): it => { 14 | v(1.2em, weak: true) 15 | strong(it) 16 | } 17 | outline(title: none, depth: outline-depth, indent: 2em) 18 | } 19 | -------------------------------------------------------------------------------- /seu-thesis/parts/terminology.typ: -------------------------------------------------------------------------------- 1 | #let terminology-conf(terminology) = { 2 | set page( 3 | numbering: "I", 4 | number-align: center, 5 | ) 6 | heading( 7 | numbering: none, 8 | level: 1, 9 | outlined: true, 10 | bookmarked: true, 11 | )[本论文专用术语的注释表] 12 | terminology 13 | } -------------------------------------------------------------------------------- /seu-thesis/templates/bachelor-mid-term.typ: -------------------------------------------------------------------------------- 1 | #import "@preview/cuti:0.3.0" 2 | #import "../utils/fonts.typ": 字体, 字号 3 | 4 | #let bachelor-mid-term-conf( 5 | student-id: none, 6 | name: none, 7 | school: none, 8 | major: none, 9 | title: none, 10 | progress: none, 11 | completed-work: none, 12 | next-steps: none, 13 | issues-and-solution: none, 14 | weekly-meetings: none, 15 | guidance-quality: 1, 16 | ) = { 17 | assert(type(guidance-quality) == int and guidance-quality <= 4 and guidance-quality >= 1, message: "教师指导类型需要为1~4的整数,越小表示指导越有力") 18 | 19 | set par(first-line-indent: 0pt, hanging-indent: 0pt, justify: false) 20 | set page(margin: (x: 3.17cm, y: 2.54cm)) 21 | set text(font: 字体.宋体, size: 字号.五号, lang: "zh", region: "cn") 22 | set align(center) 23 | 24 | let no-space = context v(-par.spacing) 25 | let checkbox(a, b) = { 26 | assert(type(a) == int and type(b) == int) 27 | if(a == b) { 28 | box(image("../assets/icon/Checked.svg")) 29 | } else { 30 | box(image("../assets/icon/Box.svg")) 31 | } 32 | } 33 | 34 | text(font: 字体.黑体, size: 字号.四号, "东南大学毕业设计(论文)中期检查表") 35 | v(-8pt) 36 | text(font: 字体.宋体, size: 字号.小四, "(学生用表)") 37 | 38 | set table(stroke: 0.5pt) 39 | 40 | { 41 | set align(left) 42 | set par(spacing: 0.6em) 43 | table( 44 | rows: (0.8cm, ), 45 | columns: (2.24cm, 5.45cm, 2.3cm, 5.44cm), 46 | // 原始表格的右侧就是溢出的,所以这里也设置成溢出的 47 | align: (center + horizon, left + horizon), 48 | [学号], [#student-id], [姓名], [#name], 49 | [学院], [#school], [专业], [#major], 50 | [课题名称], table.cell(colspan: 3, align: center)[#title] 51 | ) 52 | 53 | no-space 54 | 55 | table( 56 | columns: (5.08cm, 10.35cm), 57 | align: (center + horizon, left + top), 58 | inset: 7.8pt, 59 | [毕业设计(论文)进展], [#progress] 60 | ) 61 | 62 | no-space 63 | 64 | table( 65 | columns: 15.43cm, 66 | { 67 | [ 68 | 1、现阶段已完成的工作 #linebreak() 69 | #completed-work 70 | ] 71 | }, 72 | { 73 | [ 74 | 2、下一步工作计划 #linebreak() 75 | #next-steps 76 | ] 77 | }, 78 | { 79 | [ 80 | 3、存在的问题及解决方法 #linebreak() 81 | #issues-and-solution 82 | ] 83 | }, 84 | { 85 | [ 86 | 4、平均每周与指导教师沟通或见面次数(或时长) #linebreak() 87 | #weekly-meetings 88 | ] 89 | }, 90 | { 91 | [ 92 | 5、在毕业设计开展的过程中,你是否得到了指导教师的有力指导? #linebreak() 93 | #h(2em) #checkbox(1, guidance-quality) 得到有力的指导 #linebreak() 94 | #h(2em) #checkbox(2, guidance-quality) 得到一般性的指导 #linebreak() 95 | #h(2em) #checkbox(3, guidance-quality) 得到少许指导 #linebreak() 96 | #h(2em) #checkbox(4, guidance-quality) 没有得到指导 #linebreak() 97 | ] 98 | } 99 | 100 | ) 101 | 102 | // no-space 103 | 104 | // 使用 block 的方案,需要 v(1fr) 换页 105 | // block( 106 | // breakable: true, 107 | // stroke: 0.5pt, 108 | // inset: 5pt, 109 | // width: 15.43cm, 110 | 111 | // { 112 | // } 113 | // ) 114 | } 115 | } 116 | 117 | #bachelor-mid-term-conf() -------------------------------------------------------------------------------- /seu-thesis/templates/bachelor-trans.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/fonts.typ": 字体, 字号 2 | #import "../utils/set-bachelor.typ": set-bachelor 3 | #import "../utils/states.typ": part-state 4 | 5 | #import "../pages/cover-bachelor-trans-fn.typ": bachelor-trans-cover-conf 6 | #import "../parts/abstract-bachelor-fn.typ": abstract-conf 7 | #import "../parts/main-body-bachelor-fn.typ": main-body-bachelor-conf 8 | #import "../parts/outline-bachelor-fn.typ": outline-conf 9 | 10 | #import "../utils/thanks.typ": thanks 11 | #import "../utils/show-appendix.typ": show-appendix-bachelor 12 | 13 | #let bachelor-trans-utils = (thanks, show-appendix-bachelor) 14 | 15 | #let bachelor-trans-conf( 16 | student-id: none, 17 | author: none, 18 | school: none, 19 | major: none, 20 | advisor: none, 21 | thesis-name-cn: none, 22 | thesis-name-raw: none, 23 | date: none, 24 | cn-abstract: none, 25 | cn-keywords: none, 26 | en-abstract: none, 27 | en-keywords: none, 28 | outline-depth: 3, 29 | bilingual-bib: true, 30 | doc, 31 | ) = { 32 | show: set-bachelor.with(bilingual-bib: bilingual-bib) 33 | 34 | // 封面 35 | bachelor-trans-cover-conf( 36 | student-id: student-id, 37 | author: author, 38 | school: school, 39 | major: major, 40 | advisor: advisor, 41 | thesis-name-cn: thesis-name-cn, 42 | thesis-name-raw: thesis-name-raw, 43 | date: date, 44 | ) 45 | 46 | // 摘要 47 | abstract-conf( 48 | cn-abstract: cn-abstract, 49 | cn-keywords: cn-keywords, 50 | en-abstract: en-abstract, 51 | en-keywords: en-keywords, 52 | ) 53 | 54 | // 目录 55 | outline-conf(outline-depth: outline-depth) 56 | // 正文 57 | show: main-body-bachelor-conf.with(header-text: "本科毕业设计(论文)资料翻译") 58 | doc 59 | } 60 | 61 | #show: bachelor-trans-conf.with( 62 | student-id: "00121001", 63 | author: "王东南", 64 | school: "示例学院", 65 | major: "示例专业", 66 | advisor: "湖牌桥", 67 | thesis-name-cn: "新兴排版方式下的摸鱼科学优化研究", 68 | thesis-name-raw: "Optimization of Fish-Touching Strategies \n in Emerging Typesetting Environments", 69 | date: "某个完成日期", 70 | cn-abstract: [示例摘要], 71 | cn-keywords: ("关键词1", "关键词2"), 72 | en-abstract: [#lorem(100)], 73 | en-keywords: ("Keywords1", "Keywords2"), 74 | outline-depth: 3, 75 | ) 76 | -------------------------------------------------------------------------------- /seu-thesis/templates/bachelor.typ: -------------------------------------------------------------------------------- 1 | #import "../utils/fonts.typ": 字体, 字号 2 | #import "../utils/set-bachelor.typ": set-bachelor 3 | #import "../utils/states.typ": part-state 4 | 5 | #import "../pages/cover-bachelor-fn.typ": bachelor-cover-conf 6 | #import "../parts/abstract-bachelor-fn.typ": abstract-conf 7 | #import "../parts/main-body-bachelor-fn.typ": main-body-bachelor-conf 8 | #import "../parts/outline-bachelor-fn.typ": outline-conf 9 | 10 | #import "../utils/thanks.typ": thanks 11 | #import "../utils/show-appendix.typ": show-appendix-bachelor 12 | 13 | #import "../pages/back-bachelor-fn.typ": bachelor-back 14 | 15 | #let bachelor-utils = (thanks, show-appendix-bachelor) 16 | 17 | #let bachelor-conf( 18 | student-id: none, 19 | author: none, 20 | school: none, 21 | major: none, 22 | advisor: none, 23 | thesis-name: none, 24 | date: none, 25 | cover-date: datetime.today(), 26 | cn-abstract: none, 27 | cn-keywords: none, 28 | en-abstract: none, 29 | en-keywords: none, 30 | outline-depth: 3, 31 | bilingual-bib: true, 32 | doc, 33 | ) = { 34 | show: set-bachelor.with(bilingual-bib: bilingual-bib) 35 | 36 | // 封面 37 | bachelor-cover-conf( 38 | student-id: student-id, 39 | author: author, 40 | school: school, 41 | major: major, 42 | advisor: advisor, 43 | thesis-name: thesis-name, 44 | date: date, 45 | cover-date: cover-date, 46 | ) 47 | 48 | // 独创性声明 49 | include "../pages/statement-bachelor-ic.typ" 50 | 51 | // 摘要 52 | abstract-conf( 53 | cn-abstract: cn-abstract, 54 | cn-keywords: cn-keywords, 55 | en-abstract: en-abstract, 56 | en-keywords: en-keywords, 57 | ) 58 | 59 | // 目录 60 | outline-conf(outline-depth: outline-depth) 61 | 62 | // 正文 63 | main-body-bachelor-conf(doc) 64 | 65 | // 封底 66 | bachelor-back() 67 | } 68 | 69 | #show: bachelor-conf.with( 70 | student-id: "00121001", 71 | author: "王东南", 72 | school: "示例学院", 73 | major: "示例专业", 74 | advisor: "湖牌桥", 75 | thesis-name: "示例论文标题\n此行空白时下划线自动消失", 76 | date: "某个起止日期", 77 | cn-abstract: [示例摘要], 78 | cn-keywords: ("关键词1", "关键词2"), 79 | en-abstract: [#lorem(100)], 80 | en-keywords: ("Keywords1", "Keywords2"), 81 | outline-depth: 3, 82 | ) 83 | -------------------------------------------------------------------------------- /seu-thesis/templates/degree.typ: -------------------------------------------------------------------------------- 1 | #import "../pages/cover-degree-fn.typ": degree-cover-conf 2 | #import "../pages/title-page-degree-cn-fn.typ": title-cn-conf 3 | #import "../pages/title-page-degree-en-fn.typ": title-en-conf 4 | #import "../pages/statement-degree-fn.typ": degree-statement-conf 5 | #import "../parts/abstract-degree-fn.typ": abstract-conf 6 | #import "../parts/outline-degree-fn.typ": outline-conf 7 | #import "../parts/terminology.typ": terminology-conf 8 | #import "../parts/main-body-degree-fn.typ": main-body-bachelor-conf 9 | 10 | #import "../utils/set-degree.typ": set-degree 11 | #import "../utils/smart-pagebreak.typ": gen-smart-pagebreak 12 | 13 | #import "../utils/thanks.typ": thanks 14 | #import "../utils/show-appendix.typ": show-appendix-degree 15 | 16 | #let degree-utils = (thanks, show-appendix-degree) 17 | 18 | #let degree-conf( 19 | author: (CN: "王东南", EN: "WANG Dong-nan", ID: "012345"), 20 | thesis-name: ( 21 | CN: "硕士学位论文", 22 | EN: [ 23 | A Thesis submitted to \ 24 | Southeast University \ 25 | For the Academic Degree of Master of Touching Fish 26 | ], 27 | heading: "东南大学硕士学位论文", 28 | ), 29 | title: ( 30 | CN: "摸鱼背景下的Typst模板使用研究", 31 | EN: "A Study of the Use of the Typst Template During Touching Fish", 32 | ), 33 | advisors: ( 34 | (CN: "湖牌桥", EN: "HU Pai-qiao", CN-title: "教授", EN-title: "Prof."), 35 | ( 36 | CN: "苏锡浦", 37 | EN: "SU Xi-pu", 38 | CN-title: "副教授", 39 | EN-title: "Associate Prof.", 40 | ), 41 | ), 42 | school: ( 43 | CN: "摸鱼学院", 44 | EN: "School of Touchingfish", 45 | ), 46 | major: ( 47 | main: "摸鱼科学", 48 | submajor: "计算机摸鱼", 49 | ), 50 | degree: "摸鱼学硕士", 51 | category-number: "N94", 52 | secret-level: "公开", 53 | UDC: "303", 54 | school-number: "10286", 55 | committee-chair: "张三 教授", 56 | readers: ( 57 | "李四 副教授", 58 | "王五 副教授", 59 | ), 60 | date: ( 61 | CN: ( 62 | defend-date: "2099年01月02日", 63 | authorize-date: "2099年01月03日", 64 | finish-date: "2024年01月15日", 65 | ), 66 | EN: ( 67 | finish-date: "Jan 15, 2024", 68 | ), 69 | ), 70 | thanks: "本论文受到摸鱼基金委的基金赞助(123456)", 71 | degree-form: "应用研究", 72 | cn-abstract: [示例摘要], 73 | cn-keywords: ("关键词1", "关键词2"), 74 | en-abstract: [#lorem(100)], 75 | en-keywords: ("Keywords1", "Keywords2"), 76 | always-start-odd: false, 77 | terminology: none, 78 | anonymous: false, 79 | skip-with-page-blank: false, 80 | bilingual-bib: true, 81 | first-level-title-page-disable-heading: false, 82 | doc, 83 | ) = { 84 | 85 | let smart-pagebreak = gen-smart-pagebreak.with( 86 | skip-with-page-blank: skip-with-page-blank, 87 | always-skip-even: always-start-odd, 88 | ) 89 | 90 | show: set-degree.with( 91 | always-new-page: smart-pagebreak, 92 | bilingual-bib: bilingual-bib, 93 | ) 94 | 95 | degree-cover-conf( 96 | author: author, 97 | thesis-name: thesis-name, 98 | title: title, 99 | advisors: advisors, 100 | school: school, 101 | major: major, 102 | degree: degree, 103 | category-number: category-number, 104 | secret-level: secret-level, 105 | UDC: UDC, 106 | school-number: school-number, 107 | committee-chair: committee-chair, 108 | readers: readers, 109 | date: date, 110 | degree-form: degree-form, 111 | anonymous: anonymous, 112 | ) 113 | 114 | smart-pagebreak() 115 | 116 | title-cn-conf( 117 | author: author, 118 | thesis-name: thesis-name, 119 | title: title, 120 | advisors: advisors, 121 | school: school, 122 | major: major, 123 | date: date, 124 | thanks: thanks, 125 | anonymous: false, 126 | ) 127 | 128 | smart-pagebreak() 129 | 130 | title-en-conf( 131 | author: author, 132 | thesis-name: thesis-name, 133 | title: title, 134 | advisors: advisors, 135 | school: school, 136 | date: date, 137 | anonymous: false, 138 | ) 139 | 140 | smart-pagebreak() 141 | 142 | degree-statement-conf() 143 | 144 | smart-pagebreak() 145 | 146 | abstract-conf( 147 | cn-abstract: cn-abstract, 148 | cn-keywords: cn-keywords, 149 | en-abstract: en-abstract, 150 | en-keywords: en-keywords, 151 | page-break: smart-pagebreak, 152 | ) 153 | 154 | smart-pagebreak() 155 | 156 | outline-conf() 157 | 158 | if not terminology in (none, [], [ ], "") { 159 | smart-pagebreak() 160 | terminology-conf(terminology) 161 | } 162 | 163 | smart-pagebreak(skip-with-page-blank: true) 164 | 165 | show: main-body-bachelor-conf.with( 166 | thesis-name: thesis-name, 167 | first-level-title-page-disable-heading: first-level-title-page-disable-heading, 168 | ) 169 | 170 | doc 171 | } 172 | 173 | #show: degree-conf.with( 174 | author: (CN: "王东南", EN: "WANG Dong-nan", ID: "012345"), 175 | thesis-name: ( 176 | CN: "硕士学位论文", 177 | EN: [ 178 | A Thesis submitted to \ 179 | Southeast University \ 180 | For the Academic Degree of Master of Touching Fish 181 | ], 182 | heading: "东南大学硕士学位论文", 183 | ), 184 | title: ( 185 | CN: "摸鱼背景下的Typst模板使用研究", 186 | EN: "A Study of the Use of the Typst Template During Touching Fish", 187 | ), 188 | advisors: ( 189 | (CN: "湖牌桥", EN: "HU Pai-qiao", CN-title: "教授", EN-title: "Prof."), 190 | ( 191 | CN: "苏锡浦", 192 | EN: "SU Xi-pu", 193 | CN-title: "副教授", 194 | EN-title: "Associate Prof.", 195 | ), 196 | ), 197 | school: ( 198 | CN: "摸鱼学院", 199 | EN: "School of Touchingfish", 200 | ), 201 | major: ( 202 | main: "摸鱼科学", 203 | submajor: "计算机摸鱼", 204 | ), 205 | degree: "摸鱼学硕士", 206 | category-number: "N94", 207 | secret-level: "公开", 208 | UDC: "303", 209 | school-number: "10286", 210 | committee-chair: "张三 教授", 211 | readers: ( 212 | "李四 副教授", 213 | "王五 副教授", 214 | ), 215 | date: ( 216 | CN: ( 217 | defend-date: "2099年01月02日", 218 | authorize-date: "2099年01月03日", 219 | finish-date: "2024年01月15日", 220 | ), 221 | EN: ( 222 | finish-date: "Jan 15, 2024", 223 | ), 224 | ), 225 | thanks: "本论文受到摸鱼基金委的基金赞助(123456)", 226 | degree-form: "应用研究", 227 | cn-abstract: [示例摘要], 228 | cn-keywords: ("关键词1", "关键词2"), 229 | en-abstract: [#lorem(100)], 230 | en-keywords: ("Keywords1", "Keywords2"), 231 | always-start-odd: true, 232 | terminology: none, 233 | anonymous: false, 234 | ) -------------------------------------------------------------------------------- /seu-thesis/utils/bachelor-footnote.typ: -------------------------------------------------------------------------------- 1 | // Usage: show footnote.entry: bachelor-footnote 2 | // 需要在文档开头使用 3 | 4 | #import "fonts.typ": 字体, 字号 5 | #import "numbering-tools.typ": number-with-circle 6 | 7 | #let bachelor-footnote(it) = { 8 | let loc = it.note.location() 9 | set par(leading: 14pt) 10 | h(2em) 11 | text( 12 | font: 字体.宋体, 13 | size: 字号.小五 / 2, 14 | weight: "regular", 15 | baseline: -0.5em, 16 | numbering(number-with-circle, ..counter(footnote).at(loc)), 17 | ) 18 | h(0.5em) 19 | set text(font: 字体.宋体, size: 字号.小五, weight: "regular", baseline: 0em) 20 | it.note.body 21 | } -------------------------------------------------------------------------------- /seu-thesis/utils/bilingual-bibliography.typ: -------------------------------------------------------------------------------- 1 | // Authors: csimide, OrangeX4 2 | // Tested only on GB-7714-2015-Numeric 3 | 4 | #let bilingual-bibliography( 5 | mapping: (:), 6 | cont, 7 | ) = { 8 | // Please fill in the remaining mapping table here 9 | mapping = ( 10 | ( 11 | //"等": "et al", 12 | "卷": "Vol.", 13 | "册": "Bk.", 14 | // "译": "tran", 15 | // "等译": "et al. tran", 16 | // 注: 请见下方译者数量判断部分。 17 | ) 18 | + mapping 19 | ) 20 | 21 | let to-string(content) = { 22 | if content.has("text") { 23 | content.text 24 | } else if content.has("children") { 25 | content.children.map(to-string).join("") 26 | } else if content.has("child") { 27 | to-string(content.child) 28 | } else if content.has("body") { 29 | to-string(content.body) 30 | } else if content == [ ] { 31 | " " 32 | } 33 | } 34 | 35 | show grid.cell.where(x: 1): it => { 36 | // 后续的操作是对 string 进行的。 37 | let ittext = to-string(it) 38 | // 判断是否为中文文献:去除特定词组后,仍有至少两个连续汉字。 39 | let pureittext = ittext.replace( 40 | regex("[等卷册和版本章期页篇译间者(不详)]"), 41 | "", 42 | ) 43 | if pureittext.find(regex("\p{sc=Hani}{2,}")) != none { 44 | ittext 45 | } else { 46 | // 若不是中文文献,进行替换 47 | // 第xxx卷、第xxx册的情况:变为 Vol. XXX 或 Bk. XXX。 48 | let reptext = ittext 49 | reptext = reptext.replace( 50 | regex("(第\s?)?\d+\s?[卷册]"), 51 | itt => { 52 | if itt.text.contains("卷") { 53 | "Vol. " 54 | } else { 55 | "Bk. " 56 | } 57 | itt.text.find(regex("\d+")) 58 | }, 59 | ) 60 | 61 | // 第xxx版/第xxx本的情况:变为 1st ed 格式。 62 | reptext = reptext.replace( 63 | regex("(第\s?)?\d+\s?[版本]"), 64 | itt => { 65 | let num = itt.text.find(regex("\d+")) 66 | num 67 | if num.clusters().len() == 2 and num.clusters().first() == "1" { 68 | "th" 69 | } else { 70 | ( 71 | "1": "st", 72 | "2": "nd", 73 | "3": "rd", 74 | ).at(num.clusters().last(), default: "th") 75 | } 76 | " ed" 77 | }, 78 | ) 79 | 80 | // 译者数量判断:单数时需要用 trans,复数时需要用 tran 。 81 | /* 82 | 注: 83 | 1. 目前判断译者数量的方法非常草率,有逗号就是多个作者。但是在部分 GB/T 7714-2015 方言中,姓名中可以含有逗号。 84 | 2. 在 GB/T 7714-2015 原文中有 `等译`(P15 10.1.3 小节 示例 1-[1]),但未给出相应的英文缩写翻译。 85 | 3. CSL 社区库内的 GB/T 7714-2015 会使用 `等, 译` 和 `et al., tran` 的写法。为了保证统一性,这里会译作不带逗号的版本,即 `et al. tran` 86 | 如果工作不正常,可以考虑换为简单关键词替换,即注释这段情况,取消 13 行 mapping 内 `译` 条目的注释。 87 | */ 88 | reptext = reptext.replace( 89 | regex("\].+?译"), 90 | itt => { 91 | // 我想让上面这一行匹配变成非贪婪的,但加问号后没啥效果? 92 | if itt.text.replace(regex(",\s?译"), "").find(",") != none { 93 | itt.text.replace(regex(",?\s?译"), " tran") 94 | } else { 95 | itt.text.replace(regex(",?\s?译"), " trans") 96 | } 97 | }, 98 | ) 99 | 100 | // `等` 特殊处理:`等`后方接内容也需要译作 `et al.`,如 `等译` 需要翻译为 `et al. trans` 101 | reptext = reptext.replace( 102 | regex("等."), 103 | itt => { 104 | "et al." 105 | // 如果原文就是 `等.`,则仅需简单替换,不需要额外处理 106 | // 如果原文 `等` 后没有跟随英文标点,则需要补充一个空格 107 | if not ( 108 | itt.text.last() 109 | in ( 110 | ".", 111 | ",", 112 | ";", 113 | ":", 114 | "[", 115 | "]", 116 | "/", 117 | "\\", 118 | "<", 119 | ">", 120 | "?", 121 | "(", 122 | ")", 123 | " ", 124 | "\"", 125 | "'", 126 | ) 127 | ) { 128 | " " 129 | } 130 | // 原文有英文句号时不需要重复句号,否则需要将匹配到的最后一个字符吐回来 131 | if not itt.text.last() == "." { 132 | itt.text.last() 133 | } 134 | }, 135 | ) 136 | 137 | // 其他情况:直接替换 138 | reptext = reptext.replace( 139 | regex("\p{sc=Hani}+"), 140 | itt => { 141 | mapping.at(itt.text, default: itt.text) 142 | // 注意:若替换功能工作良好,应该不会出现 `default` 情形 143 | }, 144 | ) 145 | reptext 146 | } 147 | } 148 | 149 | set text(lang: "zh") 150 | cont 151 | } 152 | 153 | #let show-bibliography( 154 | mapping: (:), 155 | bilingual: true, 156 | font-size: auto, 157 | it, 158 | ) = { 159 | set bibliography(title: none) 160 | show bibliography: it => { 161 | heading( 162 | bookmarked: true, 163 | outlined: true, 164 | numbering: none, 165 | level: 1, 166 | )[参考文献] 167 | assert(font-size == auto or type(font-size) == length, message: "字体大小需要为 `auto` 或 `length`") 168 | set text(size: font-size) if font-size != auto 169 | if bilingual { 170 | bilingual-bibliography(mapping: mapping, it) 171 | } else { 172 | it 173 | } 174 | } 175 | it 176 | } 177 | -------------------------------------------------------------------------------- /seu-thesis/utils/fonts.typ: -------------------------------------------------------------------------------- 1 | #let 字号 = ( 2 | 初号: 42pt, 3 | 小初: 36pt, 4 | 一号: 26pt, 5 | 小一: 24pt, 6 | 二号: 22pt, 7 | 小二: 18pt, 8 | 三号: 16pt, 9 | 小三: 15pt, 10 | 四号: 14pt, 11 | 中四: 13pt, 12 | 小四: 12pt, 13 | 五号: 10.5pt, 14 | 小五: 9pt, 15 | 六号: 7.5pt, 16 | 小六: 6.5pt, 17 | 七号: 5.5pt, 18 | 小七: 5pt, 19 | ) 20 | 21 | #let 字体 = ( 22 | 仿宋: ((name: "Times New Roman", covers: "latin-in-cjk"), "FangSong", "STFangSong"), 23 | 宋体: ((name: "Times New Roman", covers: "latin-in-cjk"), "SimSun"), 24 | 黑体: ((name: "Times New Roman", covers: "latin-in-cjk"), "SimHei"), 25 | //标题黑体: ("SimHei"), 26 | 标题宋体: ((name: "Times New Roman", covers: "latin-in-cjk"), "STZhongsong", "SimSun"), 27 | 楷体: ((name: "Times New Roman", covers: "latin-in-cjk"), "KaiTi"), 28 | 代码: ((name: "New Computer Modern Mono", covers: "latin-in-cjk"), "SimSun"), 29 | // 思源宋体: ((name: "Times New Roman", covers: "latin-in-cjk"), "Source Han Serif SC", "Source Han Serif"), // 暂未使用 30 | 思源黑体: ((name: "Times New Roman", covers: "latin-in-cjk"), "Source Han Sans SC", "Source Han Sans"), 31 | ) 32 | 33 | #let ziti = 字体 34 | #let zihao = 字号 35 | 36 | #let chineseunderline(s, width: 300pt, bold: false, bottom: none) = { 37 | // 来自 pku-thesis 38 | let chars = if s == none or s == "" {(" ")} else {s.clusters()} 39 | let n = chars.len() 40 | context { 41 | let i = 0 42 | let now = "" 43 | let ret = () 44 | let padding = par.spacing/3 45 | if bottom != none { 46 | padding = bottom 47 | } 48 | 49 | while i < n { 50 | let c = chars.at(i) 51 | let nxt = now + c 52 | 53 | if measure(nxt).width > width or c == "\n" { 54 | if bold { 55 | ret.push(text(weight: "bold", now)) 56 | } else { 57 | ret.push(now) 58 | } 59 | ret.push(v(-par.spacing)) 60 | ret.push(line(start: (0em, padding), length: 100%, stroke: (thickness: 0.5pt))) 61 | if c == "\n" { 62 | now = "" 63 | } else { 64 | now = c 65 | } 66 | } else { 67 | now = nxt 68 | } 69 | 70 | i = i + 1 71 | } 72 | 73 | if now.len() > 0 { 74 | if bold { 75 | ret.push(strong(now)) 76 | } else { 77 | ret.push(now) 78 | } 79 | ret.push(v(-par.spacing)) 80 | ret.push(line(start: (0em, padding),length: 100%, stroke: (thickness: 0.5pt))) 81 | } 82 | 83 | ret.join() 84 | } 85 | } 86 | 87 | #let justify-words(s, width: auto) = { 88 | assert(type(s) == str and s.clusters().len() >= 2) 89 | context { 90 | let measure-width = measure(s).width 91 | let expected-width = if width == auto { 92 | 0pt 93 | } else if type(width) in (str, content) { 94 | measure(width).width.to-absolute() 95 | } else if type(width) == length { 96 | width.to-absolute() 97 | } 98 | let spacing = if measure-width > expected-width { 99 | 0pt 100 | } else { 101 | (expected-width - measure-width) / (s.clusters().len() - 1) 102 | } 103 | text(tracking: spacing, s) 104 | } 105 | } -------------------------------------------------------------------------------- /seu-thesis/utils/get-heading-title.typ: -------------------------------------------------------------------------------- 1 | // 改自小蓝书 2 | // https://typst-doc-cn.github.io/tutorial/intermediate/content-stateful-3.html 3 | 4 | #let first-heading = state("first-heading", (:)) 5 | #let last-heading = state("last-heading", (:)) 6 | 7 | 8 | // 注:这个函数的逻辑在 `show-heading.typ` 内再次实现了一遍,因此注释掉了此处的代码 9 | // 若需使用,请在 heading 设置格式的最后添加 `show: show-update-heading-title` 10 | /* 11 | #let show-update-heading-title(it) = { 12 | show heading.where(level: 1): curr-heading => { 13 | curr-heading 14 | 15 | context { 16 | let loc = here() 17 | last-heading.update(headings => { 18 | headings.insert(str(loc.page()), curr-heading) 19 | return headings 20 | }) 21 | first-heading.update(headings => { 22 | let k = str(loc.page()) 23 | if k not in headings.keys() { 24 | headings.insert(k, curr-heading) 25 | } 26 | return headings 27 | }) 28 | } 29 | } 30 | it 31 | } 32 | */ 33 | 34 | #let find-headings(headings, page-num) = if page-num > 0 { 35 | headings.at(str(page-num), default: find-headings(headings, page-num - 1)) 36 | } 37 | 38 | 39 | // 返回 array `(str|none, bool,)` 40 | // 第一个元素表示当前的一级标题,如果找不到则为 none 41 | // 第二个元素表示当前页面是否为标题页面,是则为 true 42 | #let get-heading-at-page(loc) = { 43 | let page-num = loc.page() 44 | let first-headings = first-heading.final() 45 | let last-headings = last-heading.at(loc) 46 | 47 | let seek-heading = first-headings.at(str(page-num), default: none) 48 | 49 | if seek-heading != none { 50 | return (seek-heading, true) 51 | } else { 52 | return (find-headings(last-headings, page-num), false) 53 | } 54 | } -------------------------------------------------------------------------------- /seu-thesis/utils/numbering-tools.typ: -------------------------------------------------------------------------------- 1 | #import "packages.typ": int-to-cn-num 2 | #import "states.typ": part-state 3 | #import "fonts.typ": 字体, 字号 4 | 5 | #let number-with-circle( 6 | num, 7 | ) = "①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳㉑㉒㉓㉔㉕㉖㉗㉘㉙㉚㉛㉜㉝㉞㉟㊱㊲㊳㊴㊵㊶㊷㊸㊹㊺㊻㊼㊽㊾㊿".clusters().at( 8 | num - 1, 9 | default: "®", 10 | ) 11 | 12 | #let chinese-numbering( 13 | ..nums, 14 | in-appendix: false, 15 | brackets: false, 16 | ) = context { 17 | if not in-appendix { 18 | if nums.pos().len() == 1 { 19 | "第" + int-to-cn-num(nums.pos().first()) + "章" 20 | } else { 21 | numbering( 22 | if brackets { 23 | "(1.1)" 24 | } else { 25 | "1.1" 26 | }, 27 | ..nums, 28 | ) 29 | } 30 | } else { 31 | if nums.pos().len() == 1 { 32 | "附录 " + numbering("A.1", ..nums) 33 | } else { 34 | numbering( 35 | if brackets { 36 | "(A.1)" 37 | } else { 38 | "A.1" 39 | }, 40 | ..nums, 41 | ) 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /seu-thesis/utils/packages.typ: -------------------------------------------------------------------------------- 1 | // 统一在此文件导入包,方便后续更新 2 | 3 | #import "@preview/a2c-nums:0.0.1": int-to-cn-num 4 | #import "@preview/cuti:0.3.0": show-cn-fakebold, fakebold 5 | #import "@preview/i-figured:0.2.4" -------------------------------------------------------------------------------- /seu-thesis/utils/set-bachelor.typ: -------------------------------------------------------------------------------- 1 | #import "numbering-tools.typ": number-with-circle, chinese-numbering 2 | #import "packages.typ": show-cn-fakebold, i-figured 3 | #import "bachelor-footnote.typ": bachelor-footnote 4 | #import "show-heading.typ": show-heading 5 | #import "bilingual-bibliography.typ": show-bibliography 6 | #import "fonts.typ": 字体, 字号 7 | 8 | #let set-bachelor(bilingual-bib: true, doc) = { 9 | set page( 10 | paper: "a4", 11 | margin: ( 12 | top: 2cm + 0.5cm, 13 | bottom: 2cm + 1cm, 14 | left: 2cm + 0.5cm, 15 | right: 2cm, 16 | ), 17 | ) 18 | set text(font: 字体.宋体, size: 字号.小四, weight: "regular", lang: "zh") 19 | set par(first-line-indent: (amount: 2em, all: true), leading: 15pt, justify: true, spacing: 15.2pt) 20 | 21 | show: show-cn-fakebold 22 | 23 | show: show-bibliography.with(bilingual: bilingual-bib, font-size: 字号.五号) 24 | 25 | show heading: show-heading.with( 26 | heading-top-margin: (0.2cm, 0.11cm, 0cm), 27 | heading-bottom-margin: (0.12cm, 0.1cm, 0cm), 28 | heading-space: (0.5em, 0.3em), 29 | heading-indent: (0cm, 0em, 0em), 30 | heading-align: (center, left, left), 31 | heading-text: ( 32 | (font: 字体.黑体, size: 字号.三号, weight: "bold"), 33 | (font: 字体.黑体, size: 字号.四号, weight: "regular"), 34 | (font: 字体.宋体, size: 字号.小四, weight: "regular"), 35 | ), 36 | always-new-page: true, 37 | auto-h-spacing: true, 38 | ) 39 | show heading.where(level: 1): set heading(supplement: none) 40 | 41 | set outline(depth: 3, indent: 2em) 42 | 43 | show figure.where(kind: table): set figure.caption(position: top) 44 | show figure: set figure(gap: 1.1em) 45 | show figure: set text(size: 字号.五号, font: 字体.宋体, weight: "regular") 46 | show figure: i-figured.show-figure.with(numbering: "1-1") 47 | show figure.where(kind: table): i-figured.show-figure.with(numbering: "1.1") 48 | show figure.where(kind: table): it => v(1.2em) + it 49 | show math.equation.where(block: true): i-figured.show-equation 50 | 51 | set footnote(numbering: num => number-with-circle(num)) 52 | set footnote.entry( 53 | separator: line(start: (2.5em, 0pt), length: 30%, stroke: 0.5pt) + v(0.5em), 54 | gap: 1em, 55 | ) 56 | show footnote.entry: bachelor-footnote 57 | 58 | set heading(numbering: chinese-numbering.with(in-appendix: false)) 59 | 60 | doc 61 | } 62 | -------------------------------------------------------------------------------- /seu-thesis/utils/set-degree.typ: -------------------------------------------------------------------------------- 1 | #import "numbering-tools.typ": chinese-numbering 2 | #import "packages.typ": show-cn-fakebold, i-figured 3 | #import "show-heading.typ": show-heading 4 | #import "bilingual-bibliography.typ": show-bibliography 5 | #import "show-equation-degree.typ": show-math-equation-degree 6 | #import "fonts.typ": 字体, 字号 7 | 8 | #let set-degree(always-new-page: true, bilingual-bib: true, doc) = { 9 | set page(paper: "a4", margin: (top: 2cm, bottom: 2cm, left: 2cm, right: 2cm)) 10 | set text(font: 字体.宋体, size: 字号.小四, weight: "regular", lang: "zh") 11 | set par(first-line-indent: (amount: 2em, all: true), leading: 9.6pt, justify: true, spacing: 9.6pt) 12 | 13 | show: show-cn-fakebold 14 | 15 | show: show-bibliography.with(bilingual: bilingual-bib) 16 | 17 | show heading: show-heading.with( 18 | always-new-page: always-new-page, 19 | heading-top-margin: (1cm, 0.1cm, 0.05cm), 20 | heading-bottom-margin: (1cm, 0cm, 0cm), 21 | heading-text: ( 22 | (font: 字体.黑体, size: 字号.三号, weight: "regular"), 23 | (font: 字体.宋体, size: 字号.四号, weight: "bold"), 24 | (font: 字体.黑体, size: 字号.小四, weight: "regular"), 25 | ), 26 | ) 27 | show heading.where(level: 1): set heading(supplement: none) 28 | // 标题写入 state 的保存逻辑在 show-heading.typ 29 | 30 | show figure.where(kind: table): set figure.caption(position: top) 31 | show figure: set text(size: 字号.五号, font: 字体.宋体, weight: "regular") 32 | show figure: i-figured.show-figure.with(numbering: "1-1") 33 | show figure.where(kind: table): i-figured.show-figure.with(numbering: "1.1") 34 | show math.equation.where(block: true): i-figured.show-equation 35 | set math.equation(number-align: bottom) 36 | // 研究生院要求:公式首行的起始位置空四格。 37 | show math.equation.where(block: true): show-math-equation-degree 38 | 39 | set heading(numbering: chinese-numbering) 40 | 41 | doc 42 | } -------------------------------------------------------------------------------- /seu-thesis/utils/show-appendix.typ: -------------------------------------------------------------------------------- 1 | #import "states.typ": part-state 2 | #import "numbering-tools.typ": chinese-numbering 3 | #import "packages.typ": i-figured 4 | 5 | #let show-appendix-bachelor( 6 | it, 7 | table-numbering: "A.1", 8 | image-numbering: "A-1", 9 | equation-numbering: "(A.1)", 10 | ) = { 11 | part-state.update("附录") 12 | counter(heading).update(0) 13 | counter(heading.where(level: 1)).update(0) 14 | set heading(numbering: chinese-numbering.with(in-appendix: true)) 15 | 16 | show figure: i-figured.show-figure.with(numbering: image-numbering) 17 | show figure.where(kind: table): i-figured.show-figure.with(numbering: table-numbering) 18 | show math.equation.where(block: true): i-figured.show-equation.with(numbering: equation-numbering) 19 | it 20 | } 21 | 22 | #let show-appendix-degree( 23 | it, 24 | table-numbering: "A-1", 25 | image-numbering: "A-1", 26 | equation-numbering: "(A-1)", 27 | ) = { 28 | show: show-appendix-bachelor.with( 29 | table-numbering: table-numbering, 30 | image-numbering: image-numbering, 31 | equation-numbering: equation-numbering, 32 | ) 33 | it 34 | } -------------------------------------------------------------------------------- /seu-thesis/utils/show-equation-degree.typ: -------------------------------------------------------------------------------- 1 | // 研究生院要求:公式首行的起始位置空四格。 2 | // #show math.equation: show-math-equation-degree 3 | #let show-math-equation-degree(eq) = { 4 | if eq.block and eq.numbering != none { 5 | set align(left) 6 | grid( 7 | columns: (4em, 100% - 4em), 8 | h(4em), 9 | eq 10 | ) 11 | } else { 12 | eq 13 | } 14 | } -------------------------------------------------------------------------------- /seu-thesis/utils/show-heading.typ: -------------------------------------------------------------------------------- 1 | #import "fonts.typ": 字体, 字号 2 | #import "packages.typ": show-cn-fakebold, i-figured 3 | #import "states.typ": * 4 | #import "to-string.typ": to-string 5 | #import "get-heading-title.typ": first-heading, last-heading 6 | 7 | #let show-heading( 8 | // 下方以数组形式给出的参数,代表 level 1, level 2, ... 标题分别使用的参数。 9 | // 超过明示参数范围(数组下标)的,使用数组内最后一个参数 10 | 11 | // 标题的上边距和下边距 12 | heading-top-margin: (0.2cm, 0cm, 0cm), 13 | heading-bottom-margin: (0cm, 0cm, 0cm), 14 | // 标题的固定缩进量 15 | heading-indent: (0cm, 0em, 0em), 16 | // 标题编号与标题的间隔 17 | heading-space: (0.5em,), 18 | // 标题对齐方式 19 | heading-align: (center, left, left), 20 | // 标题的字体 21 | heading-text: ( 22 | (font: 字体.黑体, size: 字号.三号, weight: "bold"), 23 | (font: 字体.黑体, size: 字号.四号, weight: "regular"), 24 | (font: 字体.宋体, size: 字号.小四, weight: "regular") 25 | ), 26 | // 每次一级标题都切换到新的页面,取值为 auto bool 或 function ,如果 function 则会以 function 作为分页时执行的操作 27 | always-new-page: false, 28 | // 为 true 时,二字标题会变为 A #h(2em) B 29 | auto-h-spacing: true, 30 | it 31 | ) = { 32 | set par(first-line-indent: 0em) 33 | 34 | let chapter-name-string = to-string(it.body) 35 | 36 | // 处理新页面换页 37 | if it.level == 1 and always-new-page != false { 38 | if type(always-new-page) == function { 39 | always-new-page() 40 | } else { 41 | pagebreak(weak: true) 42 | } 43 | } 44 | 45 | // 标题前间距 46 | v( 47 | heading-top-margin.at( 48 | it.level - 1, 49 | default: heading-top-margin.last(), 50 | ), 51 | ) 52 | 53 | // 标题 54 | { 55 | set align( 56 | heading-align.at( 57 | it.level - 1, 58 | default: heading-align.last(), 59 | ), 60 | ) 61 | 62 | set text( 63 | ..heading-text.at( 64 | it.level - 1, 65 | default: heading-text.last(), 66 | ), 67 | ) 68 | 69 | h( 70 | heading-indent.at( 71 | it.level - 1, 72 | default: heading-indent.last(), 73 | ), 74 | ) 75 | 76 | // 77 | if it.numbering == none { 78 | // 两个字标题的特殊处理 79 | if auto-h-spacing and chapter-name-string.clusters().len() == 2 { 80 | chapter-name-string.clusters().first() 81 | h(2em) 82 | chapter-name-string.clusters().last() 83 | } else { 84 | it.body 85 | } 86 | } else { 87 | context counter(heading).display() 88 | // “第X章” “X.X” 与标题的间距 89 | h( 90 | heading-space.at(it.level - 1, default: heading-space.last()) 91 | ) 92 | it.body 93 | } 94 | } 95 | 96 | // 标题后间距 97 | v( 98 | heading-bottom-margin.at( 99 | it.level - 1, 100 | default: heading-bottom-margin.last(), 101 | ), 102 | ) 103 | 104 | // 与 `get-heading-title` 配合,用于将一级标题信息写入 state ,供页眉显示章节的 feature 使用 105 | // 该 feature 只在学位论文中用到 106 | // 更多信息见 `get-heading-title.typ` 107 | if it.level == 1 { 108 | context { 109 | let loc = here() 110 | last-heading.update(headings => { 111 | headings.insert(str(loc.page()), it) 112 | return headings 113 | }) 114 | first-heading.update(headings => { 115 | let k = str(loc.page()) 116 | if k not in headings.keys() { 117 | headings.insert(k, it) 118 | } 119 | return headings 120 | }) 121 | } 122 | } 123 | 124 | i-figured.reset-counters((level: it.level), return-orig-heading: false) 125 | } -------------------------------------------------------------------------------- /seu-thesis/utils/smart-pagebreak.typ: -------------------------------------------------------------------------------- 1 | #let gen-smart-pagebreak( 2 | always-skip-even: true, 3 | skip-with-page-blank: true, 4 | ) = { 5 | if always-skip-even == false { 6 | pagebreak(weak: true) 7 | } else if skip-with-page-blank == false { 8 | pagebreak(weak: true, to: "odd") 9 | } else { 10 | page(header: none, footer: none)[~] 11 | } 12 | } -------------------------------------------------------------------------------- /seu-thesis/utils/states.typ: -------------------------------------------------------------------------------- 1 | #let part-state = state("part") -------------------------------------------------------------------------------- /seu-thesis/utils/thanks.typ: -------------------------------------------------------------------------------- 1 | #let thanks(title: "致谢", s) = { 2 | heading(bookmarked: true, outlined: true, numbering: none, level: 1, title) 3 | s 4 | } -------------------------------------------------------------------------------- /seu-thesis/utils/to-string.typ: -------------------------------------------------------------------------------- 1 | #let to-string(content) = { 2 | if content == none { 3 | none 4 | } else if type(content) == str { 5 | content 6 | } else if content.has("text") { 7 | content.text 8 | } else if content.has("children") { 9 | content.children.map(to-string).join("") 10 | } else if content.has("child") { 11 | to-string(content.child) 12 | } else if content.has("body") { 13 | to-string(content.body) 14 | } else if content == [ ] { 15 | " " 16 | } 17 | } -------------------------------------------------------------------------------- /thumbnail.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/csimide/SEU-Typst-Template/2b583aa88c2337b9b7c1478950825c11687dbd35/thumbnail.webp -------------------------------------------------------------------------------- /typst.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "cheda-seu-thesis" 3 | version = "0.3.4" 4 | entrypoint = "seu-thesis/lib.typ" 5 | authors = ["csimide"] 6 | license = "MIT" 7 | description = "东南大学本科毕设与研究生学位论文模板。UNOFFICIAL Southeast University Thesis Template." 8 | repository = "https://github.com/csimide/SEU-Typst-Template" 9 | keywords = ["thesis", "SEU"] 10 | categories = ["thesis"] 11 | exclude = [] 12 | 13 | [template] 14 | path = "init-files" 15 | entrypoint = "thesis.typ" 16 | thumbnail = "thumbnail.webp" --------------------------------------------------------------------------------