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