From 6b6d8a26f0c80c6100a1a40eceb05508963d213e Mon Sep 17 00:00:00 2001 From: kongfei Date: Wed, 24 Jun 2026 21:21:37 +0800 Subject: [PATCH] strict-modern-uestc-thesis --- .../strict-modern-uestc-thesis/2.0.0/LICENSE | 51 + .../2.0.0/README.md | 106 + .../2.0.0/example/main.typ | 140 ++ .../2.0.0/example/makefile | 21 + ...2\350\200\203\346\226\207\347\214\256.bib" | 14 + .../2.0.0/example/src/chapter1.typ | 1345 ++++++++++++ .../2.0.0/example/src/chapter2.typ | 36 + .../2.0.0/example/src/lib.typ | 1 + ...5\345\201\232\350\246\201\346\261\202.png" | Bin 0 -> 349400 bytes ...\350\246\201-\344\270\255\346\226\207.typ" | 7 + ...\350\246\201-\350\213\261\350\257\255.typ" | 9 + ...\346\236\234-\345\214\277\345\220\215.typ" | 10 + ...6\345\276\227\346\210\220\346\236\234.typ" | 13 + .../example/src/\350\207\264\350\260\242.typ" | 5 + .../src/\351\231\204\345\275\225-1.typ" | 27 + .../src/\351\231\204\345\275\225-2.typ" | 1 + .../example/uestc-thesis-template/LICENSE | 176 ++ .../example/uestc-thesis-template/README.md | 48 + .../example/uestc-thesis-template/lib.typ | 10 + .../pics/bachelor_font.svg | 1236 +++++++++++ .../uestc-thesis-template/pics/logo.svg | 1946 +++++++++++++++++ .../pics/uestc-love-typst.png | Bin 0 -> 20927 bytes .../template/component/lib.typ | 14 + ...47\275\256-1-\345\260\201\351\235\242.typ" | 142 ++ ...5\346\226\207\346\211\211\351\241\265.typ" | 322 +++ ...1\346\226\207\346\211\211\351\241\265.typ" | 89 + ...7\347\224\250\346\216\210\346\235\203.typ" | 80 + ...47\275\256-4-\346\221\230\350\246\201.typ" | 65 + ...47\275\256-5-\347\233\256\345\275\225.typ" | 42 + ...-\345\233\276\347\233\256\345\275\225.typ" | 62 + ...-\350\241\250\347\233\256\345\275\225.typ" | 62 + ...1\346\263\250\351\207\212\350\241\250.typ" | 17 + .../component/\346\255\243\346\226\207.typ" | 5 + ...45\260\276-1-\350\207\264\350\260\242.typ" | 13 + ...2\350\200\203\346\226\207\347\214\256.typ" | 21 + ...45\260\276-3-\351\231\204\345\275\225.typ" | 10 + ...6\345\276\227\346\210\220\346\236\234.typ" | 61 + .../uestc-thesis-template/template/consts.typ | 132 ++ .../uestc-thesis-template/template/thesis.typ | 82 + .../template/tools/README.md | 16 + .../template/tools/dict.typ | 7 + .../template/tools/fake-bold-skew.typ | 24 + .../template/tools/figure-i.typ | 370 ++++ .../template/tools/fixed-witdh-content.typ | 49 + .../template/tools/lib.typ | 7 + .../template/tools/term.typ | 62 + .../template/utils/bilingual-bibliography.typ | 254 +++ .../template/utils/cite-style-anonymous.csl | 467 ++++ .../template/utils/cite-style.csl | 467 ++++ .../template/utils/common.typ | 55 + .../template/utils/equation.typ | 247 +++ .../template/utils/font.typ | 13 + .../template/utils/footnote.typ | 15 + .../template/utils/heading.typ | 216 ++ .../template/utils/info.typ | 125 ++ .../template/utils/lib.typ | 22 + .../template/utils/page.typ | 135 ++ .../template/utils/ref.typ | 49 + .../template/utils/word_spacing.typ | 33 + .../2.0.0/thumbnail.png | Bin 0 -> 91696 bytes .../2.0.0/typst.toml | 16 + 61 files changed, 9070 insertions(+) create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/LICENSE create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/README.md create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/main.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/makefile create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/bib/\345\217\202\350\200\203\346\226\207\347\214\256.bib" create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/chapter1.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/chapter2.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/lib.typ create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/pic/\345\255\246\344\275\215\350\256\272\346\226\207\345\256\236\347\216\260\345\275\242\345\274\217\344\270\215\345\201\232\350\246\201\346\261\202.png" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/\346\221\230\350\246\201-\344\270\255\346\226\207.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/\346\221\230\350\246\201-\350\213\261\350\257\255.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/\346\224\273\350\257\273\345\255\246\344\275\215\346\234\237\351\227\264\345\217\226\345\276\227\346\210\220\346\236\234-\345\214\277\345\220\215.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/\346\224\273\350\257\273\345\255\246\344\275\215\346\234\237\351\227\264\345\217\226\345\276\227\346\210\220\346\236\234.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/\350\207\264\350\260\242.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/\351\231\204\345\275\225-1.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/\351\231\204\345\275\225-2.typ" create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/LICENSE create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/README.md create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/lib.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/pics/bachelor_font.svg create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/pics/logo.svg create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/pics/uestc-love-typst.png create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/lib.typ create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\345\211\215\347\275\256-1-\345\260\201\351\235\242.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\345\211\215\347\275\256-2-1-\344\270\255\346\226\207\346\211\211\351\241\265.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\345\211\215\347\275\256-2-2-\350\213\261\346\226\207\346\211\211\351\241\265.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\345\211\215\347\275\256-3-\347\213\254\345\210\233\346\200\247\345\243\260\346\230\216\345\222\214\350\256\272\346\226\207\344\275\277\347\224\250\346\216\210\346\235\203.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\345\211\215\347\275\256-4-\346\221\230\350\246\201.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\345\211\215\347\275\256-5-\347\233\256\345\275\225.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\345\211\215\347\275\256-6-1-\345\233\276\347\233\256\345\275\225.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\345\211\215\347\275\256-6-2-\350\241\250\347\233\256\345\275\225.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\345\211\215\347\275\256-7-\347\274\251\347\225\245\350\257\215\350\241\250\347\255\211\346\263\250\351\207\212\350\241\250.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\346\255\243\346\226\207.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\347\273\223\345\260\276-1-\350\207\264\350\260\242.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\347\273\223\345\260\276-2-\345\217\202\350\200\203\346\226\207\347\214\256.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\347\273\223\345\260\276-3-\351\231\204\345\275\225.typ" create mode 100644 "packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/component/\347\273\223\345\260\276-4-\346\224\273\350\257\273\345\255\246\344\275\215\346\234\237\351\227\264\345\217\226\345\276\227\346\210\220\346\236\234.typ" create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/consts.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/thesis.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/tools/README.md create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/tools/dict.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/tools/fake-bold-skew.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/tools/figure-i.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/tools/fixed-witdh-content.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/tools/lib.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/tools/term.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/bilingual-bibliography.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/cite-style-anonymous.csl create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/cite-style.csl create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/common.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/equation.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/font.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/footnote.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/heading.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/info.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/lib.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/page.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/ref.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/example/uestc-thesis-template/template/utils/word_spacing.typ create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/thumbnail.png create mode 100644 packages/preview/strict-modern-uestc-thesis/2.0.0/typst.toml diff --git a/packages/preview/strict-modern-uestc-thesis/2.0.0/LICENSE b/packages/preview/strict-modern-uestc-thesis/2.0.0/LICENSE new file mode 100644 index 0000000000..59711bc927 --- /dev/null +++ b/packages/preview/strict-modern-uestc-thesis/2.0.0/LICENSE @@ -0,0 +1,51 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/packages/preview/strict-modern-uestc-thesis/2.0.0/README.md b/packages/preview/strict-modern-uestc-thesis/2.0.0/README.md new file mode 100644 index 0000000000..1c4627822e --- /dev/null +++ b/packages/preview/strict-modern-uestc-thesis/2.0.0/README.md @@ -0,0 +1,106 @@ +
+ + + + + +无须给本仓库Star, 建议给[模板](https://github.com/uestc-typst/thesis-template)仓库点Star!有问题也需要在[模板](https://github.com/uestc-typst/thesis-template)仓库提issues. 本[仓库地址](https://github.com/uestc-typst/thesis-example). + +

+ Typst +

+ + +Apache-2 License + + +doc + + +点击加入QQ群 + + + +discussions + +
+
+
+ + +# 📚电子科技大学学位论文Typst模板实例 + +> [!NOTE] +> ✅ **学术博士学位论文已通过学校格式验证**:本模板严格遵循《电子科技大学研究生学位论文撰写规范》,可直接用于学术博士学位论文撰写。其他类型论文应当只有扉页有所区别,如有笔误等错误,欢迎在[模板](https://github.com/uestc-typst/thesis-template)提issue。 + +> [!IMPORTANT] +> 本仓库是一个模板仓库, 在[Github主页](https://github.com/qujihan/uestc-typst-thesis-example)右上角可以看到一个 `Use this template` 按钮, 可以直接使用本仓库作为模板创建一个新的仓库. +> +> 各位同学可以在本仓库的基础上进行修改 +> +> 模板本着内容于样式分离的原则, 本仓库基本除了内容不包含任何样式代码 + +# 🚀 快速开始 +```shell +# 如果想尝试一下就下载这个 +git clone https://github.com/qujihan/uestc-typst-thesis-example.git thesis +# 如果想使用Fork的仓库 +git clone https://github.com/{YOUR-NAME}/uestc-typst-thesis-example.git thesis + +cd thesis; +git submodule update --init --recursive + +cd example + +# 生成一个名为 学位论文写作指南及例子.pdf 的文件 +# 可以在 makefile 中修改生成的文件名 +make build + +# 生成一个名为 学位论文写作指南及例子.pdf 的文件, 并且随着写作实时预览 +# 可以在 makefile 中修改生成的文件名 +make watch +``` + +## 🪶 使用 VS Code(推荐) + +本仓库已预配置 Tinymist Typst 扩展,**直接用 VS Code 打开仓库根目录**即可获得实时预览和 PDF 导出,无需手动配置。 + +1. **安装扩展**:在 VS Code 扩展市场搜索并安装Tinymist Typst + +2. **打开项目**:用 VS Code 直接打开目录。 + +3. 打开tinymnist的预览即可,同时此扩展可以直接输出pdf。 + +# 📄 文档 + +本仓库生成的 `学位论文写作指南及例子.pdf` 是一份完整的论文写作指南,涵盖模板的使用方法和排版示例。 + +> PDF 文件**不纳入 git 主分支管理**(避免仓库体积膨胀),通过 CI 自动构建并推送到 `output` 分支。 + +**在线预览**:[点击预览 PDF](https://cdn.jsdelivr.net/gh/uestc-typst/thesis-example@output/%E5%AD%A6%E4%BD%8D%E8%AE%BA%E6%96%87%E5%86%99%E4%BD%9C%E6%8C%87%E5%8D%97%E5%8F%8A%E4%BE%8B%E5%AD%90.pdf) + +**下载到本地**: +```shell +git clone https://github.com/uestc-typst/thesis-example.git thesis +cd thesis +# 从 output 分支检出 PDF(不会切换分支) +git restore --source=origin/output --worktree "学位论文写作指南及例子.pdf" +``` + +# 当 Fork 本仓库后需要更改的事情 +## 建议修改 +- 修改`.vscode/settings.json`文件 + - 将`学位论文写作指南及例子.pdf`修改为需要的名字(务必以.pdf结尾) + - 修改`tinymist.exportPdf`参数(我不需要自动构建, 因为会卡, 你可以通过需求修改) + +## 🏔️ 流水线构建(如果只想本地写可以忽略) +可以在 `.github/workflows/ci.yml` 文件中修改流水线构建的配置. 比如流水线的名称, 触发条件, 构建命令等 + +**默认操作是:向任意分支push代码后, 会将所有pdf文件强制推送到output分支(之前生成的文件会被覆盖)** + + +如果在linux系统使用,可能会提示缺少字体文件,从[uestc-fonts](https://github.com/uestc-typst/uestc-fonts)下载字体到`uestc-thesis-template/fonts`即可。 \ No newline at end of file diff --git a/packages/preview/strict-modern-uestc-thesis/2.0.0/example/main.typ b/packages/preview/strict-modern-uestc-thesis/2.0.0/example/main.typ new file mode 100644 index 0000000000..8dd3009892 --- /dev/null +++ b/packages/preview/strict-modern-uestc-thesis/2.0.0/example/main.typ @@ -0,0 +1,140 @@ +// 电子科技大学学位论文模板 - 示例文档 +// 本文件展示如何使用 uestc-thesis-template 模板 +// 详细使用说明请参考第一章(src/chapter1.typ) + +// 导入模板库 +#import "uestc-thesis-template/lib.typ": * + +// 使用 thesis 函数作为 show rule 来配置论文 +// 所有参数通过 info 字典传递 +#show: thesis.with( + info: ( + // ============================================ + // 调试开关 + // 取消注释以下行可以开启调试模式,显示边框等调试信息 + // ============================================ + // DEBUG: true, + // ============================================ + // 论文排版基础信息 + // ============================================ + // 匿名模式:开启后隐藏作者、导师等个人信息 + // 用于匿名评审场景 + info-keys.匿名: false, + /* + 论文排版模式 + 论文模式.修订模式: 用于审稿修订,#revise[修改内容] 会标红显示 + 论文模式.电子档定稿模式: 用于提交电子档定稿,revise 不标红, + 独创性声明页替换为扫描页(需设置 info-keys.独创性声明扫描页 路径) + 论文模式.打印模式: 用于双面打印,奇数页起始,revise 不标红 + */ + info-keys.论文模式: 论文模式.修订模式, + // 电子档定稿模式下需要设置独创性声明扫描页路径(A4 大小的 PDF/PNG 扫描件) + info-keys.独创性声明扫描页: "src/独创性声明.pdf", + // 字体设置 + // Windows 默认使用 SimHei(黑体)和 SimSun(宋体) + // macOS/Linux 建议使用思源字体: + // 黑体字体: "Source Han Sans SC" + // 宋体字体: "Source Han Serif SC" + info-keys.黑体字体: "SimHei", + info-keys.宋体字体: "SimSun", + info-keys.加粗粗度: 250, // 只有在不使用 Sim* 系列字体的时候会起作用 + // ============================================ + // 封面信息 - 作者基本参数 + // 这些参数会影响总体封面效果 + // ============================================ + info-keys.申请学位级别: "博士", // 可选:学士、硕士、博士 + info-keys.学位类型: "学术型", // 可选:学术型、专业型 + // ============================================ + // 封面 + // 可以在标题以及学院中使用 \n 来换行 + // 也支持 \t 等其他转义字符 + // ============================================ + info-keys.论文中文标题: "UESTC-Typst学位论文模板\n使用指南及使用示例", + info-keys.作者学科专业: "排版学", // 学术型填写,专业型忽略 + info-keys.作者专业学位类别: "排版学", // 专业型填写,学术型忽略 + info-keys.作者学号: "2022XXXXXXXX", + info-keys.作者中文名: "作者姓名", + info-keys.指导老师中文名: "导师姓名", + info-keys.指导老师职称中文: "教授", + info-keys.作者学院: "计算机科学与工程学院\n(网络空间安全学院)", + // ============================================ + // 中文扉页 + // ============================================ + info-keys.分类号: "TP309.2", + info-keys.密级: "公开", + info-keys.UDC: "004.78", + // 标题已在封面中定义 + // 作者中文名已在封面中定义 + // 指导老师中文名已在封面中定义 + // 指导老师职称中文已在封面中定义 + info-keys.指导老师单位: "电子科技大学 成都", + info-keys.合作导师中文名: "合作导师姓名", + info-keys.合作导师职称中文: "教授", + info-keys.合作导师单位: "合作导师单位", + // 申请学位级别已在作者基本参数中定义 + // 专业型: 专业学位类型 已在封面中定义 + // 学术型: 作者学科专业 已在封面中定义 + info-keys.专业学位领域: "Typst排版", // 专业型填写,学术型忽略 + info-keys.提交日期: "2025年3月17日", + info-keys.答辩日期: "2025年4月15日", + info-keys.学位授予单位: "电子科技大学", + info-keys.学位授予日期: "2025年6月1日", + info-keys.答辩委员会主席: "主席名称", + info-keys.答辩委员会主席职称: "主席职称", + info-keys.评阅人: (), + // info-keys.评阅人: ("a", "b"), + // ============================================ + // 英文扉页 + // ============================================ + info-keys.论文英文标题: "UESTC-Typst Thesis Template Usage Guide and Usage Examples", + info-keys.作者学科专业英文: "Imitate the Heaven and Earth", // 学术型填写 + // info-keys.作者专业学位类别英文: "Three heads and six arms", // 专业型填写 + info-keys.作者英文名: "Nezha", + info-keys.指导老师英文名: "Taiyi Zhenren", + info-keys.指导老师职称英文: "Sage", + info-keys.作者学院英文: "Jinguang Cave on Qianyuan Mountain", + // ============================================ + // 论文内容信息 + // 注意区分两种传值方式: + // 1. 直接传字符串路径(如参考文献):info-keys.参考文献: "src/bib/参考文献.bib" + // 2. 使用 include 引入内容(如摘要):info-keys.中文摘要: include "src/摘要-中文.typ" + // ============================================ + info-keys.中文摘要: include "src/摘要-中文.typ", + info-keys.中文摘要关键字: ("电子科技大学", "Typst", "学位论文", "前程似锦"), + info-keys.英文摘要: include "src/摘要-英语.typ", + info-keys.英文摘要关键字: ("UESTC", "Typst", "Thesis", "Future"), + info-keys.附录: (include "src/附录-1.typ", include "src/附录-2.typ"), + info-keys.致谢: include "src/致谢.typ", + info-keys.参考文献: "src/bib/参考文献.bib", + // ============================================ + // 成果列表 + // 使用成果列表功能需要配置以下参数: + // 成果文件: bib 文件路径,包含所有成果条目 + // 作者姓名: 在 bib 文件中作者的名字格式,模板会自动在成果列表中加粗该作者 + // 条目: 元组,每个元素为 (, "作者排序", "分类") + // 其他成果: include 其他成果文件(如专利等) + // 其他成果-匿名: 匿名模式时使用的版本(当 info-keys.匿名: true 时自动切换) + // 如果不需要成果列表功能,可以改为直接 include: + // info-keys.攻读学位期间取得成果: include "src/攻读学位期间取得成果.typ" + // ============================================ + info-keys.成果列表: ( + 成果列表-keys.成果文件: "src/bib/参考文献.bib", + 成果列表-keys.作者姓名: "Kopka H", // 填写你的名字,模板会自动在成果列表中加粗 + 成果列表-keys.条目: ( + (, "第一作者", "示例分类"), + ), + 成果列表-keys.其他成果: include "src/攻读学位期间取得成果.typ", + 成果列表-keys.其他成果-匿名: include "src/攻读学位期间取得成果-匿名.typ", + ), + info-keys.攻读学位期间取得成果: true, + // 浮动表图标题页置底:当页面包含一级标题时,浮动图表放在页面底部 + info-keys.浮动表图标题页置底: true, + ), +) + +// ============================================ +// 引用各章节内容 +// 使用 #include 引入各章节文件 +// ============================================ +#include "src/chapter1.typ" +#include "src/chapter2.typ" diff --git a/packages/preview/strict-modern-uestc-thesis/2.0.0/example/makefile b/packages/preview/strict-modern-uestc-thesis/2.0.0/example/makefile new file mode 100644 index 0000000000..af276db8b6 --- /dev/null +++ b/packages/preview/strict-modern-uestc-thesis/2.0.0/example/makefile @@ -0,0 +1,21 @@ +# 有时候可能安装了多个版本的typst(homebrew安装 / cargo安装 / scoop安装 ...) 需要指定使用哪个版本 +# 例如 +# typst := /opt/homebrew/bin/typst +# typst := ~/.cargo/bin/typst +typst := typst + +# 输出文件名 +file_name := "学位论文写作指南及例子.pdf" + +.PHONY: all build + +all: build + +build: + ${typst} c main.typ ${file_name} --font-path ./uestc-thesis-template/fonts --root . + +watch: + ${typst} w main.typ ${file_name} --font-path ./uestc-thesis-template/fonts --root . + +clean: + git clean -df -X \ No newline at end of file diff --git "a/packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/bib/\345\217\202\350\200\203\346\226\207\347\214\256.bib" "b/packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/bib/\345\217\202\350\200\203\346\226\207\347\214\256.bib" new file mode 100644 index 0000000000..a7bfcb309a --- /dev/null +++ "b/packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/bib/\345\217\202\350\200\203\346\226\207\347\214\256.bib" @@ -0,0 +1,14 @@ +@misc{uestc2022guide, + title = {电子科技大学研究生学位论文撰写规范}, + author = {{电子科技大学研究生院}}, + year = {2022}, + url = {https://gr.uestc.edu.cn/xiazai/114/3917}, +} + +@book{kopka2004guide, + title = {Guide to LATEX}, + author = {Kopka, Helmut and Daly, Patrick W and Rahtz, SPQ}, + volume = {4}, + year = {2004}, + publisher = {Addison-Wesley Boston, MA} +} diff --git a/packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/chapter1.typ b/packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/chapter1.typ new file mode 100644 index 0000000000..b23b5985f5 --- /dev/null +++ b/packages/preview/strict-modern-uestc-thesis/2.0.0/example/src/chapter1.typ @@ -0,0 +1,1345 @@ +#import "lib.typ": * + += 模板使用说明 + +本模板是电子科技大学学位论文的 Typst 模板,本章节将详细介绍模板提供的各种功能及其用法。 + + +== `main.typ` 配置参数说明 + +本节列出 `main.typ` 中所有可配置的参数,按功能分组说明。 + +=== 匿名模式与论文排版模式 + +以下参数控制模板的匿名评审和论文排版模式: + +#block(width: 100%)[ + #set align(center) + #block(breakable: false)[ + #set align(left) + ```typ + // 匿名模式:隐藏作者、导师等个人信息,用于匿名评审 + info-keys.匿名: false, + /* + 论文排版模式 + 论文模式.修订模式: 用于审稿修订,#revise[修改内容] 会标红显示 + 论文模式.电子档定稿模式: 用于提交电子档定稿,revise 不标红, + 独创性声明页替换为扫描页(需设置 info-keys.独创性声明扫描页 路径) + 论文模式.打印模式: 用于双面打印,奇数页起始,revise 不标红 + */ + info-keys.论文模式: 论文模式.打印模式, + // 电子档定稿模式下需要设置独创性声明扫描页路径(A4 大小的 PDF/PNG 扫描件) + info-keys.独创性声明扫描页: "src/独创性声明.pdf", + ``` + ] +] + +=== 字体设置 + +模板支持自定义宋体、黑体等字体: + +#block(width: 100%)[ + #set align(center) + #block(breakable: false)[ + #set align(left) + ```typ + // 黑体字体(Windows 默认 SimHei,macOS/Linux 建议 "Source Han Sans SC") + info-keys.黑体字体: "SimHei", + // 宋体字体(Windows 默认 SimSun,macOS/Linux 建议 "Source Han Serif SC") + info-keys.宋体字体: "SimSun", + // 加粗粗度:仅在不使用 Sim* 系列字体时生效 + info-keys.加粗粗度: 250, + ``` + ] +] + +=== 封面信息 + +封面包含论文标题、作者、导师、学院等基本信息: + +#block(width: 100%)[ + #set align(center) + #block(breakable: false)[ + #set align(left) + ```typ + // 基本参数(影响封面总体效果) + info-keys.申请学位级别: "硕士", // 可选:学士、硕士、博士 + info-keys.学位类型: "专业型", // 可选:学术型、专业型 + + // 封面信息(支持使用 \\n 换行) + info-keys.论文中文标题: "论文标题", + info-keys.作者学科专业: "学科专业", // 学术型填写,专业型忽略 + info-keys.作者专业学位类别: "专业学位类别", // 专业型填写,学术型忽略 + info-keys.作者学号: "2022XXXXXXXX", + info-keys.作者中文名: "作者姓名", + info-keys.指导老师中文名: "导师姓名", + info-keys.指导老师职称中文: "教授", + info-keys.作者学院: "学院名称", + ``` + ] +] + +=== 中文扉页信息 + +中文扉页包含分类号、密级、答辩信息等详细内容: + +#block(width: 100%)[ + #set align(center) + #block(breakable: false)[ + #set align(left) + ```typ + info-keys.分类号: "TP309.2", + info-keys.密级: "公开", + info-keys.UDC: "004.78", + info-keys.指导老师单位: "电子科技大学 成都", + info-keys.合作导师中文名: "合作导师姓名", + info-keys.合作导师职称中文: "教授", + info-keys.合作导师单位: "合作导师单位", + info-keys.专业学位领域: "领域名称", // 专业型填写,学术型忽略 + info-keys.提交日期: "2025年3月17日", + info-keys.答辩日期: "2025年4月15日", + info-keys.学位授予单位: "电子科技大学", + info-keys.学位授予日期: "2025年6月1日", + info-keys.答辩委员会主席: "主席名称", + info-keys.答辩委员会主席职称: "主席职称", + // 以下两个参数为元组类型 + info-keys.评阅人: ("成员1", "成员2"), + ``` + ] +] + +=== 英文扉页信息 + +英文扉页对应中文扉页的英文版本: + +#block(width: 100%)[ + #set align(center) + #block(breakable: false)[ + #set align(left) + ```typ + info-keys.论文英文标题: "English Thesis Title", + info-keys.作者学科专业英文: "Discipline", // 学术型填写 + // info-keys.作者专业学位类别英文: "Category", // 专业型填写 + info-keys.作者英文名: "Author Name", + info-keys.指导老师英文名: "Advisor Name", + info-keys.指导老师职称英文: "Professor", + info-keys.作者学院英文: "School Name", + ``` + ] +] + +=== 论文内容信息 + +以下参数配置论文正文内容,包括摘要、附录、参考文献等: + +#block(width: 100%)[ + #set align(center) + #block(breakable: false)[ + #set align(left) + ```typ + // 使用 include 引入内容的参数 + info-keys.中文摘要: include "src/摘要-中文.typ", + info-keys.英文摘要: include "src/摘要-英语.typ", + info-keys.致谢: include "src/致谢.typ", + // 附录为元组(可包含多个 include) + info-keys.附录: (include "src/附录-1.typ", include "src/附录-2.typ"), + + // 使用字符串路径的参数 + info-keys.参考文献: "src/bib/参考文献.bib", + + // 关键字为元组 + info-keys.中文摘要关键字: ("关键字1", "关键字2"), + info-keys.英文摘要关键字: ("Keyword1", "Keyword2"), + + // 成果列表(字典格式)和攻读学位期间取得成果 + // 详见"攻读学位期间取得成果"章节 + info-keys.成果列表: (...), + info-keys.攻读学位期间取得成果: true, + + // 浮动表图:当页面包含一级标题时,浮动图表放在页面底部 + info-keys.浮动表图标题页置底: true, + ``` + ] +] + +== 图片相关 + +=== 插入图片 + +使用 `picture-figure` 函数插入图片,它会自动按章节编号(如图1-1)。 + +#block(width: 100%)[ + #set align(center) + #block(breakable: false)[ + #set align(left) + ```typ + #picture-figure( + "这是一个测试图片的标题", + image("/uestc-thesis-template/pics/logo.svg"), + ) + ``` + ] +] + +效果如下: + +#picture-figure( + "这是一个测试图片的标题", + image("/uestc-thesis-template/pics/logo.svg"), +) + +*参数说明:* +- 第一个参数:图片标题(字符串或 content) +- 第二个参数:图片内容(使用 `image()` 函数) +- `placement`:可选,浮动位置,可选值为 `top`、`bottom` 或不传(不浮动)。如果图片放置的位置在大章节标题页,并设置了浮动位置,会自动调整为 `bottom`,以避免与章节标题重叠。 + +=== 子图 + +使用 `grid` + `picture-figure` 嵌套的方式实现子图。子图会自动编号为 (a)、(b) 等。 + +#block(width: 100%)[ + #set align(center) + #block(breakable: false)[ + #set align(left) + ```typ + #picture-figure( + [子图示例:使用 grid 排列多张子图], + grid( + columns: 2, + column-gutter: 1em, + row-gutter: 0.5em, + picture-figure( + [子图(a)的标题], + image("/uestc-thesis-template/pics/logo.svg", width: 90%), + ), + [#picture-figure( + [子图(b)的标题], + image("/uestc-thesis-template/pics/logo.svg", width: 90%), + ) ], + picture-figure( + [子图(c)的标题], + image("/uestc-thesis-template/pics/logo.svg", width: 90%), + ), + picture-figure( + [子图(d)的标题], + image("/uestc-thesis-template/pics/logo.svg", width: 90%), + ), + ), + placement: top, + ) + // @subfig-b 显示为"图1-x (b)",@subfig-example 显示为"图1-x" + ``` + ] +] + +效果如下: + +#picture-figure( + [子图示例:使用 grid 排列多张子图], + grid( + columns: 2, + column-gutter: 1em, + row-gutter: 0.5em, + picture-figure( + [子图(a)的标题], + image("/uestc-thesis-template/pics/logo.svg", width: 90%), + ), + [#picture-figure( + [子图(b)的标题], + image("/uestc-thesis-template/pics/logo.svg", width: 90%), + ) ], + + picture-figure( + [子图(c)的标题], + image("/uestc-thesis-template/pics/logo.svg", width: 90%), + ), + picture-figure( + [子图(d)的标题], + image("/uestc-thesis-template/pics/logo.svg", width: 90%), + ), + ), + placement: top, +) + +*参数说明:* +- `columns`:设置列数(即每行几张子图) +- `column-gutter`:子图之间的列间距 +- `row-gutter`:子图之间的行间距 +- `gutter`:同时设置行列间距(设置后 `column-gutter` 和 `row-gutter` 会被覆盖) +- 子图的 `picture-figure` 的标题为空 `[]` 时,只显示 (a)、(b) 等编号 +- 子图的 `picture-figure` 的标题为 `none` 时,不显示编号 +- 子图引用:需要用 `[#picture-figure(...)