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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ jobs:
- name: Switch to preview import
working-directory: ${{ env.MODERN_SYSU_THESIS }}/${{ env.SEMVER }}
run: |
sd '// #import "@preview/modern-sysu-thesis:' '#import "@preview/modern-sysu-thesis:' ./template/thesis.typ
# regular expression from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
SEMVER_REGEX='(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?'
sd "// #import \"@preview/modern-sysu-thesis:($SEMVER_REGEX)\": postgraduate" '#import "@preview/modern-sysu-thesis:$1": postgraduate' ./template/thesis.typ
sd '#import "/lib.typ":' '// #import "lib.typ":' ./template/thesis.typ

- name: Configure triger user for git
Expand Down
11 changes: 9 additions & 2 deletions template/thesis.typ
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
// 仅供开发调试使用
// #import "/lib.typ": bachelor as thesis
#import "/lib.typ": postgraduate as thesis

// 建议在正式编辑论文时,采用 typst.app 中的已发布版本模板
// 本科生毕业论文模板
// #import "@preview/modern-sysu-thesis:0.4.1": bachelor as thesis
// #import thesis: abstract, acknowledgement, appendix

// 仅供开发调试使用
#import "/lib.typ": postgraduate as thesis
// 硕博士毕业论文模板
// #import "@preview/modern-sysu-thesis:0.4.1": postgraduate as thesis
#import thesis: abstract, acknowledgement, appendix, contents


// 你首先应该安装 https://gitlab.com/sysu-gitlab/thesis-template/better-thesis/-/tree/main/fonts 里的所有字体,
// 如果是 Web App 上编辑,你应该手动上传这些字体文件,否则不能正常使用「楷体」和「仿宋」,导致显示错误。

Expand Down
Loading