From e70233bb8acfbee357bc4073c1704c62ddf1de9a Mon Sep 17 00:00:00 2001 From: atxy <181850195@smail.nju.edu.cn> Date: Fri, 10 Sep 2021 15:06:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E5=AF=BC=E5=B8=88=E7=9A=84=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coverinfo.tex | 30 ++++++++++++++++++++++++------ njuthesis.cls | 1 + njuthesis.tex | 9 +++++---- profile/abstract.sty | 14 ++++++++++++-- profile/cover.sty | 42 ++++++++++++++++++++++++++---------------- profile/font.sty | 5 +++-- 6 files changed, 71 insertions(+), 30 deletions(-) diff --git a/coverinfo.tex b/coverinfo.tex index 7063324..f6ac560 100644 --- a/coverinfo.tex +++ b/coverinfo.tex @@ -1,18 +1,36 @@ -% 璁剧疆鐢ㄤ簬灏侀潰鐨勪釜浜轰俊鎭� +%---------------------------------------- +% 涓汉淇℃伅 +%---------------------------------------- + +% 鏍囬 \setTitleA{涓€绉嶄娇鐢ㄥ崡浜ぇ瀛hologo{LaTeX}妯$増}%绗竴琛屾爣棰� \setTitleB{缂栧啓鏈鐢熸瘯涓氳鏂囩殑缁忛獙鎬ф柟娉晑%绗簩琛屾爣棰� -\setTitleC{}%绗笁琛屾爣棰� +\setTitleC{娌℃湁绗笁琛屽氨涓嶇敤濉繖涓摝}%绗笁琛屾爣棰� \setTitleEN{An~Empirical~Way~of~Composing~Undergraduate~Thesis~with~NJU~\hologo{LaTeX}~Template}%娉ㄦ剰鑻辨枃鍚嶄腑绌烘牸蹇呴』鏇挎崲涓烘尝娴嚎 + +% 濮撳悕瀛﹀彿 \setGrade{2018} \setStudentID{181114514} \setStudentName{鍛ㄧ厹鍗巬 \setStudentNameEN{Zhou~Yuhua} + +% 闄㈢郴涓撲笟 \setDepartment{鎷夊お璧瀛︿笌鎶€鏈闄 \setDepartmentEN{School~of~\hologo{LaTeX}} \setMajor{鎷夊お璧瑷€瀛 \setMajorEN{\hologo{LaTeX}~Linguistics} -\setMentor{鏉庢垚娈縸 -\setMentorEN{Li~Chengdian} -\setMentorTitle{鏁欐巿} -\setMentorTitleEN{Professor} + +% 瀵煎笀 +\setMentorA{鏉庢垚娈縸 +\setMentorAEN{Li~Chengdian} +\setMentorATitle{鏁欐巿} +\setMentorATitleEN{Professor} + +% 绗簩瀵煎笀 +\setMentorB{瀛欒但寮 +\setMentorBEN{Sun~Hemi} +\setMentorBTitle{鍓暀鎺坿 +\setMentorBTitleEN{Associate professor} + +% 鎻愪氦鏃堕棿 \setSubmitDate{2021骞�8鏈�10鏃 diff --git a/njuthesis.cls b/njuthesis.cls index 8a847e4..920fe85 100644 --- a/njuthesis.cls +++ b/njuthesis.cls @@ -21,6 +21,7 @@ ]{ctexbook}[2018/04/01] \DeclareStringOption[1]{titlelength} +\DeclareBoolOption[false]{secondsupervisor} \DeclareStringOption[UG]{degree} \DeclareStringOption[thesis]{type} \DeclareBoolOption[true]{systemfont} diff --git a/njuthesis.tex b/njuthesis.tex index 83718ee..e2d2df1 100644 --- a/njuthesis.tex +++ b/njuthesis.tex @@ -17,11 +17,12 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[ titlelength=2,% 閫夋嫨鏍囬琛屾暟锛岃寖鍥存槸1~3 - % degree=UG,% UG: 鏈 + % secondsupervisor=true,% 鏈夌浜屽甯堣鍙嶆敞閲婃椤� + % degree=UG,% UG: 鏈 鏈」涓嶉渶鏇存敼 type=thesis,% thesis: 姣曚笟璁烘枃锛宒esign: 姣曚笟璁捐 - systemfont=false,% 鑷畾涔夊瓧浣撹鍙嶆敞閲婃椤� - customlatinfont=windows,% 璁剧疆鑻辨枃瀛楃闆� - customchinesefont=windows,% 璁剧疆涓枃瀛楃闆� + % systemfont=false,% 鑷畾涔夊瓧浣撹鍙嶆敞閲婃椤� + % customlatinfont=windows,% 璁剧疆鑻辨枃瀛楃闆� + % customchinesefont=windows,% 璁剧疆涓枃瀛楃闆� ]{njuthesis} % 杈撳叆涓汉淇℃伅 diff --git a/profile/abstract.sty b/profile/abstract.sty index 824dd46..d86b8ea 100644 --- a/profile/abstract.sty +++ b/profile/abstract.sty @@ -19,7 +19,12 @@ 闄㈢郴锛� \Department \\ 涓撲笟锛� \Major \\ 鏈鐢熷鍚嶏細 \StudentName \\ - 鎸囧鏁欏笀锛堝鍚嶃€佽亴绉帮級锛� \Mentor\ \MentorTitle \\ + 鎸囧鏁欏笀锛堝鍚嶃€佽亴绉帮級锛� \MentorA\ \MentorATitle + % 绗簩瀵煎笀 + \ifnju@secondsupervisor + \ \MentorB\ \MentorBTitle + \fi + \\ 鎽樿锛� \egroup } @@ -49,7 +54,12 @@ DEPARTMENT: ~~\Department_EN \\ SPECIALIZATION: ~~\Major_EN \\ UNDERGRADUATE:~~\StudentName_EN \\ - MENTOR:~~\Mentor_EN \ \MentorTitle_EN\\ + MENTOR:~~\MentorA_EN \ \MentorATitle_EN + % 绗簩瀵煎笀 + \ifnju@secondsupervisor + \ \MentorB_EN\ \MentorBTitle_EN + \fi + \\ ABSTRACT: \egroup } diff --git a/profile/cover.sty b/profile/cover.sty index 424c178..3431c91 100644 --- a/profile/cover.sty +++ b/profile/cover.sty @@ -4,19 +4,28 @@ \NewDocumentCommand\setTitleA{m}{\tl_const:Nn \TitleA {#1}}% 绗竴琛屾爣棰� \NewDocumentCommand\setTitleB{m}{\tl_const:Nn \TitleB {#1}}% 绗簩琛屾爣棰� \NewDocumentCommand\setTitleC{m}{\tl_const:Nn \TitleC {#1}}% 绗笁琛屾爣棰� -\NewDocumentCommand\setTitleEN{m}{\tl_const:Nn \Title_EN {#1}} % 娉ㄦ剰鑻辨枃鍚嶄腑绌烘牸蹇呴』鏇挎崲涓烘尝娴嚎 +\NewDocumentCommand\setTitleEN{m}{\tl_const:Nn \Title_EN {#1}} + \NewDocumentCommand\setGrade{m}{\tl_const:Nn \Grade {#1}} \NewDocumentCommand\setStudentID{m}{\tl_const:Nn \StudentID {#1}} \NewDocumentCommand\setStudentName{m}{\tl_const:Nn \StudentName {#1}} \NewDocumentCommand\setStudentNameEN{m}{\tl_const:Nn \StudentName_EN {#1}} + \NewDocumentCommand\setDepartment{m}{\tl_const:Nn \Department {#1}} \NewDocumentCommand\setDepartmentEN{m}{\tl_const:Nn \Department_EN {#1}} \NewDocumentCommand\setMajor{m}{\tl_const:Nn \Major {#1}} \NewDocumentCommand\setMajorEN{m}{\tl_const:Nn \Major_EN {#1}} -\NewDocumentCommand\setMentor{m}{\tl_const:Nn \Mentor {#1}} -\NewDocumentCommand\setMentorEN{m}{\tl_const:Nn \Mentor_EN {#1}} -\NewDocumentCommand\setMentorTitle{m}{\tl_const:Nn \MentorTitle {#1}} -\NewDocumentCommand\setMentorTitleEN{m}{\tl_const:Nn \MentorTitle_EN {#1}} + +\NewDocumentCommand\setMentorA{m}{\tl_const:Nn \MentorA {#1}} +\NewDocumentCommand\setMentorAEN{m}{\tl_const:Nn \MentorA_EN {#1}} +\NewDocumentCommand\setMentorATitle{m}{\tl_const:Nn \MentorATitle {#1}} +\NewDocumentCommand\setMentorATitleEN{m}{\tl_const:Nn \MentorATitle_EN {#1}} + +\NewDocumentCommand\setMentorB{m}{\tl_const:Nn \MentorB {#1}} +\NewDocumentCommand\setMentorBEN{m}{\tl_const:Nn \MentorB_EN {#1}} +\NewDocumentCommand\setMentorBTitle{m}{\tl_const:Nn \MentorBTitle {#1}} +\NewDocumentCommand\setMentorBTitleEN{m}{\tl_const:Nn \MentorBTitle_EN {#1}} + \NewDocumentCommand\setSubmitDate{m}{\tl_const:Nn \SubmitDate {#1}} % 鎷煎悎鏍囬 @@ -41,6 +50,7 @@ \coverbox:n {涓揬hfill 涓殅 & \cover_underline:nn {250pt}{\songti\Major}\\ + % 鏍囬鎹㈣ \int_case:nn {\nju@titlelength} { { 1 } { @@ -71,19 +81,19 @@ \end{tabular}\\ \begin{tabular}{p{4.2em}cp{4.2em}c} \coverbox:n {瀵糪hfill 甯坿 - & \cover_underline:nn {90pt}{\Mentor} + & \cover_underline:nn {90pt}{\MentorA} + & \coverbox:n {鑱孿hfill 绉皚 + & \cover_underline:nn {90pt}{\MentorATitle}\\ + + % 绗簩瀵煎笀 + \ifnju@secondsupervisor + \coverbox:n {绗琝hfill 浜孿hfill 瀵糪hfill 甯坿 + & \cover_underline:nn {90pt}{\MentorB} & \coverbox:n {鑱孿hfill 绉皚 - & \cover_underline:nn {90pt}{\MentorTitle}\\ + & \cover_underline:nn {90pt}{\MentorBTitle}\\ + \fi \end{tabular}\\ -% % 绗簩瀵煎笀 -% \ifnjut@title@twosupervisors -% \begin{tabular}{p{4.2em}cp{4.2em}c} -% \coverbox:n {\njut@cap@cover@secondsupervisor} -% & \njutunderline[90pt]{\songti\njut@value@secondsupervisor} -% & \coverbox:n {\njut@cap@cover@secondsupervisortitle} -% & \njutunderline[90pt]{\songti\njut@value@secondsupervisortitle}\\ -% \end{tabular} -% \fi + \begin{tabular}{p{4.2em}c} \coverbox:n {鎻怽hfill 浜hfill 鏃hfill 鏈焳 & \cover_underline:nn {250pt}{\SubmitDate}\\ diff --git a/profile/font.sty b/profile/font.sty index 8db43c0..13dcd30 100644 --- a/profile/font.sty +++ b/profile/font.sty @@ -160,8 +160,9 @@ \setCJKfamilyfont{zhkai}{鏂规妤蜂綋绠€浣搣[AutoFakeBold=2.17] } -% 鏍规嵁鎿嶄綔绯荤粺閫夋嫨鐩稿簲瀛椾綋 +% 瀛椾綋鍒ゆ柇 \ifnju@systemfont +% 鏍规嵁鎿嶄綔绯荤粺鑷姩閫夋嫨鐩稿簲瀛椾綋 % 妫€娴嬫槸鍚︽槸 Windows \sys_if_platform_windows:TF { @@ -181,7 +182,7 @@ \set_chinese_fontset_fandol } } -\else% 濡傛灉鐢ㄦ埛闇€瑕佽嚜瀹氫箟 +\else% 濡傛灉鐢ㄦ埛闇€瑕佽嚜瀹氫箟瀛椾綋 % 姝ゅ闇€瑕佷娇鐢╘str_case_e鑰屼笉鏄痋str_case浣垮畯灞曞紑涓哄瓧绗︿覆 \str_case_e:nn { \nju@customlatinfont } { -- GitLab