From 7c0d710a8c50275df346025405d1ca1a668f9232 Mon Sep 17 00:00:00 2001 From: Zeping Lee Date: Tue, 1 Mar 2022 00:54:04 +0800 Subject: [PATCH] Hide professional degree type if it's empty (#325) --- CHANGELOG.md | 4 ++++ test/testfiles/titlepage-master.tlg | 4 ++-- ustcthesis.cls | 22 ++++++++++++---------- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba3bd51..3875079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 新增选项 `math-font = cm` (Computer Modern)([#324](https://github.com/ustctug/ustcthesis/issues/324))。 - 新增 LuaLaTeX 支持(虽然很慢)。 +# Changed + +- 专业学位类型 `professional-type` 为空时不再显示括号([#325](https://github.com/ustctug/ustcthesis/issues/325))。 + ## [v3.3.1] - 2021-12-10 ### Changed diff --git a/test/testfiles/titlepage-master.tlg b/test/testfiles/titlepage-master.tlg index 9ffdeeb..519c7fa 100644 --- a/test/testfiles/titlepage-master.tlg +++ b/test/testfiles/titlepage-master.tlg @@ -596,8 +596,8 @@ Completed box being shipped out [3] ....\kern 0.00021 ....\glue 4.015 plus 2.00749 minus 1.33833 ....\TU/texgyretermes(0)/m/n/16.06 type) -....\kern -0.0002 -....\kern 0.0002 +....\kern -0.00021 +....\kern 0.00021 ....\penalty 10000 ....\glue(\parfillskip) 0.0 ....\glue(\rightskip) 0.0 plus 1.0fil diff --git a/ustcthesis.cls b/ustcthesis.cls index 92f1472..3fdf088 100644 --- a/ustcthesis.cls +++ b/ustcthesis.cls @@ -1859,14 +1859,15 @@ \vskip 2.0cm% \else \vskip 0.8cm% - {\lishu\fontsize{26bp}{26bp}\selectfont - (% + \begingroup + \fontsize{26bp}{26bp}\selectfont \ifx\ustc@professional@type\@empty - 专业学位类型% + \null \else - \ustc@professional@type + \lishu (\ustc@professional@type )% \fi - )\par}% + \par + \endgroup \vskip 1.0cm% \fi \ifustc@badge@color@blue @@ -1911,14 +1912,15 @@ {\sffamily\fontsize{26bp}{30bp}\selectfont \ustc@thesis@name@en\par}% \ifustc@degree@type@academic\else - {\fontsize{16bp}{32bp}\selectfont - (% + \begingroup + \fontsize{16bp}{32bp}\selectfont \ifx\ustc@professional@type@en\@empty - Professional degree type% + \null \else - \ustc@professional@type@en + (\ustc@professional@type@en) \fi - )\par}% + \par + \endgroup \fi \vskip 2.5cm% \ifustc@badge@color@blue