diff --git a/coverinfo.sty b/coverinfo.sty index e02da3fd0e30a869f46b6b16dba89719faee3107..7c769d2baf6a51db767b780eb76a2aeaa7592f9e 100644 --- a/coverinfo.sty +++ b/coverinfo.sty @@ -3,7 +3,6 @@ \tl_const:Nn \TitleA {鏇茬巼寮曟搸鐨勭爺绌秨% 绗竴琛屾爣棰� \tl_const:Nn \TitleB {}% 绗簩琛屾爣棰� \tl_const:Nn \TitleC {}% 绗笁琛屾爣棰� -\tl_const:Nn \Title {\TitleA\TitleB\TitleC} \tl_const:Nn \Title_EN {Curvature~engine~research} \tl_const:Nn \Grade {2017} \tl_const:Nn \StudentID {17184xxx} @@ -18,5 +17,3 @@ \tl_const:Nn \MentorTitle {鏁欐巿} \tl_const:Nn \MentorTitle_EN {Professor} \tl_const:Nn \SubmitDate {2077骞�12鏈�31鏃 -\tl_const:Nn \Degree {UG}% 瀛︿綅 鏈锛歎G -\tl_const:Nn \Type {thesis}% thesis锛氭瘯涓氳鏂囷紝design:姣曚笟璁捐 \ No newline at end of file diff --git a/njuthesis.cls b/njuthesis.cls index 1db9bd879028ba0eb90727e5f08b4b002ca195e2..f192162f34e7bae0e5d44016ef41b4a145ee2404 100644 --- a/njuthesis.cls +++ b/njuthesis.cls @@ -21,6 +21,8 @@ ]{ctexbook}[2018/04/01] \DeclareStringOption[1]{TitleLength} +\DeclareStringOption[UG]{Degree} +\DeclareStringOption[thesis]{Type} \ProcessKeyvalOptions*\relax diff --git a/njuthesis.tex b/njuthesis.tex index 56c36ee6a86e51e0c569ba454743c422c07ebe7d..27b88c3db64ee2923245debcba266b9cc6ae6a75 100644 --- a/njuthesis.tex +++ b/njuthesis.tex @@ -1,5 +1,7 @@ \documentclass[ TitleLength=1,% 閫夋嫨鏍囬琛屾暟锛岃寖鍥存槸1~3 + Degree=UG,% 瀛︿綅 鏈锛歎G + Type=thesis% thesis锛氭瘯涓氳鏂囷紝design:姣曚笟璁捐 ]{njuthesis} \addbibresource{njuthesis.bib} diff --git a/profile/abstract.sty b/profile/abstract.sty index 1f6fe0272f33970df99b2de0884066c50539828a..6326cbee9c1fdc6db7697d5a2ec2e184e7494abb 100644 --- a/profile/abstract.sty +++ b/profile/abstract.sty @@ -1,4 +1,7 @@ -\ProvidesExplPackage{profile/abstract}{2021-09-04}{0.1}{NJU Thesis Undergraduate abstract design} +\ProvidesExplPackage{profile/abstract}{2021-09-04}{0.1}{NJU Thesis Undergraduate abstract design} + +% 鎷煎悎鏍囬 +\tl_const:Nn \Title {\TitleA\TitleB\TitleC} % 鎽樿鐜 \NewDocumentEnvironment{abstract} {} diff --git a/profile/cover.sty b/profile/cover.sty index c7e17f93c0d5ef0b2d286a4d9bbc7f735101698e..f51f01537ca37e61c9935407f84b4546a03dd82c 100644 --- a/profile/cover.sty +++ b/profile/cover.sty @@ -19,20 +19,21 @@ \coverbox:n {涓揬hfill 涓殅 & \cover_underline:nn {250pt}{\songti\Major}\\ - \coverbox:n {棰榎hfill 鐩畗 - & \cover_underline:nn {250pt}{\textbf{\songti\TitleA}} \\ - - \int_compare:nNnTF { \TitleLength } = { 2 } { - \coverbox:n {\hfill} - & \cover_underline:nn {250pt}{\textbf{\songti\TitleB}} \\ - }{} - - \int_compare:nNnTF { \TitleLength } = { 3 } { - \coverbox:n {\hfill} - & \cover_underline:nn {250pt}{\textbf{\songti\TitleB}} \\ - \coverbox:n {\hfill} - & \cover_underline:nn {250pt}{\textbf{\songti\TitleC}} \\ - }{} + \int_case:nn {\TitleLength} + { + { 1 } { + \coverbox:n {棰榎hfill 鐩畗 + & \cover_underline:nn {250pt}{\textbf{\songti\TitleA}} \\ } + { 2 } { + \coverbox:n {棰榎hfill 鐩畗 + & \cover_underline:nn {250pt}{\textbf{\songti\TitleA}} \\ + & \cover_underline:nn {250pt}{\textbf{\songti\TitleB}} \\ } + { 3 } { + \coverbox:n {棰榎hfill 鐩畗 + & \cover_underline:nn {250pt}{\textbf{\songti\TitleA}} \\ + & \cover_underline:nn {250pt}{\textbf{\songti\TitleB}} \\ + & \cover_underline:nn {250pt}{\textbf{\songti\TitleC}} \\} + } \end{tabular}\\ \begin{tabular}{p{4.2em}cp{4.2em}c} @@ -68,6 +69,10 @@ } % 鍒ゆ柇绫诲瀷 +\int_compare:nNnTF { \TitleLength } = { 2 } { + \coverbox:n {\hfill} + & \cover_underline:nn {250pt}{\textbf{\songti\TitleB}} \\ + }{} \ifthenelse{\equal{\Degree}{UG}} { \NewDocumentCommand \Degreename {} {\hfill 鏈琝hfill 绉慭hfill }