From ad630e405513ecda59be121d732d2c284f4399cd Mon Sep 17 00:00:00 2001
From: Yu Xiong <181850195@smail.nju.edu.cn>
Date: Tue, 30 Nov 2021 14:47:25 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E6=B5=8B=E8=AF=95?=
 =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E7=BC=96=E5=86=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .github/workflows/build.yml                 |   2 +-
 .gitignore                                  |  17 +-
 docs/njuthesis-sample.tex                   |   6 +-
 {docs => test}/chapters/Abstract.tex        |   0
 {docs => test}/chapters/Achievements.tex    |   0
 {docs => test}/chapters/Acknowledgement.tex |   0
 {docs => test}/chapters/Bibliography.tex    |   0
 {docs => test}/chapters/Environments.tex    |   0
 {docs => test}/chapters/FigTabCode.tex      |   0
 {docs => test}/chapters/Introduction.tex    |   0
 {docs => test}/chapters/Layout.tex          |   0
 {docs => test}/chapters/Mathematics.tex     |   0
 {docs => test}/chapters/Preface.tex         |   0
 {docs => test}/chapters/Reference.tex       |   0
 {docs => test}/chapters/Standard.tex        |   0
 test/test.bib                               |  22 +++
 test/test.tex                               | 170 ++++++--------------
 17 files changed, 77 insertions(+), 140 deletions(-)
 rename {docs => test}/chapters/Abstract.tex (100%)
 rename {docs => test}/chapters/Achievements.tex (100%)
 rename {docs => test}/chapters/Acknowledgement.tex (100%)
 rename {docs => test}/chapters/Bibliography.tex (100%)
 rename {docs => test}/chapters/Environments.tex (100%)
 rename {docs => test}/chapters/FigTabCode.tex (100%)
 rename {docs => test}/chapters/Introduction.tex (100%)
 rename {docs => test}/chapters/Layout.tex (100%)
 rename {docs => test}/chapters/Mathematics.tex (100%)
 rename {docs => test}/chapters/Preface.tex (100%)
 rename {docs => test}/chapters/Reference.tex (100%)
 rename {docs => test}/chapters/Standard.tex (100%)
 create mode 100644 test/test.bib

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ebea118..be8060f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -55,7 +55,7 @@ jobs:
       
       - name: Zip Release Source
         run: |
-          zip -r njuthesis-$VERSION.zip .vscode docs/chapters/ docs/njuthesis-sample.bib docs/njuthesis-sample.tex source/njuthesis.cls njuvisual.sty conf.txsprofile LICENSE Makefile README.md        
+          zip -r njuthesis-$VERSION.zip .vscode docs/njuthesis-sample.bib docs/njuthesis-sample.tex source/njuthesis.cls njuvisual.sty conf.txsprofile LICENSE README.md        
       
       - name: Zip CTAN Source
         run: |
diff --git a/.gitignore b/.gitignore
index b8b9c9f..2b3328e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,14 +12,9 @@
 *.cb2
 .*.lb
 
-## LaTeX class and package
+## DocStrip generated file
 *.cls
-# *.sty
-
-# English README
-README_EN.md
-
-## DocStrip installation file
+*.sty
 *.ins
 
 ## Intermediate documents:
@@ -31,13 +26,7 @@ README_EN.md
 # these rules might exclude image files for figures etc.
 # *.ps
 # *.eps
-# *.pdf
-
-## Generated if empty string is given at "Please type another file name for output:"
-njuthesis.pdf
-njuthesis-sample.pdf
-njulogo.eps
-njuname.eps
+*.pdf
 
 ## Bibliography auxiliary files (bibtex/biblatex/biber):
 *.bbl
diff --git a/docs/njuthesis-sample.tex b/docs/njuthesis-sample.tex
index bfa9db9..0d17b6b 100644
--- a/docs/njuthesis-sample.tex
+++ b/docs/njuthesis-sample.tex
@@ -194,9 +194,9 @@
 % 寤鸿灏嗚鏂囧唴瀹规媶鍒嗕负澶氫釜鏂囦欢
 % 鍗虫柊寤轰竴涓� chapters 鏂囦欢澶�
 % 鎶婃瘡涓€绔犵殑鍐呭鍗曠嫭鏀惧叆涓€涓� tex 鏂囦欢
-% 鐒跺悗鍦ㄨ繖閲岀敤 \include{} 瀵煎叆锛屼緥濡�
-%   \include{chapters/introduction}
-%   \include{chapters/environments}
+% 鐒跺悗鍦ㄨ繖閲岀敤 \input{} 瀵煎叆锛屼緥濡�
+%   \input{chapters/introduction}
+%   \input{chapters/environments}
 
 \chapter{寮曡█}
 
diff --git a/docs/chapters/Abstract.tex b/test/chapters/Abstract.tex
similarity index 100%
rename from docs/chapters/Abstract.tex
rename to test/chapters/Abstract.tex
diff --git a/docs/chapters/Achievements.tex b/test/chapters/Achievements.tex
similarity index 100%
rename from docs/chapters/Achievements.tex
rename to test/chapters/Achievements.tex
diff --git a/docs/chapters/Acknowledgement.tex b/test/chapters/Acknowledgement.tex
similarity index 100%
rename from docs/chapters/Acknowledgement.tex
rename to test/chapters/Acknowledgement.tex
diff --git a/docs/chapters/Bibliography.tex b/test/chapters/Bibliography.tex
similarity index 100%
rename from docs/chapters/Bibliography.tex
rename to test/chapters/Bibliography.tex
diff --git a/docs/chapters/Environments.tex b/test/chapters/Environments.tex
similarity index 100%
rename from docs/chapters/Environments.tex
rename to test/chapters/Environments.tex
diff --git a/docs/chapters/FigTabCode.tex b/test/chapters/FigTabCode.tex
similarity index 100%
rename from docs/chapters/FigTabCode.tex
rename to test/chapters/FigTabCode.tex
diff --git a/docs/chapters/Introduction.tex b/test/chapters/Introduction.tex
similarity index 100%
rename from docs/chapters/Introduction.tex
rename to test/chapters/Introduction.tex
diff --git a/docs/chapters/Layout.tex b/test/chapters/Layout.tex
similarity index 100%
rename from docs/chapters/Layout.tex
rename to test/chapters/Layout.tex
diff --git a/docs/chapters/Mathematics.tex b/test/chapters/Mathematics.tex
similarity index 100%
rename from docs/chapters/Mathematics.tex
rename to test/chapters/Mathematics.tex
diff --git a/docs/chapters/Preface.tex b/test/chapters/Preface.tex
similarity index 100%
rename from docs/chapters/Preface.tex
rename to test/chapters/Preface.tex
diff --git a/docs/chapters/Reference.tex b/test/chapters/Reference.tex
similarity index 100%
rename from docs/chapters/Reference.tex
rename to test/chapters/Reference.tex
diff --git a/docs/chapters/Standard.tex b/test/chapters/Standard.tex
similarity index 100%
rename from docs/chapters/Standard.tex
rename to test/chapters/Standard.tex
diff --git a/test/test.bib b/test/test.bib
new file mode 100644
index 0000000..e9cc489
--- /dev/null
+++ b/test/test.bib
@@ -0,0 +1,22 @@
+@ARTICLE{njuthesis,
+ title = {鍗椾含澶у瀛﹀+瀛︿綅璁烘枃 LaTeX 妯℃澘},
+ AUTHOR = {NJU-LUG},
+ JOURNALTITLE = {Github},
+ YEAR   = {2021}
+}
+@book{goossens93,
+    author = "Frank Mittelbach and Michel Goossens  and Johannes Braams and David Carlisle  and Chris Rowley",
+    title = "The {LaTeX} Companion",
+    year = "1993",
+    publisher = "Addison-Wesley",
+    address = "Reading, Massachusetts"
+}
+@ARTICLE{segl03,
+        AUTHOR  = "Segletes, S. B. AND Walters, W. P.",
+        TITLE = {Extensions to the Exact Solution of the Long-Rod
+                 Penetration/Erosion Equations},
+        JOURNAL = "IJIE",
+        YEAR    = "2003",
+        VOLUME  = "28",
+        PAGES   = "363--376"
+}
diff --git a/test/test.tex b/test/test.tex
index 25ff64c..2004e8f 100644
--- a/test/test.tex
+++ b/test/test.tex
@@ -1,153 +1,79 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% NJU Thesis
-% 鍗椾含澶у姣曚笟璁烘枃LaTeX妯℃澘
-% Version 0.12.0 (2021-11-30)
-%
-% 璇峰叧娉ㄩ」鐩湴鍧€浠ヨ幏鍙栨渶鏂板彉鍖�
-% https://github.com/nju-lug/NJUThesis
-% https://git.nju.edu.cn/nju-lug/nju-latex-templates/njuthesis
-% https://ctan.org/pkg/njuthesis
-%
-% 璐$尞鑰�
-% Yu XIONG @atxy-blip   Yichen ZHAO @FengChendian   
-% Song GAO @myandeg     Chang MA @glatavento   
-% Yilun SUN @HermitSun  Yinfeng LIN @linyinfeng
-% 
-% 璁稿彲璇�
-% LaTeX Project Public License锛堢増鏈� 1.3c 鎴栨洿楂橈級
-%
+% 鏈枃妗g敤浜庢祴璇� njuthesis 鏄惁姝e父宸ヤ綔
+% 鍏跺唴瀹逛笉鍏锋湁浠讳綍鍙傝€冩剰涔�
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%-------------------------------------------------
-% 涓€浜涙彁楂樹娇鐢ㄤ綋楠岀殑灏忔妧宸э細
-%   1. 璇峰姟蹇呬娇鐢� UTF-8 缂栫爜缂栧啓鍜屼繚瀛樻湰鏂囨。
-%   2. 璇峰姟蹇呬娇鐢� XeLaTeX 鎴� LuaLaTeX 寮曟搸杩涜缂栬瘧
-%   3. 涓嶄繚璇佹帴鍙gǔ瀹氾紝鍐欎綔鍓嶄竴瀹氳璇讳竴璇昏鏄庢枃妗�
-%   4. 浠ョ櫨鍒嗗彿(%)寮€澶寸殑鍐呭涓烘敞閲婏紝鍙互闅忔剰鍒犻櫎
-%-------------------------------------------------
-
-\documentclass[
-    % 妯℃澘閫夐」锛�
-    % degree = ug|mg|mf|phd,  % 瀛︿綅绫诲瀷锛岄粯璁や负鏈
-    % type = thesis|design,   % 鏂囨。绫诲瀷锛岄粯璁や负姣曚笟璁烘枃
-    % nlcover = true|false,   % 鏄惁闇€瑕佸浗瀹跺浘涔﹂灏侀潰锛岄粯璁ゅ叧闂�
-    % 浠ヤ笅涓ら」涓哄瓧浣撹缃紝涓嶆敼鍔ㄥ垯鑷姩璋冪敤绯荤粺棰勮瀛椾綋
-    % customlatinfont=windows|macos|linux|gyre|none,
-    % customchinesefont=windows|macos|linux|fandol|founder|noto|none,
-    ]{njuthesis}
+\documentclass[degree=phd,nlcover]{njuthesis}
 
 \njusetup {
-    % 璁剧疆鍙傛暟
-    % 涓€浜涙彁閱掞細
-    %   1. 鍗冧竾涓嶈鏈夌┖琛�
-    %   2. 浣跨敤鑻辨枃鍗婅绌烘牸鍒嗛殧閫夐」
-    %   3. 涓洪槻姝㈡涔夛紝鏈夌┖鏍肩殑鍐呭璇风敤鑺辨嫭鍙�({})鍖呰9
-    %   4. 鏈鐢熸棤闇€濉啓鐨勯」鐩凡琚壒鍒爣娉�
-    %
-    % info 绫荤敤浜庡綍鍏ヤ釜浜轰俊鎭�
     info = {
-        titlea = 涓€绉嶄娇鐢ㄥ崡浜ぇ瀛hologo{LaTeX}妯$増,
-        titleb = 缂栧啓姣曚笟璁烘枃鐨勭粡楠屾€ф柟娉�,
-        titlec = 锛堝唴瀹瑰凡缁忚繃鏃讹紝璇﹁璇存槑鎵嬪唽锛�,
-        % 涓枃棰樼洰
-        % 杩欓噷閲囧彇鎵嬪姩鎹㈣鏂瑰紡锛屼笁涓€夐」渚濇瀵瑰簲涓夎
-        % 濡傛灉鍙湁绗竴琛岋紝鍏朵綑涓や釜閫夐」灏辩暀绌猴紝浠ユ绫绘帹
+        titlea = {涓€绉嶄娇鐢ㄥ崡浜ぇ瀛hologo{LaTeX}妯$増},
+        titleb = {缂栧啓姣曚笟璁烘枃鐨勭粡楠屾€ф柟娉晑,
+        titlec = {锛堜粎渚涙祴璇曚娇鐢級},
         title* = {An Empirical Way of Composing Thesis with NJU \hologo{LaTeX} Template}, 
-        % 鑻辨枃棰樼洰
-        % 鍏抽敭璇�
         keywords = {鎴�,灏辨槸,鍏呮暟鐨�,鍏抽敭璇峿,
         keywords* = {Dummy,Keywords,Here,{it is}},
-        % 濮撳悕瀛﹀彿
-        grade = 2018,
-        student-id = 189114514, % dz18114514,
-        author = 鍛ㄧ厹鍗�,
-        author* = Zhou~Yuhua,
-        % 闄㈢郴涓撲笟
-        department = 鎷夊お璧瀛︿笌鎶€鏈闄�,
-        department* = School~of~\hologo{LaTeX},
-        major = 鎷夊お璧瑷€瀛�,
-        major* = \hologo{LaTeX}~Linguistics,
-        field = 鎷夊お璧瑷€鍦ㄧ幇褰撲唬鐨勪娇鐢�, % 鐮旂┒鐢熼」
-        field* = Contemporary~Usage~of~the~\hologo{LaTeX}~Language, % 鐮旂┒鐢熼」
-        % 瀵煎笀
-        supervisora = 鏉庢垚娈�,
-        supervisora*= Li~Chengdian,
-        supervisora-title = 鏁欐巿,
-        supervisora-title* = Professor,
-        % 绗簩瀵煎笀锛屽鏃犲垯鐣欑┖
-        supervisorb = 瀛欒但寮�,
-        supervisorb* = Sun~Hemi,
-        supervisorb-title = 鍓暀鎺�,
-        supervisorb-title* = Associate~professor,
-        % 鎻愪氦鏃ユ湡
-        submit-date = 2021骞�8鏈�10鏃�,
-        submit-date* = {Aug 10, 2021}, % 鐮旂┒鐢熼」
-        % 绛旇京锛屽潎涓虹爺绌剁敓椤�
-        defend-date = 2021骞�9鏈�19鏃�,
-        chairman = 寮犳檽灞眫鏁欐巿,
+        grade = {2018},
+        student-id = {dz18114514},
+        author = {鍛ㄧ厹鍗巬,
+        author* = {Zhou~Yuhua},
+        department = {鎷夊お璧瀛︿笌鎶€鏈闄,
+        department* = {School~of~\hologo{LaTeX}},
+        major = {鎷夊お璧瑷€瀛,
+        major* = {\hologo{LaTeX}~Linguistics},
+        field = {鎷夊お璧瑷€鍦ㄧ幇褰撲唬鐨勪娇鐢▆,
+        field* = {Contemporary~Usage~of~the~\hologo{LaTeX}~Language},
+        supervisora = {鏉庢垚娈縸,
+        supervisora*= {Li~Chengdian},
+        supervisora-title = {鏁欐巿},
+        supervisora-title* = {Professor},
+        supervisorb = {瀛欒但寮,
+        supervisorb* = {Sun~Hemi},
+        supervisorb-title = {鍓暀鎺坿,
+        supervisorb-title* = {Associate~professor},
+        submit-date = {2021骞�8鏈�10鏃,
+        submit-date* = {Aug 10, 2021},
+        defend-date = {2021骞�9鏈�19鏃,
+        chairman = {寮犳檽灞眫鏁欐巿},
         reviewer = {鐜嬬憺甯寏鏁欐巿,閮痉绾瞺鍓暀鎺�,鍗庤妶搴搤鏁欐巿,鎴磋彶鑿瞺鏁欐巿},
-        % 鍥藉鍥句功棣嗗皝闈㈢浉鍏筹紝鍧囦负鐮旂┒鐢熼」
-        clc = 0175.2,
-        secret-level = 闄愬埗,
-        udc = 004.72,
+        clc = {0175.2},
+        secret-level = {闄愬埗},
+        udc = {004.72},
         supervisor-contact = {鎷夊お璧瀛︿笌鎶€鏈闄鏋濇睙甯傜粨涓樿矾~19~鍙穨114514},
     }
 }
 
-% 璁剧疆鍥剧墖瀛樺偍浣嶇疆
-\graphicspath{{figure/}}
-
-% 瀵煎叆鍙傝€冩枃鐚暟鎹�
-\addbibresource{njuthesis-sample.bib}
+\addbibresource{test.bib}
 
 \begin{document}
 
-%-------------------------------------------------
-%	灏侀潰銆佹憳瑕併€佸墠瑷€鍜岀洰褰�
-%-------------------------------------------------
-
 \maketitle 
 
-\input{chapters/Abstract.tex}
-\input{chapters/Preface.tex}
+\input{chapters/Abstract}
+\input{chapters/Preface}
 
-\tableofcontents % 鐢熸垚鐩綍
-\listoffigures % 鐢熸垚鍥剧墖娓呭崟
-\listoftables % 鐢熸垚琛ㄦ牸娓呭崟
+\tableofcontents
+\listoffigures
+\listoftables
 
-%-------------------------------------------------
-%	姝f枃閮ㄥ垎
-%-------------------------------------------------
 \mainmatter
 
-\input{chapters/Introduction.tex}
-\input{chapters/Environments.tex}
-\input{chapters/Layout.tex}
-\input{chapters/FigTabCode.tex}
-\input{chapters/Mathematics.tex}
-\input{chapters/Reference.tex}
-\input{chapters/Bibliography.tex}
-
-%-------------------------------------------------
-%	鍙傝€冩枃鐚�
-%-------------------------------------------------
+\input{chapters/Introduction}
+\input{chapters/Environments}
+\input{chapters/Layout}
+\input{chapters/FigTabCode}
+\input{chapters/Mathematics}
+\input{chapters/Reference}
+\input{chapters/Bibliography}
 
 \printbibliography[
-    heading=bibintoc,% 鎻掑叆鐩綍鏉$洰
+    heading=bibintoc,
     title=鍙傝€冩枃鐚甝
 
-%-------------------------------------------------
-%	鑷磋阿
-%-------------------------------------------------
-
-\input{chapters/Acknowledgement.tex}
+\input{chapters/Acknowledgement}
 
-%-------------------------------------------------
-%	闄勫綍閮ㄥ垎
-%-------------------------------------------------
 \appendix
 
-\input{chapters/Achievements.tex}
-\input{chapters/Standard.tex}
+\input{chapters/Achievements}
+\input{chapters/Standard}
 
 \end{document}
-- 
GitLab