From e3579f71be7b34e6b35192484b01e3aad23318cc Mon Sep 17 00:00:00 2001 From: liziwl Date: Sun, 28 Apr 2024 20:23:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AD=A6=E4=BD=8D?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=A1=A8=E7=A4=BA=E6=96=B9=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E8=BF=9B=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- sustech-setup.tex | 2 +- sustechthesis-example.tex | 2 +- sustechthesis.dtx | 25 +++++++++++++------------ 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 1e62536..a445689 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ xetex sustechthesis.ins * `make clean` 删除示例文件的中间文件(不含 pdf); * `make cleanall` 删除示例文件的中间文件和 pdf; * `make wordcount` 论文字数统计。 -* `make doc` 生成文档; +* `make doc` 生成文档; * `make cls` 仅生成 cls 模版类文件; ### 使用 Docker 编译 diff --git a/sustech-setup.tex b/sustech-setup.tex index 0f1fce9..4a07c57 100644 --- a/sustech-setup.tex +++ b/sustech-setup.tex @@ -34,7 +34,7 @@ % degree-domain = {工学}, % 【中文】学科门类:可选理学、工学、医学 degree-domain* = {Engineering}, % 【英文】学位等级:可选Science, Engineering, Medicine - gongshuo = false, % 是否为专业型学位。专业型学位则填 true ,学术型或其他为 false 。 + degree-type = {academic}, % 学位类型:可选学术型(academic)【默认值】、专业型(professional)。 % % 培养单位 % 填写所属院系的全名 diff --git a/sustechthesis-example.tex b/sustechthesis-example.tex index d2f0225..db08dd4 100644 --- a/sustechthesis-example.tex +++ b/sustechthesis-example.tex @@ -29,7 +29,7 @@ % 2. 学位学科门类(理学、工学、医学) % 3. 培养单位 % 4. 作者姓名、指导教师等 -% 5. 修改gongshuo的值, 默认为false代表生成学术型研究生毕业设计模板, 改为true则将生成专业型研究生毕业设计模板 +% 5. 修改degree-type的值, 默认academic代表生成学术型研究生毕业设计模板, 改为professional则将生成专业型研究生毕业设计模板。 \input{sustech-setup} diff --git a/sustechthesis.dtx b/sustechthesis.dtx index cf83f2d..ef3f0d0 100644 --- a/sustechthesis.dtx +++ b/sustechthesis.dtx @@ -435,7 +435,7 @@ % 选项 & 可选值 \\ \midrule % degree-domain & 理学,工学,医学 \\ % degree-domain* & Science, Engineering, Medicine \\ -% gongshuo & true (专业型,如工程硕士), false (学术型,如学术硕士或其他) \\ +% degree-type & academic (学术型,如学术硕士或其他), professional (专业型,如工程硕士) \\ % \bottomrule % \end{tabular} % \end{table} @@ -444,7 +444,7 @@ % \thusetup{ % degree-domain = {学位领域}, % degree-domain* = {Degree domain in English}, -% gongshuo = false, +% degree-type = academic, % } % \end{latex} % @@ -453,7 +453,7 @@ % \begin{latex} % \thusetup{ % department = {系名全称}, -% department* = {Department name in English}} +% department* = {Department name in English} % } % \end{latex} % @@ -1109,6 +1109,7 @@ default = master, }, degree-type = { + default = academic, choices = { academic, professional, @@ -3342,13 +3343,13 @@ default = {Engineering}, name = degree@domain@en, }, - gongshuo = { - default = false, + degree-type = { + default = academic, choices = { - false, - true, + academic, + professional, }, - name = gongshuo, + name = degree@type, }, % \end{macrocode} % @@ -3655,14 +3656,14 @@ \def\thu@schoolid{14325} \def\flagtrue{true} \def\zhuanye{% - \ifx\flagtrue\thu@gongshuo% + \ifthu@degree@type@professional% 专业类别% \else% 学科名称% \fi% } \def\zhuanye@en{% - \ifx\flagtrue\thu@gongshuo Category% + \ifthu@degree@type@professional Category% \else% Discipline% \fi% @@ -3689,14 +3690,14 @@ \fi% } \def\thu@subject{ -\ifx\flagtrue\thu@gongshuo% +\ifthu@degree@type@professional% \thu@degree@domain \degree@level 专业学位论文% \else% \thu@degree@domain \degree@level 学位论文% \fi% } \def\thu@subject@en{% -\ifx\flagtrue\thu@gongshuo% +\ifthu@degree@type@professional% Thesis for the Professional Degree of \degree@level@en@noun \ of \thu@degree@domain@en% \else% Thesis for the Degree of \degree@level@en@noun \ of \thu@degree@domain@en% From 9ee9ed3e8f0637c64c4bbc86a9288f6a713c11d7 Mon Sep 17 00:00:00 2001 From: liziwl Date: Wed, 1 May 2024 19:19:16 +0800 Subject: [PATCH 2/2] clean code --- sustechthesis.dtx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sustechthesis.dtx b/sustechthesis.dtx index ef3f0d0..e547a77 100644 --- a/sustechthesis.dtx +++ b/sustechthesis.dtx @@ -3343,14 +3343,6 @@ default = {Engineering}, name = degree@domain@en, }, - degree-type = { - default = academic, - choices = { - academic, - professional, - }, - name = degree@type, - }, % \end{macrocode} % % 院系中英文名称。