From 8c9292e3bda3707da83c10e3aff3e3239a3fa46b Mon Sep 17 00:00:00 2001
From: Yu Xiong <181850195@smail.nju.edu.cn>
Date: Sun, 31 Jul 2022 15:19:31 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=90=91=E9=87=8F?=
 =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=AE=BE=E7=BD=AE=20-=20=E8=A1=A5=E5=85=85?=
 =?UTF-8?q?=E6=95=B0=E5=AD=A6=E7=AC=A6=E5=8F=B7=E7=9B=B8=E5=85=B3=E8=AF=B4?=
 =?UTF-8?q?=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 source/njuthesis.dtx | 265 ++++++++++++++++++++++++++++++-------------
 1 file changed, 185 insertions(+), 80 deletions(-)

diff --git a/source/njuthesis.dtx b/source/njuthesis.dtx
index 0866482..9ce7723 100644
--- a/source/njuthesis.dtx
+++ b/source/njuthesis.dtx
@@ -1693,8 +1693,7 @@ To produce the documentation run the original source files ending with
 % 璇蜂笉瑕佷娇鐢ㄥ彲鑳藉紩鍙戦棶棰樼殑 |$$|\meta{鍏紡}|$$|
 % \footnote{\url{https://tex.stackexchange.com/q/503/}}銆�
 %
-%
-% \paragraph{绗﹀彿鍜屽崟浣峿
+% \paragraph{绗﹀彿}
 %
 % ^^A \url{https://www.caam.rice.edu/~heinken/latex/symbols.pdf}
 % 妯℃澘浣跨敤 \pkg{unicode-math} 瀹忓寘閰嶇疆鏁板瀛椾綋锛屽畬鏁寸鍙疯〃鍙互鍙傝€�
@@ -1705,13 +1704,101 @@ To produce the documentation run the original source files ending with
 % 渚嬪锛屽姞绮楁暟瀛︾鍙风殑鍛戒护涓� \tn{symbf}銆�
 % 鏇村缁嗚妭璇锋煡闃� \pkg{unicode-math} 鎵嬪唽銆�
 %
-% ^^A 鏈璇存槑鏉ヨ嚜 THuThesis锛屽緟琛ュ厖鐩稿簲閰嶇疆
 % 涓枃璁烘枃鐨勬暟瀛︾鍙烽粯璁ら伒寰� GB/T 3102--93銆婄墿鐞嗙瀛﹀拰鎶€鏈腑
 % 浣跨敤鐨勬暟瀛︾鍙枫€媆cite{gb-3102-93}锛岃鏍囧噯鍙傜収閲囩撼 ISO 31-11:1992锛�
+% \footnote{鐩墠宸叉洿鏂颁负 ISO 80000-2:2019銆倉锛�
 % 浣嗘槸涓� \TeX{} 榛樿鐨勭編鍥芥暟瀛﹀浼氾紙AMS锛夌殑涔犳儻鏈夎澶氬樊寮傘€�
-% 鏈ā鏉垮皻鏈畬鎴愯嚜鍔ㄦ牱寮忛€傞厤锛屼竴浜涢渶瑕佸啓浣滄椂鎵嬪姩澶勭悊鐨勮鐐瑰寘鎷細
+%
+% \begin{function}[added=2022-07-31]{math/style}
+%   \begin{syntax}
+%     style = <TeX|ISO|(GB)>
+%   \end{syntax}
+% 鏁板绗﹀彿椋庢牸銆�
+% \end{function}
+%
+% 榛樿鐨勫浗鏍囬鏍� \opt{GB} 鐩稿綋浜庡湪瀵艰█鍖鸿缃簡
+% \begin{latexexample}[moretexcs={\njusetup},emph={[2]math}]
+%   \njusetup{
+%     math = {
+%       uppercase-greek    = italic,
+%       less-than-or-equal = slanted,
+%       integral           = upright,
+%       integral-limits    = false,
+%       partial            = upright,
+%       math-ellipsis      = centered,
+%       vector             = boldfont,
+%       real-part          = roman
+%     }
+%   }
+% \end{latexexample}
+%
+% 鐢ㄦ埛涔熷彲浠ラ€愰」淇敼鏁板鏍峰紡銆�
+%
+% \begin{function}[added=2022-07-31]{math/integral}
+%   \begin{syntax}
+%     integral = <upright|slanted>
+%   \end{syntax}
+% 绉垎鍙风殑姝�/鏂滀綋銆�
+% 璇ラ€夐」闇€瑕佸瓧浣撶殑鏀寔锛岀洰鍓嶄粎闄� \opt{xits}銆乗opt{newcm}銆�
+% \end{function}
+%
+% \begin{function}[added=2022-07-31]{math/integral-limits}
+%   \begin{syntax}
+%     integral-limits = <\TF>
+%   \end{syntax}
+% 绉垎鍙蜂笂涓嬮檺鐨勪綅缃紝鍙€夛細\opt{true}锛堝湪涓婁笅锛夈€乗opt{false}锛堝湪鍙充晶锛夈€�
+% 杩欎釜璁剧疆鍙奖鍝嶈闂村叕寮忥紝琛屽唴鍏紡缁熶竴灞呭彸渚э紝涓嶅彈褰卞搷銆�
+% \end{function}
+%
+% \begin{function}[added=2022-07-31]{math/less-than-or-equal}
+%   \begin{syntax}
+%     less-than-or-equal = <slanted|horizontal>
+%   \end{syntax}
+% 灏忎簬绛変簬鍙峰拰澶т簬绛変簬鍙风殑瀛楀舰銆�
+% 杩欏皢鎺у埗 \cs{le}銆乗cs{ge}銆乗cs{leq} 鍜� \cs{geq} 鐨勭鍙锋槸
+% 鈥�$\leqslant$銆�$\geqslant$鈥濊繕鏄€�$\leq$銆�$\geq$鈥濄€�
+% \end{function}
+%
+% \begin{function}[added=2022-07-31]{math/math-ellipsis}
+%   \begin{syntax}
+%     math-ellipsis = <centered|lower>
+%   \end{syntax}
+% 鐪佺暐鍙� \cs{dots} 鐨勬牱寮忥紝鍙€夛細\opt{centered}锛堟寜鐓т腑鏂囩殑涔犳儻鍥哄畾灞呬腑锛夈€�
+% \opt{lower}锛堝彇鍐充簬鍓嶅悗绗﹀彿鐨勪綅缃級銆�
+% 鍏朵粬鐨勭渷鐣ュ彿鍛戒护濡� \cs{lots}銆乗cs{cdots} 鍒欎笉鍙楀奖鍝嶃€�
+% \end{function}
+%
+% \begin{function}[added=2022-07-31]{math/partial}
+%   \begin{syntax}
+%     partial = <TeX|ISO|(GB)>
+%   \end{syntax}
+% 鍋忓井鍒嗙鍙风殑姝�/鏂滀綋銆�
+% \end{function}
+%
+% \begin{function}[added=2022-07-31]{math/real-part}
+%   \begin{syntax}
+%     real-part = <roman|fraktur>
+%   \end{syntax}
+% 瀹為儴 \cs{Re} 鍜岃櫄閮� \cs{Im} 鐨勫瓧浣撱€�
+% \end{function}
+%
+% \begin{function}[added=2022-07-31]{math/vector}
+%   \begin{syntax}
+%     vector = <boldfont|arrow>
+%   \end{syntax}
+% 鍚戦噺鐨勮〃绀烘柟娉曪紝鍙€夌矖鏂滀綋鎴栫澶淬€�
+% \end{function}
+%
+% \begin{function}[added=2022-07-31]{math/uppercase-greek}
+%   \begin{syntax}
+%     uppercase-greek = <upright|italic>
+%   \end{syntax}
+% 澶у啓甯岃厞瀛楁瘝鐨勬/鏂滀綋銆�
+% 鏈夐檺澧為噺绗﹀彿 $\increment x$ 鍥哄畾浣跨敤姝d綋锛屾帹鑽愪娇鐢� \cs{increment} 琛ㄧず銆�
+% \end{function}
+%
+% 鏈ā鏉跨殑璁剧疆骞朵笉鑳借鐩栨墍鏈夌鍙凤紝涓€浜涢渶瑕佸啓浣滄椂鎵嬪姩澶勭悊鐨勮鐐瑰寘鎷細
 % \begin{itemize}
-% ^^A   \item 灏忎簬绛変簬鍙峰拰澶т簬绛変簬鍙蜂娇鐢ㄦ枩绾匡紙$\leqslant$銆�$\geqslant$锛�
 %   \item 鏁板甯告暟鍜岀壒娈婂嚱鏁板悕鐢ㄦ浣擄紝濡�
 %   \begin{itemize}
 %     \item $\uppi$ 浣跨敤 |$\uppi$|
@@ -1723,14 +1810,10 @@ To produce the documentation run the original source files ending with
 %     \item $\mathrm{d} \varphi / \mathrm{d} t$
 %           浣跨敤 |$\mathrm{d} \varphi / \mathrm{d} t$|
 %   \end{itemize}
-% ^^A 鍙互鎻愪緵涓€涓缃」锛寍\renewcommand{\vec}[1]{\symbf{#1}}|
-%   \item 鍚戦噺銆佺煩闃靛拰寮犻噺鐢ㄧ矖鏂滀綋锛圽cs{symbf}锛夛紝濡�
-%   \begin{itemize}
-%     \item $\symbf{\Sigma}$ 浣跨敤 |$\symbf{\Sigma}$|
-%     \item $\symbfsf{T}$ 浣跨敤 |$\symbfsf{T}$|
-%   \end{itemize}
 % \end{itemize}
 %
+% \paragraph{鍗曚綅}
+%
 % 鍗曚綅榛樿閬靛惊 GB 3100--93銆婂浗闄呭崟浣嶅埗鍙婂叾搴旂敤銆媆cite{gb-3100-93}鍜�
 % GB 3101--93銆婃湁鍏抽噺銆佸崟浣嶅拰绗﹀彿鐨勪竴鑸師鍒欍€媆cite{gb-3101-93}锛�
 % SI 鍗曚綅鍙€氳繃杞藉叆 \pkg{siunitx} 瀹忓寘\cite{siunitx}杩涜杈撳叆銆�
@@ -3785,7 +3868,6 @@ To produce the documentation run the original source files ending with
       { \tl_set_eq:NN \g_@@_font_math_tl  \l_keys_choice_tl },
 %    \end{macrocode}
 % \end{macro}
-% \end{macro}
 %
 % \begin{macro}{font-path}
 % 鐙珛瀛椾綋鏂囦欢鐨勮矾寰勩€�
@@ -4534,10 +4616,11 @@ To produce the documentation run the original source files ending with
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_loadfont_latin_win:
   {
-    \setmainfont { Times~New~Roman }
-    \setsansfont { Arial           }
-    \setmonofont { Courier~New     }
-      [ Scale = MatchLowercase ]
+    \__fontspec_main_setmainfont:nn { } { Times~New~Roman }
+    \__fontspec_main_setsansfont:nn { } { Arial           }
+    \__fontspec_main_setmonofont:nn
+      { Scale = MatchLowercase }
+      { Courier~New }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -4547,10 +4630,11 @@ To produce the documentation run the original source files ending with
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_loadfont_latin_mac:
   {
-    \setmainfont { Times~New~Roman }
-    \setsansfont { Arial           }
-    \setmonofont { Menlo           }
-      [ Scale = MatchLowercase ]
+    \__fontspec_main_setmainfont:nn { } { Times~New~Roman }
+    \__fontspec_main_setsansfont:nn { } { Arial           }
+    \__fontspec_main_setmonofont:nn
+      { Scale = MatchLowercase }
+      { Menlo }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -4560,24 +4644,26 @@ To produce the documentation run the original source files ending with
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_loadfont_latin_gyre:
   {
-    \setmainfont { texgyretermes }
-      [
+    \__fontspec_main_setmainfont:nn
+      {
         Extension      = .otf,
         UprightFont    = *-regular,
         BoldFont       = *-bold,
         ItalicFont     = *-italic,
         BoldItalicFont = *-bolditalic
-      ]
-    \setsansfont { texgyreheros  }
-      [
+      }
+      { texgyretermes }
+    \__fontspec_main_setsansfont:nn
+      {
         Extension      = .otf,
         UprightFont    = *-regular,
         BoldFont       = *-bold,
         ItalicFont     = *-italic,
         BoldItalicFont = *-bolditalic
-      ]
-    \setmonofont { texgyrecursor }
-      [
+      }
+      { texgyreheros  }
+    \__fontspec_main_setmonofont:nn
+      {
         Extension      = .otf,
         UprightFont    = *-regular,
         BoldFont       = *-bold,
@@ -4585,7 +4671,8 @@ To produce the documentation run the original source files ending with
         BoldItalicFont = *-bolditalic,
         Scale          = MatchLowercase,
         Ligatures      = CommonOff
-      ]
+      }
+      { texgyrecursor }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -4786,7 +4873,7 @@ To produce the documentation run the original source files ending with
 \cs_new:Npn \@@_define_math_font:nn #1#2
   {
     \cs_new:cpn { @@_loadfont_math_ #1 : }
-      { \setmathfont { #2 } }
+      { \__um_setmathfont:nn { } { #2 } }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -4830,10 +4917,11 @@ To produce the documentation run the original source files ending with
   {
     \bool_if:NTF \g_@@_font_path_bool
       {
-        \setmathfont { cambria.ttc }
-          [ Path = \g_@@_font_path_tl/, FontIndex = 1 ]
+        \__um_setmathfont:nn
+          { Path = \g_@@_font_path_tl/, FontIndex = 1 }
+          { cambria.ttc }
       }
-      { \setmathfont { Cambria~Math } }
+      { \__um_setmathfont:nn { } { Cambria~Math } }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -5705,31 +5793,24 @@ To produce the documentation run the original source files ending with
 % \subsection{鍏紡鏍峰紡}
 % \changes{v1.0}{2022/07/31}{鏂板鑻ュ共鍏紡鏍峰紡璁剧疆銆倉
 %
-% \begin{variable}{\g_@@_opt_math_int_bool}
-% 鏄惁浣跨敤鐩寸珛绉垎鍙枫€�
-%    \begin{macrocode}
-\bool_new:N \g_@@_opt_math_int_bool
-%    \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\g_@@_opt_math_re_bool}
-% 鏄惁浣跨敤缃楅┈浣撳疄閮ㄨ櫄閮ㄧ鍙枫€�
+% \begin{variable}{
+%   \g_@@_opt_math_re_bool,
+%   \g_@@_opt_math_int_bool,
+%   \g_@@_opt_math_leq_bool,
+%   \g_@@_opt_math_vec_bool}
+% 鐢ㄤ簬浠ヤ笅鑻ュ共閫夐」鐨� |bool| 鍙橀噺銆�
 %    \begin{macrocode}
 \bool_new:N \g_@@_opt_math_re_bool
-%    \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\g_@@_opt_math_leq_bool}
-% 鏄惁浣跨敤鍊炬枩鐨勫皬浜庣瓑浜庡彿銆�
-%    \begin{macrocode}
+\bool_new:N \g_@@_opt_math_int_bool
 \bool_new:N \g_@@_opt_math_leq_bool
+\bool_new:N \g_@@_opt_math_vec_bool
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{variable}{\g_@@_name_integral_tl}
+% \begin{variable}{\c_@@_name_integral_tl}
 % 淇濆瓨 \pkg{unicode-math} 鍐呯疆鐨勬墍鏈夌Н鍒嗗彿鍛戒护銆�
 %    \begin{macrocode}
-\tl_const:Nx \c_@@_name_integral_tl { \l__um_nolimits_tl }
+\exp_args:NNV \tl_const:Nn \c_@@_name_integral_tl \l__um_nolimits_tl
 %    \end{macrocode}
 % \end{variable}
 %
@@ -5754,27 +5835,8 @@ To produce the documentation run the original source files ending with
 \keys_define:nn { nju / math }
   {
 %    \end{macrocode}
-% \begin{macro}{math/uppercase-greek}
-%    \begin{macrocode}
-    uppercase-greek               .choice:,
-    uppercase-greek / italic        .code:n =
-      { \@@_um_setup:n { math-style = TeX } },
-    uppercase-greek / upright       .code:n =
-      { \@@_um_setup:n { math-style = ISO } },
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{math/less-than-or-equal}
-%    \begin{macrocode}
-    less-than-or-equal            .choice:,
-    less-than-or-equal / slanted    .code:n =
-      { \bool_set_true:N  \g_@@_opt_math_leq_bool },
-    less-than-or-equal / horizontal .code:n =
-      { \bool_set_false:N \g_@@_opt_math_leq_bool },
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}{math/integral}
+% 绉垎鍙锋牱寮忥紝鐩寸珛鎴栧€炬枩銆�
 %    \begin{macrocode}
     integral                      .choice:,
     integral / upright              .code:n =
@@ -5785,27 +5847,30 @@ To produce the documentation run the original source files ending with
 % \end{macro}
 %
 % \begin{macro}{math/integral-limits}
+% 绉垎鍙蜂笂涓嬮檺鐨勪綅缃紝鍦ㄤ笂涓嬫垨鍦ㄥ彸渚с€�
 % 涓や釜閫夐」鍒嗗埆鐩稿綋浜� \tn{removenolimits} 鍜� \tn{addnolimits}銆�
 %    \begin{macrocode}
     integral-limits               .choice:,
     integral-limits / true          .code:n =
-      { \tl_set_eq:NN \l__um_nolimits_tl \c_@@_name_integral_tl },
-    integral-limits / false         .code:n =
       { \tl_clear:N   \l__um_nolimits_tl },
+    integral-limits / false         .code:n =
+      { \tl_set_eq:NN \l__um_nolimits_tl \c_@@_name_integral_tl },
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{math/partial}
+% \begin{macro}{math/less-than-or-equal}
+% 灏忎簬绛変簬鍙峰拰澶т簬绛変簬鍙风殑妯嚎鏍峰紡锛屽€炬枩鎴栨按骞炽€�
 %    \begin{macrocode}
-    partial                       .choice:,
-    partial / upright               .code:n =
-      { \@@_um_setup:n { partial = upright } },
-    partial / italic                .code:n =
-      { \@@_um_setup:n { partial = italic  } },
+    less-than-or-equal            .choice:,
+    less-than-or-equal / slanted    .code:n =
+      { \bool_set_true:N  \g_@@_opt_math_leq_bool },
+    less-than-or-equal / horizontal .code:n =
+      { \bool_set_false:N \g_@@_opt_math_leq_bool },
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{math/math-ellipsis}
+% 鐪佺暐鍙风殑鏍峰紡锛屽眳涓垨搴曢儴銆�
 %    \begin{macrocode}
     math-ellipsis                 .choice:,
     math-ellipsis / centered        .code:n =
@@ -5821,7 +5886,19 @@ To produce the documentation run the original source files ending with
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{math/partial}
+% 鍋忓井鍒嗗彿鏍峰紡锛屾浣撴垨鏂滀綋銆�
+%    \begin{macrocode}
+    partial                       .choice:,
+    partial / upright               .code:n =
+      { \@@_um_setup:n { partial = upright } },
+    partial / italic                .code:n =
+      { \@@_um_setup:n { partial = italic  } },
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{math/real-part}
+% 瀹為儴鍜岃櫄閮ㄧ鍙风殑鏍峰紡锛岀綏椹綋鎴栬姳浣撱€�
 %    \begin{macrocode}
     real-part                     .choice:,
     real-part / roman               .code:n =
@@ -5831,7 +5908,29 @@ To produce the documentation run the original source files ending with
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{math/style}
+% \begin{macro}{math/vector}
+% 鍚戦噺绗﹀彿鏍峰紡锛岀矖鏂滀綋鎴栫澶淬€�
+%    \begin{macrocode}
+    vector                        .choice:,
+    vector / boldfont               .code:n =
+      { \bool_set_true:N  \g_@@_opt_math_vec_bool },
+    vector / arrow             .code:n =
+      { \bool_set_false:N \g_@@_opt_math_vec_bool },
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{math/uppercase-greek}
+  % 澶у啓甯岃厞瀛楁瘝鐨勬牱寮忥紝姝d綋鎴栨枩浣撱€�
+  %    \begin{macrocode}
+      uppercase-greek               .choice:,
+      uppercase-greek / upright       .code:n =
+        { \@@_um_setup:n { math-style = ISO } },
+      uppercase-greek / italic        .code:n =
+        { \@@_um_setup:n { math-style = TeX } },
+  %    \end{macrocode}
+  % \end{macro}
+  %
+  % \begin{macro}{math/style}
 % 鏁翠綋鏍峰紡銆�
 %    \begin{macrocode}
     style                      .choice:,
@@ -5845,6 +5944,7 @@ To produce the documentation run the original source files ending with
             math-ellipsis      = centered,
             partial            = italic,
             real-part          = fraktur,
+            vector             = arrow,
             uppercase-greek    = upright
           }
         \@@_um_setup:n { bold-style = TeX }
@@ -5860,6 +5960,7 @@ To produce the documentation run the original source files ending with
             math-ellipsis      = lower,
             partial            = upright,
             real-part          = roman,
+            vector             = arrow,
             uppercase-greek    = italic
           }
         \@@_um_setup:n { bold-style = ISO }
@@ -5875,6 +5976,7 @@ To produce the documentation run the original source files ending with
             math-ellipsis      = centered,
             partial            = upright,
             real-part          = roman,
+            vector             = boldfont,
             uppercase-greek    = italic
           }
         \@@_um_setup:n { bold-style = ISO }
@@ -5885,6 +5987,7 @@ To produce the documentation run the original source files ending with
 %    \end{macrocode}
 % \end{macro}
 %
+% 鍦� |\begin{document}| 澶勮缃皬浜庣瓑浜庡彿鍜屽疄閮ㄧ鍙风瓑鐨勬牱寮忋€�
 %    \begin{macrocode}
 \@@_at_begin_document:n
   {
@@ -5900,6 +6003,8 @@ To produce the documentation run the original source files ending with
         \cs_set:Npn \Re { \operatorname { Re } }
         \cs_set:Npn \Im { \operatorname { Im } }
       }
+    \bool_if:NT \g_@@_opt_math_vec_bool
+      { \cs_set_eq:NN \vec \symbf }
   }
 %</class>
 %    \end{macrocode}
@@ -6406,7 +6511,7 @@ To produce the documentation run the original source files ending with
     \c_@@_name_chairman_tl \@@_hskip:
     \@@_ulined_center_box:nn { 9 em } { \g_@@_info_chairman_tl } \\
     \c_@@_name_reviewer_tl \@@_hskip:
-    \@@_multiline_box:NNNn \l_@@_tmpa_int, \l_@@_tmpb_int
+    \@@_multiline_box:NNNn \l_@@_tmpa_int \l_@@_tmpb_int
       \g_@@_info_reviewer_clist { 9 em }
   }
 %    \end{macrocode}
-- 
GitLab