From dab4e7c261c34234f9d9f1ac92923d6f903046ef Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sun, 29 Jan 2023 03:01:53 +0000
Subject: CTAN sync 202301290301

---
 macros/xetex/latex/xduts/xduts.dtx | 125 ++++++++++++++++++++++++++-----------
 1 file changed, 88 insertions(+), 37 deletions(-)

(limited to 'macros/xetex/latex/xduts/xduts.dtx')

diff --git a/macros/xetex/latex/xduts/xduts.dtx b/macros/xetex/latex/xduts/xduts.dtx
index 32ac11d84b..fb5170a008 100644
--- a/macros/xetex/latex/xduts/xduts.dtx
+++ b/macros/xetex/latex/xduts/xduts.dtx
@@ -1,7 +1,7 @@
 % \iffalse
 %<*driver>
 \ProvidesFile{xduts.dtx}
-[2023/01/16 v4.1.1.0 Xidian University TeX Suite]
+[2023/01/28 v4.3.0.0 Xidian University TeX Suite]
 %</driver>
 %<class|sty>\NeedsTeXFormat{LaTeX2e}
 %<class|sty>\RequirePackage{expl3}
@@ -9,7 +9,7 @@
 %<xduugtp>\ProvidesExplClass{xduugtp}
 %<xdupgthesis>\ProvidesExplClass{xdupgthesis}
 %<xduugthesis>\ProvidesExplClass{xduugthesis}
-%<class|sty>  {2023/01/16}{4.1.1.0}
+%<class|sty>  {2023/01/28}{4.3.0.0}
 %<xdufont>  {Xidian University Font package}
 %<xduugtp>  {Xidian University Undergraduate Thesis Proposal class}
 %<xdupgthesis>  {Xidian University Postgraduate Thesis document class}
@@ -40,12 +40,9 @@
 \setcounter{tocdepth}{5}
 \ctexset{punct=quanjiao}
 \usepackage{hologo}
-\usepackage{fetamont}
 \usepackage{xurl}
 \usepackage{xspace}
 \xspaceaddexceptions{。？！，、；：“”‘’—….－-～·《》<>＿}
-\newcolumntype{Y}{>{\centering\arraybackslash}X}
-\usepackage{multirow}
 \usepackage{pifont}
 \newcommand{\cmark}{\ding{51}}
 \usepackage{subcaption}
@@ -94,7 +91,9 @@
 \newcommand{\ctanurl}[1]{\href{https://mirrors.cloud.tencent.com/CTAN/#1}{\ttfamily CTAN://#1}}
 \newcommand{\footctan}[1]{\footnote{\ctanurl{#1}}}
 % logo
-\newcommand{\xduts}{{\bfseries\ffmfamily XDUTS}}
+\changes{v4.1.1.1}{2023/01/21}{修正LOGO字形高度}
+\newfontfamily{\ffmfamily}[Scale=MatchUppercase]{ffmb10.otf}
+\newcommand{\xduts}{{\ffmfamily XDUTS}}
 \newcommand{\texlive}{\TeX{} Live}
 \newcommand{\mactex}{Mac\TeX{}}
 \newcommand{\miktex}{\xspace\hologo{MiKTeX}\xspace}
@@ -132,6 +131,8 @@ emph            = [6]{document,tabular,edubg,resresult,appendixes},
 literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
                   {\{}{{\textcolor{purple3}{\{}}}{1}
                   {\}}{{\textcolor{purple3}{\}}}}{1}
+                  {[}{{\textcolor{purple3}{[}}}{1}
+                  {]}{{\textcolor{purple3}{]}}}{1}
                   {=}{{\textcolor{purple3}{=}}}{1}
                   {\&}{{\textcolor{purple3}{\&}}}{1}
                   {\\\\}{{\textcolor{purple3}{\textbackslash{}\textbackslash{}}}}{2}
@@ -544,6 +545,18 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
 % |gyre|   & TeX Gyre Termes & TeX Gyre Heros & TeX Gyre Cursor \\
 % \end{tblr}
 % \end{table}
+% \begin{function}[added=2023-01-28]{style/latin-sans-scale,style/latin-mono-scale}
+%   \begin{syntax}
+%     \optx{style/latin-sans-scale}=\metax{upper|lower|(off)}
+%     \optx{style/latin-mono-scale}=\metax{upper|lower|(off)}
+%   \end{syntax}
+% 匹配无衬线族和打字机族字符高度。
+% \end{function}
+% \begin{optdesc}
+%   \item[upper] 按大写字母的高度缩放以匹配罗马族字体。
+%   \item[lower] 按小写字母的高度缩放以匹配罗马族字体。
+%   \item[off] 不缩放。
+% \end{optdesc}
 % \begin{function}[added=2022-03-06,updated=2022-03-09]{style/math-font}
 %   \begin{syntax}
 %     \optx{style/math-font}=\metax{asana|cambria|(cm)|fira|garamond|lm|...|termes|xits|none}
@@ -1634,18 +1647,18 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
 % \changes{v1.30.0.0}{2022/06/20}{英文研究生学位论文双语标题}
 % \subsubsection{英文研究生学位论文双语标题}
 % \label{英文研究生学位论文双语标题}
-% \begin{function}[added=2022-06-20]{\chapter,\section,\subsection}
+% \begin{function}[added=2022-06-20,updated=2023-01-28]{\chapter,\section,\subsection}
 %   \begin{syntax}
-%     \tn{chapter}\marg{英文标题}\marg{中文标题}
-%     \tn{section}\marg{英文标题}\marg{中文标题}
-%     \tn{subsection}\marg{英文标题}\marg{中文标题}
+%     \tn{chapter}\marg{英文标题}\oarg{中文标题}
+%     \tn{section}\marg{英文标题}\oarg{中文标题}
+%     \tn{subsection}\marg{英文标题}\oarg{中文标题}
 %   \end{syntax}
 % 在英文研究生学位论文中一二三级标题为中英双语，其他级别标题为英文。
 % 一个简单的例子如下所示：
 % \begin{lstlisting}
-% \chapter{This Is Chapter}{这是一级标题}
-% \section{This Is Section}{这是二级标题}
-% \subsection{This Is Subsection}{这是三级标题}
+% \chapter{This Is Chapter}[这是一级标题]
+% \section{This Is Section}[这是二级标题]
+% \subsection{This Is Subsection}[这是三级标题]
 % \subsubsection{This Is Subsubsection}
 % \paragraph{This Is Paragraph}
 % \subparagraph{This Is Subparagraph}
@@ -1846,6 +1859,8 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
 %     \l_@@_fake_bold_tl,
 %     \l_@@_fake_slant_tl,
 %     \l_@@_latin_font_tl,
+%     \l_@@_latin_sans_scale_tl,
+%     \l_@@_latin_mono_scale_tl,
 %     \l_@@_math_font_tl,
 %     \l_@@_unicode_math_tl,
 %     \l_@@_font_type_tl,
@@ -1868,6 +1883,11 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
 %    \begin{macrocode}
 \tl_new:N \l_@@_latin_font_tl
 %    \end{macrocode}
+% 匹配无衬线族和打字机族字符高度。
+%    \begin{macrocode}
+\tl_new:N \l_@@_latin_sans_scale_tl
+\tl_new:N \l_@@_latin_mono_scale_tl
+%    \end{macrocode}
 % 数学字体配置名称。
 %    \begin{macrocode}
 \tl_new:N \l_@@_math_font_tl
@@ -1905,6 +1925,13 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
 %    \begin{macrocode}
     cjk-fake-slant .tl_set:N = \l_@@_fake_slant_tl,
 %    \end{macrocode}
+% 匹配无衬线族和打字机族字符高度。
+%    \begin{macrocode}
+    latin-sans-scale .choices:nn = { upper, lower, off }
+      { \tl_set_eq:NN \l_@@_latin_sans_scale_tl \l_keys_choice_tl },
+    latin-mono-scale .choices:nn = { upper, lower, off }
+      { \tl_set_eq:NN \l_@@_latin_mono_scale_tl \l_keys_choice_tl },
+%    \end{macrocode}
 % 英文字体配置。
 %    \begin{macrocode}
     latin-font .choices:nn = { tac, tacn, thcs, gyre, none }
@@ -1938,14 +1965,16 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
 %    \begin{macrocode}
 \keys_set:nn { xdu }
   {
-    style / cjk-font       = fandol,
-    style / cjk-fake-bold  = 3,
-    style / cjk-fake-slant = 0.2,
-    style / latin-font     = gyre,
-    style / math-font      = cm,
-    style / unicode-math   = { },
-    style / font-type      = font,
-    style / font-path      = fonts
+    style / cjk-font         = fandol,
+    style / cjk-fake-bold    = 3,
+    style / cjk-fake-slant   = 0.2,
+    style / latin-font       = gyre,
+    style / latin-sans-scale = off,
+    style / latin-mono-scale = off,
+    style / math-font        = cm,
+    style / unicode-math     = { },
+    style / font-type        = font,
+    style / font-path        = fonts
   }
 %    \end{macrocode}
 % \end{macro}
@@ -2283,12 +2312,28 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
   }
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\@@_off_latin_ligatures:}
+% \begin{macro}{\@@_set_latin_sans_scale:,\@@_set_latin_mono_scale:}
+% \changes{v4.3.0.0}{2023/01/28}{匹配无衬线族和打字机族字符高度}
 % \changes{v0.8.3.0}{2022/04/13}{匹配小写字母字符高度}
-% 匹配小写字母字符高度。
+% 匹配无衬线族和打字机族字符高度。
 %    \begin{macrocode}
-\cs_new:Npn \@@_set_latin_scale:
-  { Scale = MatchLowercase , }
+\cs_new:Npn \@@_set_latin_sans_scale: { }
+\cs_new:Npn \@@_set_latin_mono_scale: { }
+\ctex_at_end_preamble:n
+  {
+    \tl_if_eq:NnTF \l_@@_latin_sans_scale_tl { upper }
+      { \cs_set:Npn \@@_set_latin_sans_scale: { Scale = MatchUppercase , } }
+      {
+        \tl_if_eq:NnT \l_@@_latin_sans_scale_tl { lower }
+          { \cs_set:Npn \@@_set_latin_sans_scale: { Scale = MatchLowercase , } }
+      }
+    \tl_if_eq:NnTF \l_@@_set_latin_mono_scale { upper }
+      { \cs_set:Npn \@@_set_latin_mono_scale: { Scale = MatchUppercase , } }
+      {
+        \tl_if_eq:NnT \l_@@_set_latin_mono_scale { lower }
+          { \cs_set:Npn \@@_set_latin_mono_scale: { Scale = MatchLowercase , } }
+      }
+  }
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\@@_off_latin_ligatures:}
@@ -2337,12 +2382,12 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
 \cs_new:Npn \@@_set_latin_sans_font:nnnnn #1#2#3#4#5
   {
     \str_if_eq:NNTF { \l_@@_font_type_tl } { font }
-      { \setsansfont { #1 } [ \@@_set_latin_scale: ] }
+      { \setsansfont { #1 } [ \@@_set_latin_sans_scale: ] }
       {
         \setsansfont { #2 }
           [
             \@@_font_path:
-            \@@_set_latin_scale:
+            \@@_set_latin_sans_scale:
             \@@_set_latin_font:nnn { #3 } { #4 } { #5 }
           ]
       }
@@ -2363,12 +2408,12 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
 \cs_new:Npn \@@_set_latin_mono_font:nnnnn #1#2#3#4#5
   {
     \str_if_eq:NNTF { \l_@@_font_type_tl } { font }
-      { \setmonofont { #1 } [ \@@_set_latin_scale: \@@_off_latin_ligatures: ] }
+      { \setmonofont { #1 } [ \@@_set_latin_mono_scale: \@@_off_latin_ligatures: ] }
       {
         \setmonofont { #2 }
           [
             \@@_font_path:
-            \@@_set_latin_scale:
+            \@@_set_latin_mono_scale:
             \@@_off_latin_ligatures:
             \@@_set_latin_font:nnn { #3 } { #4 } { #5 }
           ]
@@ -2409,7 +2454,7 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
   {
     \setsansfont { #1 }
       [
-        \@@_set_latin_scale:
+        \@@_set_latin_sans_scale:
         \@@_set_latin_font:nnn { #2 } { #3 } { #4 }
       ]
   }
@@ -2429,7 +2474,7 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
   {
     \setmonofont { #1 }
       [
-        \@@_set_latin_scale:
+        \@@_set_latin_mono_scale:
         \@@_off_latin_ligatures:
         \@@_set_latin_font:nnn { #2 } { #3 } { #4 }
       ]
@@ -7152,29 +7197,35 @@ literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
     \rmfamily \zihao { -4 }
     \dim_set:Nn \baselineskip { 20pt }
 %    \end{macrocode}
+% \changes{v4.2.0.0}{2023/01/28}{修改英文研究生学位论文标题命令参数格式}
 % \changes{v1.30.0.0}{2022/06/20}{英文研究生学位论文目录中正文一二三级中英双语标题}
 % 英文研究生学位论文目录中正文一二三级中英双语标题。
 %    \begin{macrocode}
     \@@_lang_switch:nn { }
       {
         \cs_new_eq:NN \@@_org_chapter:n \chapter
-        \RenewDocumentCommand { \chapter } { m m }
+        \RenewDocumentCommand { \chapter } { m o }
           {
             \@@_org_chapter:n { ##1 }
             \@@_add_zh_toc:nn { chapter }
-              { \numberline { 第 \chinese { chapter } 章 \hspace { .3em } } ##2 }
+              {
+                \numberline { 第 \chinese { chapter } 章 \hspace { .3em } }
+                \IfNoValueTF { ##2 } { ##1 } { ##2 }
+              }
           }
         \cs_new_eq:NN \@@_org_section:n \section
-        \RenewDocumentCommand { \section } { m m }
+        \RenewDocumentCommand { \section } { m o }
           {
             \@@_org_section:n { ##1 }
-            \@@_add_zh_toc:nn { section } { \numberline { \thesection } ##2 }
+            \@@_add_zh_toc:nn { section }
+              { \numberline { \thesection } \IfNoValueTF { ##2 } { ##1 } { ##2 } }
           }
         \cs_new_eq:NN \@@_org_subsection:n \subsection
-        \RenewDocumentCommand { \subsection } { m m }
+        \RenewDocumentCommand { \subsection } { m o }
           {
             \@@_org_subsection:n { ##1 }
-            \@@_add_zh_toc:nn { subsection } { \numberline { \thesubsection } ##2 }
+            \@@_add_zh_toc:nn { subsection }
+              { \numberline { \thesubsection } \IfNoValueTF { ##2 } { ##1 } { ##2 } }
           }
       }
 %    \end{macrocode}
-- 
cgit v1.2.3

