From b555e44da97162b675a5b6ef9cd41b3668e8c68e Mon Sep 17 00:00:00 2001 From: atxy <181850195@smail.nju.edu.cn> Date: Fri, 17 Sep 2021 20:23:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E4=BA=86?= =?UTF-8?q?=E5=B0=81=E9=9D=A2=E7=9B=B8=E5=85=B3=E7=9A=84=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- njuthesis.dtx | 171 ++++++++++++++++++++++++-------------------------- 1 file changed, 81 insertions(+), 90 deletions(-) diff --git a/njuthesis.dtx b/njuthesis.dtx index 7ded250..058147b 100644 --- a/njuthesis.dtx +++ b/njuthesis.dtx @@ -667,9 +667,11 @@ through XeTeX. degree .choices:nn = { ug, mg, mg, phd } { \tl_set_eq:NN \l_@@_info_degree_tl \l_keys_choice_tl }, + degree .initial:n = ug, type .choices:nn = { thesis, design } { \tl_set_eq:NN \l_@@_info_type_tl \l_keys_choice_tl }, + type .initial:n = thesis, } % \end{macrocode} % @@ -1731,7 +1733,7 @@ through XeTeX. \str_if_eq:NNTF { \l_@@_info_degree_tl } { phd } { \tl_set:Nn \c_@@_name_degree_tl { 鍗氬+ } - \tl_set:Nn \c_@@_name_degree_en_tl { Doctor of Philosophy } + \tl_set:Nn \c_@@_name_degree_en_tl { Doctor~of~Philosophy } } { \tl_set:Nn \c_@@_name_degree_en_tl { Master } @@ -1879,96 +1881,86 @@ through XeTeX. % % % -% \begin{macrocode} -% 缁樺埗灏侀潰鍛戒护 -\tl_new:N \nju_printcover_nl % 鍥藉鍥句功棣嗗皝闈� -\tl_new:N \nju_printcover_ug % 鏈灏侀潰 -\tl_new:N \nju_printcover_g % 鐮旂┒鐢熷皝闈� -% \end{macrocode} -% +% 鎸夐渶缁樺埗鍥藉鍥句功棣嗗皝闈紝淇敼鑷儭娴锋槦妯℃澘 % % \begin{macrocode} -% 鎸夐渶缁樺埗鍥藉鍥句功棣嗗皝闈紝淇敼鑷棫妯℃澘 -\bool_if:NT \g_@@_nlcover_bool +\cs_new_protected:Npn \@@_print_cover_nl: { - \tl_set:Nn \nju_printcover_nl + \thispagestyle{empty} + \pdfbookmark[0]{鍥藉鍥句功棣嗗皝闈{nl} { - \thispagestyle{empty} - \pdfbookmark[0]{鍥藉鍥句功棣嗗皝闈{nl} + % 椤剁 + \hspace{0mm} + \vskip -20mm \hskip -15mm + \songti\zihao{-4} + \makebox[40pt][l]{鍒嗙被鍙穧 + \@@_cover_uline_b:n {\l_@@_info_classif_tl} + \hfill + \makebox[40pt][l]{瀵嗙骇} + \@@_cover_uline_b:n {\l_@@_info_seclv_tl} + \vskip 10pt \hskip -15mm + \makebox[40pt][l]{UDC} + \@@_cover_uline_b:n {\l_@@_info_udc_tl} + } + + % 涓儴 + \vskip\stretch{2} + \begin{center} + \def\ULthickness{1pt} + {\kaishu\zihao{-0} 瀛hspace{0.5em}浣峔hspace{0.5em}璁篭hspace{0.5em}鏂噠 { - % 椤剁 - \hspace{0mm} - \vskip -20mm \hskip -15mm - \songti\zihao{-4} - \makebox[40pt][l]{鍒嗙被鍙穧 - \@@_cover_uline_b:n {\l_@@_info_classif_tl} - \hfill - \makebox[40pt][l]{瀵嗙骇} - \@@_cover_uline_b:n {\l_@@_info_seclv_tl} - \vskip 10pt \hskip -15mm - \makebox[40pt][l]{UDC} - \@@_cover_uline_b:n {\l_@@_info_udc_tl} + \kaishu\zihao{1} + \vskip \stretch{1} + \@@_cover_uline_b:n {\l_@@_info_title_a_tl}\\ + \@@_cover_uline_b:n {\l_@@_info_title_b_tl}\\ + \@@_cover_uline_b:n {\l_@@_info_title_c_tl}\\ } - - % 涓儴 - \vskip\stretch{2} + \vskip \stretch{1} + {\kaishu\zihao{4}锛堥鍚嶅拰鍓鍚嶏級} + \vskip \stretch{1} \vskip 5mm + {\kaishu\zihao{1}\uline{\makebox{\l_@@_info_author_tl}}} + \vskip \stretch{1} + {\kaishu\zihao{4}锛堜綔鑰呭鍚嶏級} + \end{center} + + % 搴曢儴 + \vskip\stretch{1} + { + \kaishu\zihao{4} + \noindent 鎸囧鏁欏笀濮撳悕銆佽亴鍔°€佽亴绉般€佸浣嶃€佸崟浣嶅悕绉板強鍦板潃% + \@@_cover_uline_nl:nn {94pt}{\l_@@_info_supv_a_tl}\par + \noindent\@@_cover_uline_nl:nn {\textwidth}{% + \l_@@_info_supv_cont_tl}\par + \noindent 鐢宠瀛︿綅绾у埆% + \@@_cover_uline_nl:nn {9em}{\c_@@_name_degree_tl}% + \noindent 涓撲笟鍚嶇О% + \uline{\hfill\l_@@_major_tl\hfill}\par% 闇€瑕佽皟鏁翠笅鍒掔嚎闀垮害 + \noindent 璁烘枃鎻愪氦鏃ユ湡% + \@@_cover_uline_nl:nn {9em}{\l_@@_submit_date_tl}% + 璁烘枃绛旇京鏃ユ湡% + \uline{\hfill\l_@@_defend_date_tl\hfill}\par% 闇€瑕佽皟鏁翠笅鍒掔嚎闀垮害 + \noindent 瀛︿綅鎺堜簣鍗曚綅鍜屾棩鏈焅uline{\hfill}\par + \noindent\hfill 绛旇京濮斿憳浼氫富甯細% + \@@_cover_uline_nl:nn {9em}{\l_@@_info_chairman_tl}\par + \noindent\hfill 璇勯槄浜猴細% + \@@_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_a_tl}\par + \noindent\hfill\@@_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_b_tl}\par + \noindent\hfill\@@_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_c_tl}\par + \noindent\hfill\@@_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_d_tl}\par + \begin{center} - \def\ULthickness{1pt} - {\kaishu\zihao{-0} 瀛hspace{0.5em}浣峔hspace{0.5em}璁篭hspace{0.5em}鏂噠 - { - \kaishu\zihao{1} - \vskip \stretch{1} - \@@_cover_uline_b:n {\l_@@_info_title_a_tl}\\ - \@@_cover_uline_b:n {\l_@@_info_title_b_tl}\\ - \@@_cover_uline_b:n {\l_@@_info_title_c_tl}\\ - } - \vskip \stretch{1} - {\kaishu\zihao{4}锛堥鍚嶅拰鍓鍚嶏級} - \vskip \stretch{1} \vskip 5mm - {\kaishu\zihao{1}\uline{\makebox{\l_@@_info_author_tl}}} - \vskip \stretch{1} - {\kaishu\zihao{4}锛堜綔鑰呭鍚嶏級} + \kaishu\zihao{3}\hspace{2em} 骞碶hspace{1em} 鏈圽hspace{1em} 鏃� \end{center} - - % 搴曢儴 - \vskip\stretch{1} - { - \kaishu\zihao{4} - \noindent 鎸囧鏁欏笀濮撳悕銆佽亴鍔°€佽亴绉般€佸浣嶃€佸崟浣嶅悕绉板強鍦板潃% - \@@_cover_uline_nl:nn {94pt}{\l_@@_info_supv_a_tl}\par - \noindent\@@_cover_uline_nl:nn {\textwidth}{% - \l_@@_info_supv_cont_tl}\par - \noindent 鐢宠瀛︿綅绾у埆% - \@@_cover_uline_nl:nn {9em}{\c_@@_name_degree_tl}% - \noindent 涓撲笟鍚嶇О% - \uline{\hfill\l_@@_major_tl\hfill}\par% 闇€瑕佽皟鏁翠笅鍒掔嚎闀垮害 - \noindent 璁烘枃鎻愪氦鏃ユ湡% - \@@_cover_uline_nl:nn {9em}{\l_@@_submit_date_tl}% - 璁烘枃绛旇京鏃ユ湡% - \uline{\hfill\l_@@_defend_date_tl\hfill}\par% 闇€瑕佽皟鏁翠笅鍒掔嚎闀垮害 - \noindent 瀛︿綅鎺堜簣鍗曚綅鍜屾棩鏈焅uline{\hfill}\par - \noindent\hfill 绛旇京濮斿憳浼氫富甯細% - \@@_cover_uline_nl:nn {9em}{\l_@@_info_chairman_tl}\par - \noindent\hfill 璇勯槄浜猴細% - \@@_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_a_tl}\par - \noindent\hfill\@@_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_b_tl}\par - \noindent\hfill\@@_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_c_tl}\par - \noindent\hfill\@@_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_d_tl}\par - - \begin{center} - \kaishu\zihao{3}\hspace{2em} 骞碶hspace{1em} 鏈圽hspace{1em} 鏃� - \end{center} - \vskip -10mm - } - \cleardoublepage - } + \vskip -10mm + } + \cleardoublepage } % \end{macrocode} % % % \begin{macrocode} % 鏈灏侀潰 -\tl_set:Nn \nju_printcover_ug +\cs_new_protected:Npn \@@_print_cover_ug: { \thispagestyle{empty} \pagenumbering{Roman} @@ -2003,7 +1995,7 @@ through XeTeX. % % \begin{macrocode} % 鐮旂┒鐢熷皝闈� -\tl_set:Nn \nju_printcover_g +\cs_new_protected:Npn \@@_print_cover_g: { \thispagestyle{empty} \pagenumbering{Roman} @@ -2057,7 +2049,7 @@ through XeTeX. \cs_new_protected:Npn \@@_print_cover_en: { \thispagestyle{empty} - \pdfbookmark{鑻辨枃灏侀潰}{English cover} % 灏嗗皝闈㈡彃鍏df涔︾ + \pdfbookmark{鑻辨枃灏侀潰}{English~cover} % 灏嗗皝闈㈡彃鍏df涔︾ \begin{center} \vspace*{20pt} \bf\sffamily\zihao{2}\l_@@_info_title_en_tl @@ -2066,15 +2058,15 @@ through XeTeX. \vskip 3pt \bf\sffamily\zihao{4}\l_@@_info_author_en_tl \vskip\stretch{1} - \normalfont\rmfamily\zihao{4}{Supervised by} + \normalfont\rmfamily\zihao{4}{Supervised~by} \vskip 3pt \normalfont\sffamily\zihao{4}\l_@@_info_supv_a_title_en_tl \hspace{.5em}\l_@@_info_supv_a_en_tl \vskip\stretch{1} \normalsize\rmfamily{% - A dissertation submitted to\\ - the graduate school of Nanjing University\\ - in partial fulfilment of the requirements for the degree of\\ + A~dissertation~submitted~to\\ + the~graduate~school~of~Nanjing~University\\ + in~partial~fulfilment~of~the~requirements~for~the~degree~of\\ {\textsc{\c_@@_name_degree_en_tl}}\\ in\\ {\l_@@_major_en_tl} @@ -2083,7 +2075,7 @@ through XeTeX. \includegraphics[width=2.5cm]{njulogo} \\ \vskip 3mm \normalfont\l_@@_info_dept_en_tl\\ - {Nanjing University} + {Nanjing~University} \vskip 30pt \normalfont\normalsize\l_@@_submit_date_en_tl \end{center} @@ -2099,12 +2091,11 @@ through XeTeX. {% \str_if_eq:NNTF { \l_@@_info_degree_tl } { ug } { - \nju_printcover_nl % 鍥藉鍥句功棣嗗皝闈� - \nju_printcover_ug % 鏈灏侀潰 + \@@_print_cover_ug: % 鏈灏侀潰 } { - \nju_printcover_nl % 鍥藉鍥句功棣嗗皝闈� - \nju_printcover_g % 鐮旂┒鐢熷皝闈� + \bool_if:NT \g_@@_nlcover_bool { \@@_print_cover_nl: } % 鍥藉鍥句功棣嗗皝闈� + \@@_print_cover_g: % 鐮旂┒鐢熷皝闈� \@@_print_cover_en: % 鑻辨枃灏侀潰 } } @@ -2124,8 +2115,8 @@ through XeTeX. % \phantomsection\addcontentsline{toc}{chapter}{涓枃鎽樿} % 灏嗘憳瑕佹彃鍏ョ洰褰曞拰pdf涔︾ \pdfbookmark[0]{涓枃鎽樿}{涓枃鎽樿} % 灏嗘憳瑕佹彃鍏df涔︾锛屼笌涓婁竴琛屼笉鍙叡瀛� \begin{center} - \kaishu\zihao{-2}{\textbf{\uuline{ - 鍗椾含澶у鏈鐢熸瘯涓氳鏂囷紙璁捐銆佷綔鍝侊級涓枃鎽樿}}} + \kaishu\zihao{-2}{\textbf{ + \uuline{鍗椾含澶у鏈鐢熸瘯涓氳鏂囷紙璁捐銆佷綔鍝侊級涓枃鎽樿}}} \end{center} {\bgroup \kaishu\zihao{-4} -- GitLab