From a20d5a551e50d2df8dd6f21145e79325f33faf1b Mon Sep 17 00:00:00 2001
From: atxy <181850195@smail.nju.edu.cn>
Date: Thu, 9 Sep 2021 23:53:59 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8=E5=91=BD=E4=BB=A4?=
 =?UTF-8?q?=E8=80=8C=E4=B8=8D=E6=98=AFsty=E6=96=87=E4=BB=B6=E7=BD=AE?=
 =?UTF-8?q?=E5=85=A5=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=EF=BC=8C=E6=9C=89?=
 =?UTF-8?q?=E5=88=A9=E4=BA=8Ectan=E5=8F=91=E5=B8=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 README.md            |  2 +-
 coverinfo.sty        | 19 -------------------
 coverinfo.tex        | 18 ++++++++++++++++++
 njuthesis.cls        |  1 -
 njuthesis.tex        |  3 +++
 profile/abstract.sty |  3 ---
 profile/cover.sty    | 22 ++++++++++++++++++++++
 7 files changed, 44 insertions(+), 24 deletions(-)
 delete mode 100644 coverinfo.sty
 create mode 100644 coverinfo.tex

diff --git a/README.md b/README.md
index 8eee271..08fdffb 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@
     鈹�   page.sty
     鈹�   reference.sty
     鈹�
-    鈹� coverinfo.sty
+    鈹� coverinfo.tex
     鈹� njuthesis.bib
     鈹� njuthesis.cls
     鈹� njuthesis.tex
diff --git a/coverinfo.sty b/coverinfo.sty
deleted file mode 100644
index d4c510d..0000000
--- a/coverinfo.sty
+++ /dev/null
@@ -1,19 +0,0 @@
-\ProvidesExplPackage{coverinfo}{2021-09-04}{0.1}{NJU Thesis Undergraduate cover information}
-
-\tl_const:Nn \TitleA {涓€绉嶄娇鐢ㄥ崡浜ぇ瀛hologo{LaTeX}妯$増}% 绗竴琛屾爣棰�
-\tl_const:Nn \TitleB {缂栧啓鏈鐢熸瘯涓氳鏂囩殑缁忛獙鎬ф柟娉晑% 绗簩琛屾爣棰�
-\tl_const:Nn \TitleC {}% 绗笁琛屾爣棰�
-\tl_const:Nn \Title_EN {An~Empirical~Way~of~Composing~Undergraduate~Thesis~with~NJU~\hologo{LaTeX}~Template} % 娉ㄦ剰鑻辨枃鍚嶄腑绌烘牸蹇呴』鏇挎崲涓烘尝娴嚎
-\tl_const:Nn \Grade {2018}
-\tl_const:Nn \StudentID {181114514}
-\tl_const:Nn \StudentName {鍛ㄧ厹鍗巬
-\tl_const:Nn \StudentName_EN {Zhou~Yuhua}
-\tl_const:Nn \Department {鎷夊お璧瀛︿笌鎶€鏈闄
-\tl_const:Nn \Department_EN {School~of~\hologo{LaTeX}}
-\tl_const:Nn \Major {鎷夊お璧瑷€瀛
-\tl_const:Nn \Major_EN {\hologo{LaTeX}~Linguistics}
-\tl_const:Nn \Mentor {鏉庢垚娈縸
-\tl_const:Nn \Mentor_EN {Li~Chengdian}
-\tl_const:Nn \MentorTitle {鏁欐巿}
-\tl_const:Nn \MentorTitle_EN {Professor}
-\tl_const:Nn \SubmitDate {2021骞�8鏈�10鏃
diff --git a/coverinfo.tex b/coverinfo.tex
new file mode 100644
index 0000000..7063324
--- /dev/null
+++ b/coverinfo.tex
@@ -0,0 +1,18 @@
+% 璁剧疆鐢ㄤ簬灏侀潰鐨勪釜浜轰俊鎭�
+\setTitleA{涓€绉嶄娇鐢ㄥ崡浜ぇ瀛hologo{LaTeX}妯$増}%绗竴琛屾爣棰�
+\setTitleB{缂栧啓鏈鐢熸瘯涓氳鏂囩殑缁忛獙鎬ф柟娉晑%绗簩琛屾爣棰�
+\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}
+\setSubmitDate{2021骞�8鏈�10鏃
diff --git a/njuthesis.cls b/njuthesis.cls
index 1ce5503..7970e31 100644
--- a/njuthesis.cls
+++ b/njuthesis.cls
@@ -27,7 +27,6 @@
 
 % 杈撳叆閰嶇疆鏂囦欢
 \RequirePackage{profile/packages}
-\RequirePackage{coverinfo} 
 \RequirePackage{profile/font}
 \RequirePackage{profile/page}
 \RequirePackage{profile/reference}
diff --git a/njuthesis.tex b/njuthesis.tex
index cfee96e..bf82c40 100644
--- a/njuthesis.tex
+++ b/njuthesis.tex
@@ -21,6 +21,9 @@
     Type=thesis% thesis: 姣曚笟璁烘枃锛宒esign: 姣曚笟璁捐
 ]{njuthesis}
 
+% 杈撳叆涓汉淇℃伅
+\input{coverinfo.tex}
+
 % 瀵煎叆鍙傝€冩枃鐚簮
 \addbibresource{njuthesis.bib}
 
diff --git a/profile/abstract.sty b/profile/abstract.sty
index a8bff42..824dd46 100644
--- a/profile/abstract.sty
+++ b/profile/abstract.sty
@@ -1,8 +1,5 @@
 \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 e1da830..7e1d402 100644
--- a/profile/cover.sty
+++ b/profile/cover.sty
@@ -1,5 +1,27 @@
 \ProvidesExplPackage{profile/cover}{2021-09-04}{0.1}{NJU Thesis Undergraduate cover design} 
 
+% 灏侀潰淇℃伅
+\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\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\setSubmitDate{m}{\tl_const:Nn \SubmitDate {#1}}
+
+% 鎷煎悎鏍囬
+\tl_const:Nn \Title {\TitleA\TitleB\TitleC}
+
 % 灏侀潰涓嬪垝绾�
 \cs_new:Npn \cover_underline:nn #1 #2 {
   \uline{\makebox[#1]{#2}}
-- 
GitLab