diff --git a/docs/njuthesis-setup.def b/docs/njuthesis-setup.def index 5652b480f107500fc9fb67e189d15d00e8118ff4..3ca5cff617fc162cc1cfafd1386c431046c090bd 100644 --- a/docs/njuthesis-setup.def +++ b/docs/njuthesis-setup.def @@ -69,7 +69,7 @@ % 浠ヤ笅鍧囦负鐮旂┒鐢熼」 % % degree = {宸ョ▼纭曞+}, - % degree* = {Master of Engineering} + % degree* = {Master of Engineering}, % 瑕嗙洊榛樿瀛︿綅鍚嶇О % field = {鐗╃悊鍖栧}, diff --git a/source/njuthesis.dtx b/source/njuthesis.dtx index 46f109406dc97c5590d76dd93493a7ef025dc7b2..553f95644306b92609af67c4ada21e68d62e5da3 100644 --- a/source/njuthesis.dtx +++ b/source/njuthesis.dtx @@ -2738,10 +2738,10 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{variable} % -% \begin{variable}{\c_@@_today_tl} +% \begin{variable}{\c_@@_name_today_tl} % 缂栬瘧褰撳ぉ鏃ユ湡锛屾牸寮忎负 |yyyy-mm-dd|銆� % \begin{macrocode} -\tl_const:Nx \c_@@_today_tl +\tl_const:Nx \c_@@_name_today_tl { \int_to_arabic:n { \c_sys_year_int } - \int_to_arabic:n { \c_sys_month_int } - @@ -3187,34 +3187,23 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_date:n,\@@_date_en:n} -% 浠� ISO 鏍煎紡鐨勬棩鏈熷瓧绗︿覆鐢熸垚涓嫳鏂囨棩鏈熸枃鏈€� +% \begin{macro}{\@@_date:nn} % \begin{macrocode} -\cs_new_protected:Npn \@@_date:n #1 { \@@_date:nn {#1} { } } -\cs_new_protected:Npn \@@_date_en:n #1 { \@@_date:nn {#1} { _en } } +\cs_new:Npn \@@_date:nn { \@@_date:nnn { } } % \end{macrocode} % \end{macro} % -% \begin{macro}{\exp_last_unbraced:cV,\@@_date:nn} +% \begin{macro}{\@@_date:nnn} % \changes{v0.20}{2022/05/24}{鍙湪鏃ユ湡椤圭暀绌轰互浣跨敤绌虹櫧鐨勫勾鏈堟棩瀛楁牱銆倉 % 鐢ㄤ簬鏃ユ湡鏍煎紡杞寲鐨勮緟鍔╁懡浠ゃ€傚湪浼犲叆鐨勫瓧绗︿覆涓虹┖鏃剁敓鎴愮┖鐧藉瓧鏍枫€� % \begin{macrocode} -\cs_generate_variant:Nn \exp_last_unbraced:NV { cV } -\cs_new_protected:Npn \@@_date:nn #1#2 +\cs_new:Npn \@@_date:nnn #1#2#3 { - \tl_set:Nv \l_@@_tmpa_tl { g_@@_info_ #1 date_raw_tl } - \tl_new:c { g_@@_info_ #1 date #2 _tl } - \tl_set:cx { g_@@_info_ #1 date #2 _tl } + \tl_set:cx { g_@@_info_ #2 date #1 _tl } { - \tl_if_empty:NTF \l_@@_tmpa_tl - { \@@_name:n { blankdate #2 } } -% \end{macrocode} -% |w| 鍚庣殑鍙傛暟闇€瑕佷娇鐢ㄩ潪鎷彿鍖呰9鐨勫舰寮忓畬鍏ㄥ睍寮€銆� -% \begin{macrocode} - { - \exp_last_unbraced:cV { @@_date #2 :www } - \l_@@_tmpa_tl \q_stop - } + \tl_if_empty:nTF {#3} + { \@@_name:n { blankdate #1 } } + { \use:c { @@_date #1 :www } #3 \q_stop } } } % \end{macrocode} @@ -4457,43 +4446,7 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{macro} % -% \begin{macro}{info/submit-date} -% \changes{v0.14}{2022/01/14}{绮剧畝鎻愪氦鏃ユ湡閫夐」銆倉 -% 鎻愪氦鏃ユ湡锛屽垵濮嬪€间负缂栬瘧褰撳ぉ鏃ユ湡銆� -% \begin{macrocode} - submit-date .tl_set:N = \g_@@_info_submitdate_raw_tl , - submit-date .initial:V = \c_@@_today_tl , -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{info/defend-date} -% \changes{v0.14}{2022/01/14}{绮剧畝绛旇京鏃ユ湡閫夐」銆倉 -% 绛旇京鏃ユ湡銆� -% \begin{macrocode} - defend-date .tl_set:N = \g_@@_info_defenddate_raw_tl , - defend-date .initial:V = \c_@@_today_tl , -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{info/defend-date} -% \changes{v0.19}{2022/05/23}{鏂板鍥藉鍥句功棣嗗皝闈㈢殑瀛︿綅鎺堜簣鏃ユ湡璁剧疆椤广€倉 -% 瀛︿綅鎺堜簣鏃ユ湡銆� -% \begin{macrocode} - confer-date .tl_set:N = \g_@@_info_conferdate_raw_tl , - confer-date .initial:V = \c_@@_today_tl , -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{info/bottom-date} -% \changes{v0.19}{2022/05/23}{鏂板鍥藉鍥句功棣嗗皝闈㈢殑搴曢儴鏃ユ湡璁剧疆椤广€倉 -% 搴曢儴鏃ユ湡銆� -% \begin{macrocode} - bottom-date .tl_set:N = \g_@@_info_bottomdate_raw_tl , - bottom-date .initial:V = \c_@@_today_tl , -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{info/defend-date,info/chairman,info/reviewer} +% \begin{macro}{info/chairman,info/reviewer} % 绛旇京濮斿憳浼氫俊鎭€� % \begin{macrocode} chairman .tl_set:N = \g_@@_info_chairman_tl , @@ -4545,9 +4498,42 @@ To produce the documentation run the original source files ending with % 瑕嗙洊棰勫畾涔夌殑瀛︿綅瀛楁銆� % \begin{macrocode} degree .tl_set:N = \g_@@_info_degree_tl , - degree* .tl_set:N = \g_@@_info_degree_en_tl + degree* .tl_set:N = \g_@@_info_degree_en_tl , +% \end{macrocode} +% \end{macro} +% +% 鎻愪氦鏃ユ湡锛屽垵濮嬪€间负缂栬瘧褰撳ぉ鏃ユ湡銆� +% \begin{macrocode} + } +% \end{macrocode} +% +% \changes{v1.3}{2023/05/18}{鏃ユ湡瀛楁鐩存帴鍦ㄨ緭鍏ラ敭鍊兼椂澶勭悊銆倉 +% +% \begin{macro}{info/submit-date} +% \changes{v0.14}{2022/01/14}{绮剧畝鎻愪氦鏃ユ湡閫夐」銆倉 +% \begin{macro}{info/defend-date} +% \changes{v0.14}{2022/01/14}{绮剧畝绛旇京鏃ユ湡閫夐」銆倉 +% \begin{macro}{info/confer-date} +% \changes{v0.19}{2022/05/23}{鏂板鍥藉鍥句功棣嗗皝闈㈢殑瀛︿綅鎺堜簣鏃ユ湡璁剧疆椤广€倉 +% \begin{macro}{info/bottom-date} +% \changes{v0.19}{2022/05/23}{鏂板鍥藉鍥句功棣嗗皝闈㈢殑搴曢儴鏃ユ湡璁剧疆椤广€倉 +% \begin{variable}{\g_@@_info_submitdate_tl,\g_@@_info_defenddate_tl, +% \g_@@_info_bottomdate_tl,\g_@@_info_conferdate_tl} +% 鏃ユ湡銆� +% \begin{macrocode} +\clist_map_inline:nn { submit, defend, confer, bottom } + { + \keys_define:nn { nju / info } + { + #1-date .code:n = \@@_date:nn {#1} {##1}, + #1-date .initial:V = \c_@@_name_today_tl + } } % \end{macrocode} +% \end{variable} +% \end{macro} +% \end{macro} +% \end{macro} % \end{macro} % % 灏嗘寚瀹氫俊鎭」褰掑叆 \opt{anonymous} 缁勶紝浠ュ湪鐩插妯″紡涓嬮€夋嫨鎬у睆钄姐€� @@ -4586,49 +4572,23 @@ To produce the documentation run the original source files ending with %</class> % \end{macrocode} % -% \begin{macrocode} -%<*(def-u|def-g|def-p)> -\ctex_at_end_preamble:n - { -% \end{macrocode} -% \begin{variable}{\g_@@_info_submitdate_tl} -% 灏� ISO 鏍煎紡鐨勫師濮嬫棩鏈熷瓧绗︿覆鏍煎紡鍖栦负涓枃鏃ユ湡琛ㄧず銆� -% \begin{macrocode} - \@@_date:n { submit } -% \end{macrocode} -% \end{variable} -% -% \begin{variable}{ -% \g_@@_info_submitdate_en_tl, -% \g_@@_info_defenddate_tl} -% 鑻辨枃鎻愪氦鏃ユ湡浠ュ強绛旇京鏃ユ湡浠呯敤浜庣爺绌剁敓灏侀潰銆� +% \begin{variable}{\g_@@_info_submitdate_en_tl} +% 鐮旂┒鐢熷皝闈㈤澶栭渶瑕佽嫳鏂囨棩鏈熴€� % \begin{macrocode} %<*def-g> - \@@_date_en:n { submit } - \@@_date:n { defend } +\cs_set:Npn \@@_date:nn #1#2 + { \@@_date:nnn { } {#1} {#2} \@@_date:nnn { _en } {#1} {#2} } % \end{macrocode} % \end{variable} % -% \begin{variable}{ -% \g_@@_info_bottomdate_tl, -% \g_@@_info_conferdate_tl, -% \g_@@_info_confer_tl} -% 搴曢儴鏃ユ湡浠ュ強瀛︿綅鎺堜簣鏃ユ湡浠呯敤浜庡浗瀹跺浘涔﹂灏侀潰銆� +% \begin{variable}{\g_@@_info_confer_tl} % \begin{macrocode} - \bool_if:NT \g_@@_opt_nlcover_bool - { - \@@_date:n { bottom } - \@@_date:n { confer } - \tl_new:N \g_@@_info_confer_tl - \tl_set:Nn \g_@@_info_confer_tl - { - \textbf { \c_@@_name_nju_tl } \hfil - \g_@@_info_conferdate_tl - } - } -%</def-g> +\tl_new:N \g_@@_info_confer_tl +\tl_set:Nn \g_@@_info_confer_tl + { + \textbf { \c_@@_name_nju_tl } \hfil + \g_@@_info_conferdate_tl } -%</(def-u|def-g|def-p)> % \end{macrocode} % \end{variable} % @@ -4638,7 +4598,6 @@ To produce the documentation run the original source files ending with % \begin{variable}{\g_@@_info_type_tl} % 鏂囨。绫诲瀷瀛楁牱銆� % \begin{macrocode} -%<*def-g> \tl_new:N \g_@@_info_type_tl \tl_set:Nx \g_@@_info_type_tl { \clist_item:Nn \c_@@_name_type_clist { \g_@@_info_type_int } } @@ -7086,7 +7045,7 @@ To produce the documentation run the original source files ending with \c_@@_name_ida_tl & \g_@@_info_id_tl & \c_@@_name_depta_tl & \g_@@_info_dept_tl & \c_@@_name_year_tl & - \tl_range:Nnn \g_@@_info_submitdate_raw_tl {1} {4} \\ + \tl_range:Nnn \g_@@_info_submitdate_tl {1} {4} \\ \c_@@_name_degreea_tl & { \@@_degree_checkbox:Nn \c_true_bool { 2 } 瀛︽湳瀛︿綅纭曞+ \qquad