texlive[63219] Master/texmf-dist: xduts (3may22)

commits+karl at tug.org commits+karl at tug.org
Tue May 3 22:24:11 CEST 2022


Revision: 63219
          http://tug.org/svn/texlive?view=revision&revision=63219
Author:   karl
Date:     2022-05-03 22:24:11 +0200 (Tue, 03 May 2022)
Log Message:
-----------
xduts (3may22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/xelatex/xduts/README.md
    trunk/Master/texmf-dist/doc/xelatex/xduts/xduts.pdf
    trunk/Master/texmf-dist/source/xelatex/xduts/xduts.dtx
    trunk/Master/texmf-dist/source/xelatex/xduts/xduts.ins
    trunk/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty
    trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls

Modified: trunk/Master/texmf-dist/doc/xelatex/xduts/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xduts/README.md	2022-05-03 20:23:46 UTC (rev 63218)
+++ trunk/Master/texmf-dist/doc/xelatex/xduts/README.md	2022-05-03 20:24:11 UTC (rev 63219)
@@ -26,7 +26,7 @@
 Make sure the latest version of TeX Live/MacTeX is installed. Then, you can install XDUTS by running command below. If on Windows, it may be necessary to start a Command Prompt as an Administrator. If on macOS or GNU/Linux, please run the command with `sudo`.
 
 ```shell
-tlmgr update xduts
+tlmgr update --self xduts
 ```
 
 Run command below to open the documentation in TeX Live/MacTeX.
@@ -37,10 +37,11 @@
 
 #### MiKTeX
 
-You can install XDUTS by running command below.
+You can install/update XDUTS by running command below.
 
 ```shell
 miktex packages install xduts
+miktex packages update xduts
 ```
 
 Run command below to open the documentation.

Modified: trunk/Master/texmf-dist/doc/xelatex/xduts/xduts.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/xelatex/xduts/xduts.dtx
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/xduts/xduts.dtx	2022-05-03 20:23:46 UTC (rev 63218)
+++ trunk/Master/texmf-dist/source/xelatex/xduts/xduts.dtx	2022-05-03 20:24:11 UTC (rev 63219)
@@ -1,14 +1,16 @@
 % \iffalse
 %<*driver>
 \ProvidesFile{xduts.dtx}
-[2022/04/16 v1.2.0.0 Xidian University TeX Suite]
+[2022/05/03 v1.8.1.0 Xidian University TeX Suite]
 %</driver>
 %<class|sty>\NeedsTeXFormat{LaTeX2e}
 %<class|sty>\RequirePackage{expl3}
+%<xdufont>\ProvidesExplPackage{xdufont}
+%<xdupgthesis>\ProvidesExplClass{xdupgthesis}
 %<xduugthesis>\ProvidesExplClass{xduugthesis}
-%<xdufont>\ProvidesExplPackage{xdufont}
-%<class|sty>  {2022/04/16}{1.2.0.0}
+%<class|sty>  {2022/05/03}{1.8.1.0}
 %<xdufont>  {Xidian University Font package}
+%<xdupgthesis>  {Xidian University Postgraduate Thesis document class}
 %<xduugthesis>  {Xidian University Undergraduate Thesis document class}
 %<*driver>
 \documentclass{ctxdoc}
@@ -29,6 +31,7 @@
   }
 }
 \setcounter{tocdepth}{5}
+\ctexset{punct=quanjiao}
 \usepackage{hologo}
 \usepackage{fetamont}
 \usepackage{xurl}
@@ -57,7 +60,8 @@
 % [<name>] LaTeX2e可选参数
 \newcommand{\oargx}[1]{\xspace\Arg{#1}\xspace}
 % 文件
-\newcommand{\filex}[1]{\xspace\texttt{#1}\xspace}
+\usepackage{seqsplit}
+\newcommand{\filex}[1]{\xspace{\ttfamily\seqsplit{#1}}\xspace}
 % 环境
 \newcommand{\envx}[1]{\xspace\env{#1}\xspace}
 % 宏包
@@ -102,7 +106,7 @@
     framerule       = 1 pt,
     framesep        = 0 pt,
     xleftmargin     = 0 em,
-    xrightmargin    = 3 em,
+    xrightmargin    = 0 em,
     escapeinside    = {(*}{*)},
     breaklines      = true,
     basicstyle      = \small\ttfamily,
@@ -141,7 +145,7 @@
 \end{document}
 %</driver>
 % \fi
-% \CheckSum{1068}
+% \CheckSum{1195}
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
 %   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -165,8 +169,8 @@
 % \thispagestyle{empty}
 % \begin{abstract}
 % \xduts{}是面向西安电子科技大学本科生/研究生的\LaTeXiii{}文档类和宏包套装,
-% 支持\XeLaTeX{},
-% 支持\texlive{}、\mactex{}、\miktex{},
+% 仅支持\XeLaTeX{},
+% 仅支持\texlive{}、\mactex{}、\miktex{},
 % 支持Windows、macOS、GNU/Linux、Overleaf和TeXPage。
 % \end{abstract}
 % \renewcommand{\abstractname}{免责声明}
@@ -188,38 +192,45 @@
 % \section{介绍}
 % \xduts{} (Xidian University \TeX{} Suite)
 % 是为了帮助西安电子科技大学本科生/研究生撰写开题报告/学位论文及其他文档
-% 而编写的\LaTeX{}文档类和宏包套装,目前有:
+% 而编写的\LaTeXiii{}文档类和宏包套装,目前有:
 % \begin{itemize}
+% \item \pkgx{xdufont},中/英/数学字体配置宏包。
 % \item \clsx{xduugthesis},本科毕业设计论文。
-% \item \pkgx{xdufont},中/英/数学字体配置宏包。
 % \end{itemize}
+% 正在开发:
+% \begin{itemize}
+% \item \clsx{xdupgthesis},研究生学位论文。
+% \end{itemize}
 % 即将支持:
 % \begin{itemize}
+% \item \clsx{xdupgtp},研究生学位论文开题报告表。
 % \item \clsx{xduugtp},本科毕业设计论文开题报告表。
-% \item \clsx{xdupgthesis},研究生学位论文。
-% \item \clsx{xdupgtp},研究生学位论文开题报告表。
 % \end{itemize}
 % \par
-% 本文档将尽量完整的介绍\xduts{}的使用方法,
+% \changes{v1.2.0.1}{2022/04/19}{增加GitHub Discussions}
+% 本文档将尽量完整地介绍\xduts{}的使用方法,
 % 如有不清楚之处,或者想提出改进建议,
+% 可以在GitHub Discussions\footurl{https://github.com/note286/xduts/discussions/}
+% 参与讨论或提问。
+% 如确定\xduts{}存在bug,
 % 可以在GitHub Issues\footurl{https://github.com/note286/xduts/issues/}
-% 参与讨论或提问。另外,\textbf{不接受任何Pull Requests}。
+% 具体描述。另外,\textbf{不接受任何Pull Requests}。
 % \StopEventually{}
 % \section{使用说明}
 % \label{使用说明}
 % 《一份(不太)简短的\LaTeXe{}介绍》\footctan{info/lshort/chinese/lshort-zh-cn.pdf}
-% 中提及的内容本文档将不再提及。
-% \xduts{}中的所有文档类和宏包仅内置了实现功能所必要的宏包,
+% 中提及的内容本文档将不再赘述。
+% \xduts{}中的所有文档类和宏包仅内置了实现功能所需的宏包,
 % 对于常用的宏包如\pkgx{subfig}、\pkgx{algpseudocodex}、
 % \pkgx{amsmath}、\pkgx{amsthm}和\pkgx{siunitx}等\textbf{均未内置},
-% 用户视需求自行加载。
-% 请在最新版\LaTeX{}环境中使用最新版\xduts{},
-% 认真阅读相应文档类/宏包使用说明章节即可使用\xduts{}。
-% \par
+% 用户可以参考\secrefx{兼容性说明}后,视需求自行加载。
 % 相应格式规范均已实现,用户仅需要撰写文章内容即可,请勿随意添加格式修改命令。
 % \changes{v1.1.2.1}{2022/04/15}{增加默认值说明}
-% 部分样式的默认值并不严格符合学校规范,
+% \textbf{部分样式的默认值并不严格符合学校规范},
 % 用户可以结合学校规范并参考\secrefx{功能说明}功能说明自行修改。
+% \par
+% 请在最新版\LaTeX{}环境中使用最新版\xduts{},
+% 认真阅读相应文档类/宏包使用说明章节即可使用\xduts{}。
 % \subsection{xdufont}
 % \pkgx{xdufont}宏包基于\pkgx{xeCJK},相较于\pkgx{ctex}宏包的主要优势为默认支持宋体粗体、斜体,内置多种字体配置,可任意搭配中/英/数学字体,更加符合校内各种文档的撰写要求。
 % \par
@@ -234,13 +245,17 @@
 %   \end{document}
 % \end{latexexample}
 % \par
-% 学会以上用法后即可立即使用\pkgx{xdufont}宏包了。
+% 学会以上用法后即可使用\pkgx{xdufont}宏包。
+% \changes{v1.4.0.0}{2022/04/26}{新增研究生学位论文}
+% \subsection{xdupgthesis}
 % \subsection{xduugthesis}
 % \pkgx{xduugthesis}基于\clsx{ctexbook}文档类,
 % 提供多种字体配置,部分样式可自定义,信息录入便捷。
+% \changes{v1.3.1.1}{2022/04/26}{英文本科生毕业设计规范参考说明}
+% 论文语言为英文时,部分格式符合《外国语学院学士论文写作手册》。
 % 请在阅读《本科生毕业设计(论文)工作手册》后再使用\pkgx{xduugthesis}。
 % \par
-% 典型的\clsx{xduugthesis}主文件结构应该如下所示:
+% 典型的\clsx{xduugthesis}主文件结构如下所示:
 % \begin{latexexample}[moretexcs={\xdusetup,\frontmatter,\mainmatter,\chapter,\backmatter},emph={[1]document}]
 %   \documentclass{xduugthesis}
 %   \xdusetup{}
@@ -256,7 +271,6 @@
 % \secrefx{编译}介绍了如何编译,\secrefx{参数设置}介绍了如何自定义配置。
 % 其中,字体选项见\secrefx{字体选项},
 % 部分英文字体切换见\secrefx{英文字体},
-% 论文语言切换见\secrefx{语言配置},
 % 参考文献配置见\secrefx{参考文献配置},
 % 页面配置见\secrefx{页面配置},
 % 交叉引用配置见\secrefx{交叉引用配置},
@@ -288,7 +302,25 @@
 %   }
 % \end{latexexample}
 % \par
-% 学会以上用法后即可立即使用\clsx{xduugthesis}文档类了。
+% 学会以上用法后即可使用\clsx{xduugthesis}文档类。
+% \changes{v1.3.0.1}{2022/04/20}{增加兼容性说明}
+% \section{兼容性说明}
+% \label{兼容性说明}
+% \xduts{}对部分常见宏包进行了针对性地适配,
+% 需要注意的是,这些宏包仍需用户视需求自行加载。
+% \subsection{算法}
+% 主要适配算法内容字号和默认浮动位置。
+% \pkgx{algorithm}宏包提供了算法浮动体\envx{algorithm}环境,
+% 可以搭配\pkgx{algpseudocodex}等宏包使用。
+% \pkgx{algorithm2e}宏包提供了算法环境,
+% 该宏包提供的\envx{algorithm}环境实际将浮动体与算法内容合二为一。
+% \subsection{图片}
+% 主要适配子图caption字体字号,
+% \changes{v1.4.1.1}{2022/04/27}{修正子图适配宏包名称}
+% 包括\pkgx{subfig}宏包和\pkgx{subcaption}宏包。
+% \subsection{表格}
+% 主要适配表格内容字号,
+% 包括所有使用\envx{table}浮动体的表格和\pkgx{longtable}宏包提供的\envx{longtable}环境。
 % \section{功能说明}
 % \label{功能说明}
 % 请根据\secrefx{使用说明}中相应文档类/宏包的说明来选择性地阅读本节内容。
@@ -316,7 +348,7 @@
 % 它们可以按如下两种等价方式来设定:
 % \begin{latexexample}[morekeywords={\xdusetup},emph={[1]style,cjk-font,latin-font,info,title,author,department}]
 %   \xdusetup{
-%     style = {cjk-font = adobe, latin-font = tacn},
+%     style = { cjk-font = adobe, latin-font = tacn },
 %     info  = {
 %       title      = {论如何让用户认真阅读文档},
 %       author     = {张三},
@@ -374,7 +406,7 @@
 %   \begin{syntax}
 %     \optx{style/cjk-fake-bold}=\metax{伪粗体粗细程度}
 %   \end{syntax}
-% 设置中文字体伪粗体粗细程度。默认为\valuex{3},对于部分存在对应的粗体字体的中文字体,如FandolSong和FandolHei等,该选项不生效。
+% 设置中文字体伪粗体粗细程度。默认为\valuex{3},对于部分存在对应粗体字体的中文字体,如FandolSong和FandolHei等,该选项不生效。
 % \end{function}
 % \begin{function}[added=2022-04-01]{style/cjk-fake-slant}
 %   \begin{syntax}
@@ -489,7 +521,7 @@
 %   \begin{syntax}
 %     \optx{style/en-cjk-font}=\metax{true|(false)}
 %   \end{syntax}
-% 切换字体族时,英文是否使用中文字体。主要作用于封面、章节标题、caption、页眉页脚等。
+% 切换字体族时,英文是否使用中文字体。主要作用于封面、章节标题、caption、页眉页脚、参考文献列表等。
 % \end{function}
 % \begin{optdesc}
 %   \item[true] 英文使用相对应字体族的中文字体。
@@ -652,6 +684,16 @@
 % \end{function}
 % \subsection{信息录入}
 % \label{信息录入}
+% \begin{function}[added=2022-05-02]{info/graduate-type}
+%   \begin{syntax}
+%     \optx{info/graduate-type}=\metax{(master)|doctor}
+%   \end{syntax}
+% 设置研究生类型。
+% \end{function}
+% \begin{optdesc}
+%   \item[master] 硕士研究生。
+%   \item[doctor] 博士研究生。
+% \end{optdesc}
 % \begin{function}[added=2022-04-01]{info/title}
 %   \begin{syntax}
 %     \optx{info/title}=\argx{论文标题}
@@ -774,9 +816,11 @@
 % \begin{macro}{\PassOptionsToClass,\LoadClass}
 % 加载\clsx{ctexbook}文档类。
 % \changes{v0.3.2.0}{2022/04/04}{修正行间距为1.5倍}
+% \changes{v1.8.1.0}{2022/05/03}{修正页面尺寸}
 %    \begin{macrocode}
 \PassOptionsToClass
   {
+    a4paper,
     zihao=-4,
     sub4section,
     linespread = 1.5,
@@ -793,7 +837,7 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 %</class>
-%<*xduugthesis>
+%<*thesis>
 %    \end{macrocode}
 %    \begin{macrocode}
 \RequirePackage { fancyhdr        }
@@ -801,7 +845,7 @@
 \RequirePackage { graphicx        }
 %    \end{macrocode}
 %    \begin{macrocode}
-%</xduugthesis>
+%</thesis>
 %<*xdufont>
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -1609,9 +1653,10 @@
 % \end{macro}
 %    \begin{macrocode}
 %</class|xdufont>
-%<*xduugthesis>
+%<*thesis>
 %    \end{macrocode}
 % \subsection{信息录入}
+% \changes{v1.8.0.0}{2022/05/02}{拆分信息录入选项}
 % \begin{variable}
 %   {
 %     \l_@@_title_str,
@@ -1621,10 +1666,7 @@
 %     \l_@@_major_str,
 %     \l_@@_author_str,
 %     \l_@@_supv_str,
-%     \l_@@_supv_dept_str,
 %     \l_@@_supv_ent_str,
-%     \l_@@_supv_sch_str,
-%     \l_@@_class_id_str,
 %     \l_@@_student_id_str,
 %     \l_@@_abstract_zh_tl,
 %     \l_@@_abstract_en_tl,
@@ -1654,22 +1696,10 @@
 %    \begin{macrocode}
 \str_new:N \l_@@_supv_str
 %    \end{macrocode}
-% 院内导师姓名。
-%    \begin{macrocode}
-\str_new:N \l_@@_supv_dept_str
-%    \end{macrocode}
 % 校外导师姓名。
 %    \begin{macrocode}
 \str_new:N \l_@@_supv_ent_str
 %    \end{macrocode}
-% 校内导师姓名。
-%    \begin{macrocode}
-\str_new:N \l_@@_supv_sch_str
-%    \end{macrocode}
-% 作者班级号。
-%    \begin{macrocode}
-\str_new:N \l_@@_class_id_str
-%    \end{macrocode}
 % 作者学号。
 %    \begin{macrocode}
 \str_new:N \l_@@_student_id_str
@@ -1721,22 +1751,10 @@
 %    \begin{macrocode}
     supervisor .tl_set:N = \l_@@_supv_str,
 %    \end{macrocode}
-% 院内导师姓名。
-%    \begin{macrocode}
-    supervisor-department .tl_set:N = \l_@@_supv_dept_str,
-%    \end{macrocode}
 % 校外导师姓名。
 %    \begin{macrocode}
     supervisor-enterprise .tl_set:N = \l_@@_supv_ent_str,
 %    \end{macrocode}
-% 校内导师姓名。
-%    \begin{macrocode}
-    supervisor-school .tl_set:N = \l_@@_supv_sch_str,
-%    \end{macrocode}
-% 作者班级号。
-%    \begin{macrocode}
-    class-id .tl_set:N = \l_@@_class_id_str,
-%    \end{macrocode}
 % 作者学号。
 %    \begin{macrocode}
     student-id .tl_set:N = \l_@@_student_id_str,
@@ -1768,24 +1786,116 @@
 %    \begin{macrocode}
 \keys_set:nn { xdu }
   {
-    info  / title                 = { },
-    info  / department            = { },
-    info  / major                 = { },
-    info  / author                = { },
-    info  / supervisor            = { },
-    info  / supervisor-department = { },
-    info  / supervisor-enterprise = { },
-    info  / supervisor-school     = { },
-    info  / class-id              = { },
-    info  / student-id            = { },
-    info  / abstract              = { },
-    info  / abstract*             = { },
-    info  / keywords              = { },
-    info  / keywords*             = { },
-    info  / acknowledgements      = { }
+    info / title                 = { },
+    info / department            = { },
+    info / major                 = { },
+    info / author                = { },
+    info / supervisor            = { },
+    info / supervisor-enterprise = { },
+    info / student-id            = { },
+    info / abstract              = { },
+    info / abstract*             = { },
+    info / keywords              = { },
+    info / keywords*             = { },
+    info / acknowledgements      = { }
   }
 %    \end{macrocode}
 % \end{macro}
+%    \begin{macrocode}
+%<*xduugthesis>
+%    \end{macrocode}
+% \subsubsection{本科生}
+% \begin{variable}
+%   {
+%     \l_@@_supv_dept_str,
+%     \l_@@_supv_sch_str,
+%     \l_@@_class_id_str
+%   }
+% 院内导师姓名。
+%    \begin{macrocode}
+\str_new:N \l_@@_supv_dept_str
+%    \end{macrocode}
+% 校内导师姓名。
+%    \begin{macrocode}
+\str_new:N \l_@@_supv_sch_str
+%    \end{macrocode}
+% 作者班级号。
+%    \begin{macrocode}
+\str_new:N \l_@@_class_id_str
+%    \end{macrocode}
+% \end{variable}
+% \begin{macro}{\keys_define:nn}
+% 定义信息键值。
+%    \begin{macrocode}
+\keys_define:nn { xdu / info }
+  {
+%    \end{macrocode}
+% 院内导师姓名。
+%    \begin{macrocode}
+    supervisor-department .tl_set:N = \l_@@_supv_dept_str,
+%    \end{macrocode}
+% 校内导师姓名。
+%    \begin{macrocode}
+    supervisor-school .tl_set:N = \l_@@_supv_sch_str,
+%    \end{macrocode}
+% 作者班级号。
+%    \begin{macrocode}
+    class-id .tl_set:N = \l_@@_class_id_str
+  }
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\keys_set:nn}
+% 初始设置。
+%    \begin{macrocode}
+\keys_set:nn { xdu }
+  {
+    info / supervisor-department = { },
+    info / supervisor-school     = { },
+    info / class-id              = { }
+  }
+%    \end{macrocode}
+% \end{macro}
+%    \begin{macrocode}
+%</xduugthesis>
+%<*xdupgthesis>
+%    \end{macrocode}
+% \subsubsection{研究生}
+% \begin{variable}
+%   {
+%     \l_@@_gr_type_tl
+%   }
+% 研究生类型。
+%    \begin{macrocode}
+\tl_new:N \l_@@_gr_type_tl
+%    \end{macrocode}
+% \end{variable}
+% \begin{macro}{\keys_define:nn}
+% 定义信息键值。
+%    \begin{macrocode}
+\keys_define:nn { xdu / info }
+  {
+%    \end{macrocode}
+% 研究生类型。
+%    \begin{macrocode}
+    graduate-type .choices:nn = { master, doctor }
+      { \tl_set_eq:NN \l_@@_gr_type_tl \l_keys_choice_tl }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\keys_set:nn}
+% \changes{v1.7.1.0}{2022/05/02}{设置研究生类型默认值}
+% \changes{v1.7.2.0}{2022/05/02}{修正guard}
+% 初始设置。
+%    \begin{macrocode}
+\keys_set:nn { xdu }
+  {
+    info / graduate-type = { master },
+  }
+%    \end{macrocode}
+% \end{macro}
+%    \begin{macrocode}
+%</xdupgthesis>
+%    \end{macrocode}
 % \subsection{样式配置}
 % \begin{variable}
 %   {
@@ -1940,7 +2050,7 @@
 %    \end{macrocode}
 % \end{macro}
 %    \begin{macrocode}
-%</xduugthesis>
+%</thesis>
 %    \end{macrocode}
 %    \begin{macrocode}
 %<*class|xdufont>
@@ -1971,8 +2081,40 @@
 % \end{macro}
 %    \begin{macrocode}
 %</class|xdufont>
-%<*xduugthesis>
+%<*xdupgthesis>
 %    \end{macrocode}
+% \subsection{内部文本}
+% \begin{variable}{l_@@_header_str}
+% \changes{v1.7.0.0}{2022/05/02}{研究生页眉文本}
+% 研究生页眉文本。
+%    \begin{macrocode}
+\str_new:N \l_@@_header_str
+\ctex_at_end_preamble:n
+  {
+    \@@_lang_switch:nn
+      {
+        \tl_if_eq:NnTF \l_@@_gr_type_tl { master }
+          { \str_set:Nn \l_@@_header_str { 西安电子科技大学硕士学位论文 } }
+          { \str_set:Nn \l_@@_header_str { 西安电子科技大学博士学位论文 } }
+      }
+      {
+        \tl_if_eq:NnTF \l_@@_gr_type_tl { master }
+          {
+            \str_set:Nn \l_@@_header_str
+              { Master~Thesis~of~XIDIAN~UNIVERSITY }
+          }
+          {
+            \str_set:Nn \l_@@_header_str
+              { Doctoral~Dissertation~of~XIDIAN~UNIVERSITY }
+          }
+      }
+  }
+%    \end{macrocode}
+% \end{variable}
+%    \begin{macrocode}
+%</xdupgthesis>
+%<*thesis>
+%    \end{macrocode}
 % \subsection{内部函数}
 % \begin{macro}{\@@_lang_switch:nn}
 % 根据论文语言自动选择中文对应内容或英文对应内容。
@@ -2073,6 +2215,10 @@
 % \end{macro}
 % \begin{macro}{\@@_n_chapter_head_ii:nn}
 % 新建无编号章节并添加页眉和书签并单独设置标题样式。
+% \begin{arguments}
+%   \item 章节标题处。
+%   \item 章节标题样式。
+% \end{arguments}
 %    \begin{macrocode}
 \cs_new:Npn \@@_n_chapter_head_ii:nn #1#2
   {
@@ -2099,6 +2245,24 @@
   }
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{\@@_n_chapter_head_ii:nnn}
+% \changes{v1.2.1.0}{2022/04/19}{新建无编号章节并单独添加页眉和书签并单独设置标题样式}
+% 新建无编号章节并添加页眉和书签并单独设置标题样式,多用于章节标题为2个汉字的情况。
+% \begin{arguments}
+%   \item 章节标题处。
+%   \item 书签和页眉处。
+%   \item 章节标题样式。
+% \end{arguments}
+%    \begin{macrocode}
+\cs_new:Npn \@@_n_chapter_head_ii:nnn #1#2#3
+  {
+    {
+      \ctexset { chapter / format = { #3 } }
+      \@@_n_chapter_head:nn { #1 } { #2 }
+    }
+  }
+%    \end{macrocode}
+% \end{macro}
 % \begin{macro}{\@@_n_chapter_head_toc:n}
 % 新建无编号章节并添加目录及页眉。
 %    \begin{macrocode}
@@ -2155,10 +2319,17 @@
 % \subsection{页面设置}
 % \subsubsection{页面尺寸}
 % \begin{macro}{\geometry,\newgeometry,\savegeometry}
-% 正文页面:上3厘米、下2厘米、内侧3厘米、外侧2厘米;装订线1厘米;页眉2厘米;页脚1厘米。
+% \changes{v1.5.1.0}{2022/05/01}{修正页脚高度}
+% \changes{v1.5.2.0}{2022/05/02}{修正底部页边距高度}
+% 正文页面。
+% \begin{description}
+% \item[本科生] 上3、下2、内3、外2;装订线1;页眉2、页脚1。
+% \item[研究生] 上3、\textbf{下2.5}、内2.5、外2.5;装订线0.5;页眉2、页脚$2.5-1.75=0.75$。
+% \end{description}
 %    \begin{macrocode}
 \newgeometry
   {
+%<*xduugthesis>
     top           = 3cm,
     bottom        = 2cm,
     inner         = 3cm,
@@ -2166,13 +2337,30 @@
     bindingoffset = 1cm,
     head          = 2cm,
     foot          = 1cm
+%</xduugthesis>
+%<*xdupgthesis>
+    top           = 3cm,
+    bottom        = 2.5cm,
+    inner         = 2.5cm,
+    outer         = 2.5cm,
+    bindingoffset = 0.5cm,
+    head          = 2cm,
+    foot          = 0.75cm
+%</xdupgthesis>
   }
 \savegeometry { main }
 %    \end{macrocode}
-% 左右对称正文页面:上3厘米、下2厘米、内侧3厘米、外侧3厘米;页眉2厘米;页脚1厘米。
+% \changes{v1.5.1.0}{2022/05/01}{修正页脚高度}
+% \changes{v1.5.2.0}{2022/05/02}{修正底部页边距高度}
+% 左右对称正文页面。
+% \begin{description}
+% \item[本科生] 上3、下2、内3、外3;页眉2、页脚1。
+% \item[研究生] 上3、\textbf{下2.5}、内2.75、外2.75;页眉2、页脚$2.5-1.75=0.75$。
+% \end{description}
 %    \begin{macrocode}
 \newgeometry
   {
+%<*xduugthesis>
     top    = 3cm,
     bottom = 2cm,
     inner  = 3cm,
@@ -2179,18 +2367,39 @@
     outer  = 3cm,
     head   = 2cm,
     foot   = 1cm
+%</xduugthesis>
+%<*xdupgthesis>
+    top    = 3cm,
+    bottom = 2.5cm,
+    inner  = 2.75cm,
+    outer  = 2.75cm,
+    head   = 2cm,
+    foot   = 0.75cm
+%</xdupgthesis>
   }
 \savegeometry { main-sym }
 %    \end{macrocode}
-% 封面页面:上2.5厘米、下2厘米、内侧3厘米、外侧2厘米。
 % \changes{v0.10.3.0}{2022/04/14}{修复封面超页}
+% 封面页面。
+% \begin{description}
+% \item[本科生] 上2.5、下2、内3、外2。
+% \item[研究生] 上3、下2、内3、外2.5。
+% \end{description}
 %    \begin{macrocode}
 \newgeometry
   {
+%<*xduugthesis>
     top    = 2.5cm,
     bottom = 2cm,
     inner  = 3cm,
     outer  = 2cm
+%</xduugthesis>
+%<*xdupgthesis>
+    top    = 3cm,
+    bottom = 2cm,
+    inner  = 3cm,
+    outer  = 2.5cm
+%</xdupgthesis>
   }
 \savegeometry { cover }
 %    \end{macrocode}
@@ -2208,6 +2417,41 @@
 %    \end{macrocode}
 % \end{macro}
 % \subsubsection{页眉页脚}
+% \begin{macro}
+%   {
+%     \@@_chinese:,
+%     \@@_arabic:,
+%     \@@_roman:,
+%     \@@_Roman:,
+%     \@@_alph:,
+%     \@@_Alph:,
+%     \@@_fnsymbol:
+%   }
+% \changes{v1.2.2.0}{2022/04/20}{定义序号转换函数}
+% 定义序号转换函数。
+%    \begin{macrocode}
+\clist_map_inline:nn
+  {
+    { chinese  },
+    { arabic   },
+    { roman    },
+    { Roman    },
+    { alph     },
+    { Alph     },
+    { fnsymbol }
+  }
+  { \cs_new_eq:cc { @@ _ #1 : } { #1 } }
+%    \end{macrocode}
+% \end{macro}
+% \begin{variable}{\l_@@_chaptername}
+% \changes{v1.2.2.0}{2022/04/20}{页眉内部英文章节名}
+% 页眉内部英文章节名。
+%    \begin{macrocode}
+\tl_set:Nn \chaptername { Chapter }
+\tl_new:N \l_@@_chaptername
+\tl_set_eq:NN \l_@@_chaptername \chaptername
+%    \end{macrocode}
+% \end{variable}
 % \begin{macro}{\chaptermark}
 % 设置奇数页页眉为章标题。
 %    \begin{macrocode}
@@ -2217,7 +2461,7 @@
       {
         \@@_lang_switch:nn
           { \CTEXthechapter }
-          { \chaptername\space\Roman { chapter } }
+          { \l_@@_chaptername \space \@@_Roman: { chapter } }
         \quad #1
       }
       { }
@@ -2225,21 +2469,55 @@
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\fancypagestyle}
-% 设置正文页眉页脚。页眉:宋体五号,居中排列。左面页眉为论文题目,右面页眉为章次和章标题。页眉底划线的宽度为 0.75 磅。页码:宋体小五号,排在页眉行的最外侧,不加任何修饰。
 % \changes{v0.1.1.0}{2022/04/03}{修正页眉字号}
+% \changes{v1.6.0.0}{2022/05/02}{设置页脚页码}
+% \changes{v1.7.0.0}{2022/05/02}{设置页眉}
+% 设置正文页眉页脚。
+% \begin{description}
+% \item[本科生] 页眉:宋体五号,居中排列。左面页眉为论文题目,右面页眉为章次和章标题。页眉底划线的宽度为0.75磅。页码:宋体小五号,排在页眉行的最外侧,不加任何修饰。
+% \item[研究生] 页眉设置:单面页码页眉标题为章节题目,每一章节的起始页必须在单面页码,双面页码页眉标题统一为“西安电子科技大学博/硕士学位论文”,页眉标题居中排列,字体为宋体,字号为五号。页眉文字下添加双横线,双横线宽度为0.5磅。页眉的“西安电子科技大学博士/硕士学位论文”统一翻译成:Doctoral Dissertation of XIDIAN UNIVERSITY/Master Thesis of XIDIAN UNIVERSITY。页码设置:前置部分的页码用罗马数字标识,字体为Times New Roman,字号为小五号;主体部分的页码用阿拉伯数字标识,字体为宋体,字号为小五号。页码统一居于页面底端中部,不加任何修饰。
+% \end{description}
 %    \begin{macrocode}
 \fancypagestyle { plain }
   {
     \pagestyle { fancy }
     \fancyhf { }
+%<*xduugthesis>
     \fancyhead [ CE ] { \@@_rm_family: \zihao { 5  } \l_@@_pure_title_str }
     \fancyhead [ CO ] { \@@_rm_family: \zihao { 5  } \leftmark            }
     \fancyhead [ LE ] { \@@_rm_family: \zihao { -5 } \thepage             }
     \fancyhead [ RO ] { \@@_rm_family: \zihao { -5 } \thepage             }
     \renewcommand { \headrulewidth } { 0.75pt }
+%</xduugthesis>
+%<*xdupgthesis>
+    \fancyhead [ CE ] { \@@_rm_family: \zihao { 5  } \l_@@_header_str     }
+    \fancyhead [ CO ] { \@@_rm_family: \zihao { 5  } \leftmark            }
+    \fancyfoot [ CE ] { \@@_rm_family: \zihao { -5 } \thepage             }
+    \fancyfoot [ CO ] { \@@_rm_family: \zihao { -5 } \thepage             }
+    \cs_set:Npn \headrulewidth { 0.5pt }
+    \cs_set:Npn \headrule
+      {
+        \hrule \@height \headrulewidth
+        \skip_vertical:N \headrulewidth
+        \hrule \@height \headrulewidth
+        \skip_vertical:N -\headrulewidth
+      }
+%</xdupgthesis>
   }
+%<*xdupgthesis>
+\fancypagestyle { front }
+  {
+    \pagestyle { plain }
+    \fancyfoot [ CE ] { \rmfamily \zihao { -5 } \thepage }
+    \fancyfoot [ CO ] { \rmfamily \zihao { -5 } \thepage }
+  }
+%</xdupgthesis>
 %    \end{macrocode}
 % \end{macro}
+%    \begin{macrocode}
+%</thesis>
+%<*xduugthesis>
+%    \end{macrocode}
 % \subsection{标题设置}
 % 中文章标题黑体,三号,居中排列。节标题宋体,四号,居中排列。英文一级标题字体为Times New Roman,四号,正体,左对齐,以大写罗马数字(I、II 等)标出序号。其余各级标题的字体均为Times New Roman,小四号,正体。二级及以下级别的标题依次缩进4个英文字符,以1.1,1.2,1.1.1,1.1.2形式标出序号。
 % \subsubsection{章节层次}
@@ -2257,7 +2535,7 @@
   {
     chapter       / name =
       {
-        \@@_lang_switch:nn { 第 } { \chaptername\space },
+        \@@_lang_switch:nn { 第 } { \l_@@_chaptername \space },
         \@@_lang_switch:nn { 章 } { }
       },
     section       / name = { },
@@ -2270,21 +2548,34 @@
 % \end{macro}
 % \subsubsection{章节编号}
 % \begin{macro}{\ctexset}
+% \changes{v1.2.1.0}{2022/04/19}{修正英文论文标题序号}
 % 设置章节编号的数字输出格式。
 %    \begin{macrocode}
-\ctexset
+\ctex_at_end_preamble:n
   {
-    chapter       / number =
+    \@@_lang_switch:nn
       {
-        \@@_lang_switch:nn
-          { \chinese { chapter } }
-          { \Roman   { chapter } }
-      },
-    section       / number = { \thesection       },
-    subsection    / number = { \thesubsection    },
-    subsubsection / number = { \thesubsubsection },
-    paragraph     / number = { \theparagraph     },
-    subparagraph  / number = { \thesubparagraph  }
+        \ctexset
+          {
+            chapter       / number = { \chinese { chapter } },
+            section       / number = { \thesection          },
+            subsection    / number = { \thesubsection       },
+            subsubsection / number = { \thesubsubsection    },
+            paragraph     / number = { \theparagraph        },
+            subparagraph  / number = { \thesubparagraph     }
+          }
+      }
+      {
+        \ctexset
+          {
+            chapter       / number = { \Roman { chapter }           },
+            section       / number = { \thesection                  },
+            subsection    / number = { \thesubsection               },
+            subsubsection / number = { ( \roman { subsubsection } ) },
+            paragraph     / number = { ( \alph { paragraph } )      },
+            subparagraph  / number = { ( \arabic { subparagraph } ) }
+          }
+      }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -2307,15 +2598,23 @@
   }
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{\@@_en_t:nnn}
+% \changes{v1.2.1.0}{2022/04/19}{英文章节样式增加位置参数}
 % 设置英文章节名字和随后的标题内容格式。
-% \begin{macro}{\@@_en_t:nn}
 % \begin{arguments}
 %   \item 字号。
-%   \item 偏移量。
+%   \item 位置。
 % \end{arguments}
 %    \begin{macrocode}
 \cs_new:Npn \@@_en_t:nn #1#2
-  { \zihao { \use:c { l_@@_ #1 _tl } } \raggedright \skip_horizontal:n { #2 ex } }
+  {
+    \rmfamily
+    \zihao { \use:c { l_@@_ #1 _tl } }
+    \bfseries
+    \str_if_eq:ccTF { #2 } { c }
+      { \centering   }
+      { \raggedright }
+  }
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\ctexset}
@@ -2326,12 +2625,12 @@
   {
     \@@_lang_switch:nn
       {
-         \@@_tl_set_if_empty:Nn \l_@@_chap_tl      { 3 }
-         \@@_tl_set_if_empty:Nn \l_@@_sec_tl       { 4 }
-         \@@_tl_set_if_empty:Nn \l_@@_subsec_tl    { 4 }
-         \@@_tl_set_if_empty:Nn \l_@@_subsubsec_tl { 4 }
-         \@@_tl_set_if_empty:Nn \l_@@_para_tl      { 4 }
-         \@@_tl_set_if_empty:Nn \l_@@_subpara_tl   { 4 }
+        \@@_tl_set_if_empty:Nn \l_@@_chap_tl      { 3 }
+        \@@_tl_set_if_empty:Nn \l_@@_sec_tl       { 4 }
+        \@@_tl_set_if_empty:Nn \l_@@_subsec_tl    { 4 }
+        \@@_tl_set_if_empty:Nn \l_@@_subsubsec_tl { 4 }
+        \@@_tl_set_if_empty:Nn \l_@@_para_tl      { 4 }
+        \@@_tl_set_if_empty:Nn \l_@@_subpara_tl   { 4 }
         \ctexset
           {
             chapter       / format = { \@@_zh_t:nnn { sf } { chap      } { c } },
@@ -2343,8 +2642,8 @@
           }
       }
       {
-        \@@_tl_set_if_empty:Nn \l_@@_chap_tl      { 4  }
-        \@@_tl_set_if_empty:Nn \l_@@_sec_tl       { -4 }
+        \@@_tl_set_if_empty:Nn \l_@@_chap_tl      { 3  }
+        \@@_tl_set_if_empty:Nn \l_@@_sec_tl       { 4  }
         \@@_tl_set_if_empty:Nn \l_@@_subsec_tl    { -4 }
         \@@_tl_set_if_empty:Nn \l_@@_subsubsec_tl { -4 }
         \@@_tl_set_if_empty:Nn \l_@@_para_tl      { -4 }
@@ -2351,12 +2650,12 @@
         \@@_tl_set_if_empty:Nn \l_@@_subpara_tl   { -4 }
         \ctexset
           {
-            chapter       / format = { \@@_en_t:nn { chap      } { 0  } },
-            section       / format = { \@@_en_t:nn { sec       } { 4  } },
-            subsection    / format = { \@@_en_t:nn { subsec    } { 8  } },
-            subsubsection / format = { \@@_en_t:nn { subsubsec } { 12 } },
-            paragraph     / format = { \@@_en_t:nn { para      } { 16 } },
-            subparagraph  / format = { \@@_en_t:nn { subpara   } { 20 } }
+            chapter       / format = { \@@_en_t:nn { chap      } { c } },
+            section       / format = { \@@_en_t:nn { sec       } { l } },
+            subsection    / format = { \@@_en_t:nn { subsec    } { l } },
+            subsubsection / format = { \@@_en_t:nn { subsubsec } { l } },
+            paragraph     / format = { \@@_en_t:nn { para      } { l } },
+            subparagraph  / format = { \@@_en_t:nn { subpara   } { l } }
           }
       }
   }
@@ -2628,6 +2927,25 @@
   }
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{longtable}
+% \changes{v1.3.0.0}{2022/04/20}{设置\envx{longtable}环境字号是否为五号}
+% 设置\envx{longtable}环境字号是否为五号。
+%    \begin{macrocode}
+\ctex_at_end_preamble:n
+  {
+    \@ifpackageloaded { longtable }
+      {
+        \bool_if:NT \l_@@_tab_small_bool
+          {
+            \ctex_gadd_ltxhook:nn
+              { env/longtable/begin }
+              { \small }
+          }
+      }
+      { }
+  }
+%    \end{macrocode}
+% \end{macro}
 % \subsection{超链接和PDF元数据}
 % \begin{macro}{\hyperref}
 % 配置超链接和PDF元数据。
@@ -2712,10 +3030,14 @@
 % \changes{v0.3.1.0}{2022/04/04}{修正附录中图表编号样式}
 % \changes{v0.10.2.0}{2022/04/14}{修正附录中算法编号样式}
 % \changes{v0.10.4.0}{2022/04/14}{修正附录中\pkgx{algorithm2e}算法编号样式}
+% \changes{v1.2.2.0}{2022/04/20}{修正英文附录编号}
 %    \begin{macrocode}
 \RequirePackage { environ }
 \NewEnviron { appendixes }
   {
+    \cs_set:Npn \appendixname { \@@_lang_switch:nn { 附录 } { Appendix } }
+    \tl_set_eq:NN \l_@@_chaptername \appendixname
+    \cs_set_eq:NN \@@_Roman: \@@_Alph:
     \appendix
     \renewcommand { \thefigure } { \thechapter \arabic { figure } }
     \renewcommand { \thetable  } { \thechapter \arabic { table  } }
@@ -2728,6 +3050,7 @@
 %    \end{macrocode}
 % \end{macro}
 % \subsection{封面}
+% \subsubsection{本科生}
 % \begin{macro}{\@@_cover_i:nn}
 % 绘制班级和学号。
 % \begin{arguments}
@@ -2872,7 +3195,7 @@
 % \begin{macro}{\frontmatter}
 % 排版正文前部分。
 %    \begin{macrocode}
-\renewcommand{\frontmatter}
+\renewcommand { \frontmatter }
   {
     \loadgeometry { cover }
     \pagestyle    { empty }
@@ -2949,13 +3272,19 @@
     \pagestyle     { plain }
     \pagenumbering { Roman }
 %    \end{macrocode}
+% \changes{v1.2.1.0}{2022/04/19}{修正英文论文下中文摘要标题样式}
 % 中文摘要,宋体小四号。
 %    \begin{macrocode}
-    \@@_n_chapter_head:nn
-      { 摘要            }
-      { 摘 { \quad } 要 }
+    \@@_lang_switch:nn
+      { \@@_n_chapter_head:nn { 摘要 } { 摘 { \quad } 要 } }
+      {
+        \@@_n_chapter_head_ii:nnn
+          { 摘要 }
+          { 摘 { \quad } 要 }
+          { \@@_sf_family: \zihao { 3 } \centering }
+      }
     {
-      \dim_set:Nn \parindent { 2\ccwd }
+      \dim_set:Nn \parindent { 2 \ccwd }
       \rmfamily \zihao { -4 }
       \file_if_exist_input:n { \l_@@_abstract_zh_tl }
     }
@@ -2971,9 +3300,9 @@
 % 英文摘要,Times New Roman字体,小四号。
 % \changes{v0.4.3.0}{2022/04/05}{修正英文摘要标题字体}
 %    \begin{macrocode}
-    \@@_n_chapter_head_ii:nn {ABSTRACT} { \rmfamily \zihao{3} \bfseries \centering }
+    \@@_n_chapter_head_ii:nn {ABSTRACT} { \rmfamily \zihao { 3 } \bfseries \centering }
     {
-      \dim_set:Nn \parindent { 2\ccwd }
+      \dim_set:Nn \parindent { 2 \ccwd }
       \rmfamily \zihao { -4 }
       \file_if_exist_input:n { \l_@@_abstract_en_tl }
     }
@@ -2999,17 +3328,42 @@
   }
 %    \end{macrocode}
 % \end{macro}
+%    \begin{macrocode}
+%</xduugthesis>
+%<*xdupgthesis>
+%    \end{macrocode}
+% \subsubsection{研究生}
+% \begin{macro}{\frontmatter}
+% \changes{v1.5.0.0}{2022/05/01}{设置封面页边距}
+% \changes{v1.6.0.0}{2022/05/02}{设置页脚页码}
+% 排版正文前部分。
+%    \begin{macrocode}
+\renewcommand { \frontmatter }
+  {
+    \loadgeometry { cover }
+    \pagestyle    { empty }
+    \@@_load_main_geometry:
+    \pagestyle     { front }
+    \pagenumbering { Roman }
+  }
+%    \end{macrocode}
+% \end{macro}
+%    \begin{macrocode}
+%</xdupgthesis>
+%<*xduugthesis>
+%    \end{macrocode}
 % \subsection{正文}
+% \subsubsection{本科生}
 % \begin{macro}{\mainmatter}
 % \changes{v0.8.0.0}{2022/04/12}{支持对称页边距}
 % 排版正文部分。
 %    \begin{macrocode}
-\renewcommand{\mainmatter}
+\renewcommand { \mainmatter }
   {
     \@@_load_main_geometry:
     \pagestyle     { plain  }
     \pagenumbering { arabic }
-    \dim_set:Nn \parindent { 2\ccwd }
+    \dim_set:Nn \parindent { 2 \ccwd }
     \rmfamily \zihao { -4 }
   }
 %    \end{macrocode}
@@ -3017,7 +3371,7 @@
 % \begin{macro}{\backmatter}
 % 排版正文后部分。
 %    \begin{macrocode}
-\renewcommand{\backmatter}
+\renewcommand { \backmatter }
   {
 %    \end{macrocode}
 % \changes{v1.1.4.0}{2022/04/16}{为致谢章节标题增加间距}
@@ -3027,7 +3381,7 @@
       { \@@_lang_switch:nn { 致谢            } { Acknowledgements } }
       { \@@_lang_switch:nn { 致 { \quad } 谢 } { Acknowledgements } }
     {
-      \dim_set:Nn \parindent { 2\ccwd }
+      \dim_set:Nn \parindent { 2 \ccwd }
       \rmfamily \zihao { -4 }
       \file_if_exist_input:n { \l_@@_ack_tl }
     }
@@ -3035,16 +3389,21 @@
 % 参考文献。
 % \changes{v0.2.1.0}{2022/04/04}{参考文献添加至目录}
 % \changes{v0.5.2.0}{2022/04/07}{修正参考文献列表字体字号}
+% \changes{v1.3.1.0}{2022/04/21}{修复参考文献列表字体字号}
+% \changes{v1.4.1.0}{2022/04/27}{修复bibtex产生的多余参考文献列表章节}
 %    \begin{macrocode}
-    \@@_add_toc:n { \@@_lang_switch:nn { 参考文献 } { Bibliography } }
+    \cs_set:Npn \bibname { \@@_lang_switch:nn { 参考文献 } { Bibliography } }
+    \@@_n_chapter_head_toc:n { \bibname }
     {
       \tl_if_eq:NnTF \l_@@_bib_tool_tl { bibtex }
         {
+          \cs_set:Npn \bibsection { }
           \@@_rm_family: \zihao { 5 }
           \bibliography { \l_@@_bib_file_clist }
         }
         {
-          \renewcommand { \bibfont } { \@@_rm_family: \zihao { 5 } }
+          \defbibheading { bibliography } [ ] { }
+          \cs_set:Npn \bibfont { \@@_rm_family: \zihao { 5 } }
           \printbibliography
         }
     }
@@ -3055,6 +3414,26 @@
 %</xduugthesis>
 %    \end{macrocode}
 %    \begin{macrocode}
+%<*xdupgthesis>
+%    \end{macrocode}
+% \subsubsection{研究生}
+% \begin{macro}{\mainmatter}
+% \changes{v1.5.0.0}{2022/05/01}{设置正文页边距}
+% \changes{v1.6.0.0}{2022/05/02}{设置页脚页码}
+% 排版正文部分。
+%    \begin{macrocode}
+\renewcommand { \mainmatter }
+  {
+    \@@_load_main_geometry:
+    \pagestyle     { plain  }
+    \pagenumbering { arabic }
+  }
+%    \end{macrocode}
+% \end{macro}
+%    \begin{macrocode}
+%</xdupgthesis>
+%    \end{macrocode}
+%    \begin{macrocode}
 %<@@=>
 %    \end{macrocode}
 % \Finale

Modified: trunk/Master/texmf-dist/source/xelatex/xduts/xduts.ins
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/xduts/xduts.ins	2022-05-03 20:23:46 UTC (rev 63218)
+++ trunk/Master/texmf-dist/source/xelatex/xduts/xduts.ins	2022-05-03 20:24:11 UTC (rev 63219)
@@ -17,7 +17,7 @@
 The Current Maintainer of this work is @note286 in GitHub and CTAN.
 
 This work consists of the files README.md, xduts.dtx, and xduts.ins
-and the derived files xduts.pdf, xduugthesis.cls, and xdufont.sty.
+and the derived files xduts.pdf, xdufont.sty, xdupgthesis.cls, and xduugthesis.cls.
 
 The copyright of xidian-text.pdf and xidian-logo.pdf is Xidian University.
 
@@ -27,8 +27,9 @@
 \keepsilent
 \generate
   {
-    \file{xduugthesis.cls}{\from{\jobname.dtx}{class,xduugthesis}}
     \file{xdufont.sty}{\from{\jobname.dtx}{sty,xdufont}}
+    \file{xdupgthesis.cls}{\from{\jobname.dtx}{class,thesis,xdupgthesis}}
+    \file{xduugthesis.cls}{\from{\jobname.dtx}{class,thesis,xduugthesis}}
   }
 \nopreamble
 \nopostamble

Modified: trunk/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty	2022-05-03 20:23:46 UTC (rev 63218)
+++ trunk/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty	2022-05-03 20:24:11 UTC (rev 63219)
@@ -21,7 +21,7 @@
 %% The Current Maintainer of this work is @note286 in GitHub and CTAN.
 %% 
 %% This work consists of the files README.md, xduts.dtx, and xduts.ins
-%% and the derived files xduts.pdf, xduugthesis.cls, and xdufont.sty.
+%% and the derived files xduts.pdf, xdufont.sty, xdupgthesis.cls, and xduugthesis.cls.
 %% 
 %% The copyright of xidian-text.pdf and xidian-logo.pdf is Xidian University.
 %% 
@@ -28,7 +28,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
 \ProvidesExplPackage{xdufont}
-  {2022/04/16}{1.2.0.0}
+  {2022/05/03}{1.8.1.0}
   {Xidian University Font package}
 \RequirePackage { xparse, l3keys2e }
 \PassOptionsToPackage { quiet } { xeCJK }

Added: trunk/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls	2022-05-03 20:24:11 UTC (rev 63219)
@@ -0,0 +1,776 @@
+%%
+%% This is file `xdupgthesis.cls',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xduts.dtx  (with options: `class,thesis,xdupgthesis')
+%% 
+%% Copyright 2022--2022 by @note286 in GitHub and CTAN
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%% 
+%% This work has the LPPL maintenance status `author-maintained'.
+%% 
+%% The Current Maintainer of this work is @note286 in GitHub and CTAN.
+%% 
+%% This work consists of the files README.md, xduts.dtx, and xduts.ins
+%% and the derived files xduts.pdf, xdufont.sty, xdupgthesis.cls, and xduugthesis.cls.
+%% 
+%% The copyright of xidian-text.pdf and xidian-logo.pdf is Xidian University.
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{expl3}
+\ProvidesExplClass{xdupgthesis}
+  {2022/05/03}{1.8.1.0}
+  {Xidian University Postgraduate Thesis document class}
+\RequirePackage { xparse, l3keys2e }
+\PassOptionsToPackage { quiet } { xeCJK }
+\PassOptionsToClass
+  {
+    a4paper,
+    zihao=-4,
+    sub4section,
+    linespread = 1.5,
+    fontset    = none
+  }
+  { ctexbook }
+\LoadClass { ctexbook }
+\RequirePackage { geometry        }
+\geometry       { paper = a4paper }
+\RequirePackage { fancyhdr        }
+\RequirePackage { xeCJKfntef      }
+\RequirePackage { graphicx        }
+\tl_new:N \l__xdu_cjk_font_tl
+\tl_new:N \l__xdu_fake_bold_tl
+\tl_new:N \l__xdu_fake_slant_tl
+\tl_new:N \l__xdu_latin_font_tl
+\tl_new:N \l__xdu_math_font_tl
+\tl_new:N \l__xdu_unicode_math_tl
+\tl_new:N \l__xdu_font_type_tl
+\tl_new:N \l__xdu_font_path_tl
+\keys_define:nn { xdu / style }
+  {
+    cjk-font .choices:nn =
+      { win, adobe, founder, sinotype, fandol, none }
+      { \tl_set_eq:NN \l__xdu_cjk_font_tl \l_keys_choice_tl },
+    cjk-fake-bold .tl_set:N = \l__xdu_fake_bold_tl,
+    cjk-fake-slant .tl_set:N = \l__xdu_fake_slant_tl,
+    latin-font .choices:nn = { tacn, thcs, gyre, none }
+      { \tl_set_eq:NN \l__xdu_latin_font_tl \l_keys_choice_tl },
+    math-font .choices:nn =
+      {
+        asana, cambria, cm, fira, garamond, lm, libertinus, stix,
+        bonum, dejavu, pagella, schola, termes, xits, none
+      }
+      { \tl_set_eq:NN \l__xdu_math_font_tl \l_keys_choice_tl },
+    unicode-math .tl_set:N = \l__xdu_unicode_math_tl,
+    font-type .choices:nn = { font, file }
+      { \tl_set_eq:NN \l__xdu_font_type_tl \l_keys_choice_tl },
+    font-path .tl_set:N = \l__xdu_font_path_tl
+  }
+\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
+  }
+\cs_new:Npn \__xdu_if_platform_macos:FT #1#2
+  { \file_if_exist:nTF { /System/Library/Fonts/Menlo.ttc } { #2 } { #1 } }
+\cs_new:Npn \__xdu_texmf_font:nn #1#2
+  { \__xdu_if_platform_macos:FT { #1 } { #2 } }
+\cs_new:Npn \__xdu_select_font:nn #1#2
+  {
+    \str_if_eq:NNTF { \l__xdu_font_type_tl } { font }
+      { #1 }
+      { #2 }
+  }
+\cs_new:Npn \__xdu_font_path:
+  {
+    \str_if_eq:NNTF { \l__xdu_font_type_tl } { font }
+      { }
+      { Path = \l__xdu_font_path_tl / , }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_sub_b:n #1
+  {
+    BoldFont = { #1 }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_sub_fb:n #1
+  {
+    BoldFont     = { #1 },
+    BoldFeatures = { FakeBold = \l__xdu_fake_bold_tl }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_sub_fs:n #1
+  {
+    SlantedFont     = { #1 },
+    SlantedFeatures = { FakeSlant = \l__xdu_fake_slant_tl }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_sub_fbfs:n #1
+  {
+    BoldSlantedFont     = { #1 },
+    BoldSlantedFeatures =
+      {
+        FakeBold  = \l__xdu_fake_bold_tl,
+        FakeSlant = \l__xdu_fake_slant_tl
+      }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_sub_bfs:n #1
+  {
+    BoldSlantedFont     = { #1 },
+    BoldSlantedFeatures = { FakeSlant = \l__xdu_fake_slant_tl }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_sub_i:n #1
+  {
+    ItalicFont = { #1 }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_sub_fi:n #1
+  {
+    ItalicFont     = { #1 },
+    ItalicFeatures = { FakeSlant = \l__xdu_fake_slant_tl }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_sub_ifb:n #1
+  {
+    BoldItalicFont     = { #1 },
+    BoldItalicFeatures = { FakeBold = \l__xdu_fake_bold_tl }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_sub_fifb:n #1
+  {
+    BoldItalicFont     = { #1 },
+    BoldItalicFeatures =
+      {
+        FakeBold  = \l__xdu_fake_bold_tl,
+        FakeSlant = \l__xdu_fake_slant_tl
+      }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_r:n #1
+  {
+    \__xdu_cfg_cjk_font_sub_fb:n   { #1 },
+    \__xdu_cfg_cjk_font_sub_fs:n   { #1 },
+    \__xdu_cfg_cjk_font_sub_fbfs:n { #1 },
+    \__xdu_cfg_cjk_font_sub_fi:n   { #1 },
+    \__xdu_cfg_cjk_font_sub_fifb:n { #1 }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_rb:nn #1#2
+  {
+    \__xdu_cfg_cjk_font_sub_b:n    { #2 },
+    \__xdu_cfg_cjk_font_sub_fs:n   { #1 },
+    \__xdu_cfg_cjk_font_sub_bfs:n  { #2 },
+    \__xdu_cfg_cjk_font_sub_fi:n   { #1 },
+    \__xdu_cfg_cjk_font_sub_fifb:n { #1 }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_ri:nn #1#2
+  {
+    \__xdu_cfg_cjk_font_sub_fb:n   { #1 },
+    \__xdu_cfg_cjk_font_sub_fs:n   { #1 },
+    \__xdu_cfg_cjk_font_sub_fbfs:n { #1 },
+    \__xdu_cfg_cjk_font_sub_i:n    { #2 },
+    \__xdu_cfg_cjk_font_sub_ifb:n  { #2 }
+  }
+\cs_new:Npn \__xdu_cfg_cjk_font_rbi:nnn #1#2#3
+  {
+    \__xdu_cfg_cjk_font_sub_b:n   { #2 },
+    \__xdu_cfg_cjk_font_sub_fs:n  { #1 },
+    \__xdu_cfg_cjk_font_sub_bfs:n { #2 },
+    \__xdu_cfg_cjk_font_sub_i:n   { #3 },
+    \__xdu_cfg_cjk_font_sub_ifb:n { #3 }
+  }
+\cs_new:Npn \__xdu_set_cjk_main_font:nn #1#2
+  {
+    \setCJKmainfont { #1 }
+      [ \__xdu_font_path: \__xdu_cfg_cjk_font_ri:nn { #1 } { #2 } ]
+  }
+\cs_new:Npn \__xdu_set_cjk_main_font:nnn #1#2#3
+  {
+    \setCJKmainfont { #1 }
+      [ \__xdu_font_path: \__xdu_cfg_cjk_font_rbi:nnn { #1 } { #2 } { #3 } ]
+  }
+\cs_new:Npn \__xdu_set_cjk_sans_font:n #1
+  {
+    \setCJKsansfont { #1 }
+      [ \__xdu_font_path: \__xdu_cfg_cjk_font_r:n { #1 } ]
+  }
+\cs_new:Npn \__xdu_set_cjk_sans_font:nn #1#2
+  {
+    \setCJKsansfont { #1 }
+      [ \__xdu_font_path: \__xdu_cfg_cjk_font_rb:nn { #1 } { #2 } ]
+  }
+\cs_new:Npn \__xdu_set_cjk_mono_font:n #1
+  {
+    \setCJKmonofont { #1 }
+      [ \__xdu_font_path: \__xdu_cfg_cjk_font_r:n { #1 } ]
+  }
+\cs_new:Npn \__xdu_load_cjk_font_win:
+  {
+    \__xdu_set_cjk_main_font:nn
+      { \__xdu_select_font:nn { SimSun   } { simsun.ttc  } }
+      { \__xdu_select_font:nn { KaiTi    } { simkai.ttf  } }
+    \__xdu_set_cjk_sans_font:n
+      { \__xdu_select_font:nn { SimHei   } { simhei.ttf  } }
+    \__xdu_set_cjk_mono_font:n
+      { \__xdu_select_font:nn { FangSong } { simfang.ttf } }
+  }
+\cs_new:Npn \__xdu_load_cjk_font_adobe:
+  {
+    \__xdu_set_cjk_main_font:nn
+      { \__xdu_select_font:nn { Adobe~Song~Std     } { adobesongstd-light.otf        } }
+      { \__xdu_select_font:nn { Adobe~Kaiti~Std    } { adobekaitistd-regular.otf     } }
+    \__xdu_set_cjk_sans_font:n
+      { \__xdu_select_font:nn { Adobe~Heiti~Std    } { adobeheitistd-regular.otf     } }
+    \__xdu_set_cjk_mono_font:n
+      { \__xdu_select_font:nn { Adobe~Fangsong~Std } { Adobe-Fangsong-Std-R-Font.otf } }
+  }
+\cs_new:Npn \__xdu_load_cjk_font_founder:
+  {
+    \__xdu_set_cjk_main_font:nn
+      { \__xdu_select_font:nn { FZShuSong-Z01  } { FZShuSong-Z01.ttf } }
+      { \__xdu_select_font:nn { FZKai-Z03      } { FZKai-Z03.ttf     } }
+    \__xdu_set_cjk_sans_font:n
+      { \__xdu_select_font:nn { FZHei-B01      } { FZHei-B01.ttf     } }
+    \__xdu_set_cjk_mono_font:n
+      { \__xdu_select_font:nn { FZFangSong-Z02 } { FZFSK.TTF         } }
+  }
+\cs_new:Npn \__xdu_load_cjk_font_sinotype:
+  {
+    \__xdu_set_cjk_main_font:nn
+      { \__xdu_select_font:nn { STSong     } { STSONG.TTF   } }
+      { \__xdu_select_font:nn { STKaiti    } { STKAITI.TTF  } }
+    \__xdu_set_cjk_sans_font:nn
+      { \__xdu_select_font:nn { STXihei    } { STXIHEI.TTF  } }
+      { \__xdu_select_font:nn { STHeiti    } { STHeiti.ttf  } }
+    \__xdu_set_cjk_mono_font:n
+      { \__xdu_select_font:nn { STFangsong } { STFANGSO.TTF } }
+  }
+\cs_new:Npn \__xdu_load_cjk_font_fandol:
+  {
+    \__xdu_set_cjk_main_font:nnn
+      { FandolSong-Regular.otf }
+      { FandolSong-Bold.otf    }
+      { FandolKai-Regular.otf  }
+    \__xdu_set_cjk_sans_font:nn
+      { FandolHei-Regular.otf  }
+      { FandolHei-Bold.otf     }
+    \__xdu_set_cjk_mono_font:n
+      { FandolFang-Regular.otf }
+  }
+\cs_new:Npn \__xdu_load_cjk_font_none: { }
+\cs_new:Npn \__xdu_set_latin_font:nnn #1#2#3
+  {
+    BoldFont        = { #1 },
+    SlantedFont     = { #2 },
+    BoldSlantedFont = { #3 },
+    ItalicFont      = { #2 },
+    BoldItalicFont  = { #3 }
+  }
+\cs_new:Npn \__xdu_set_latin_scale:
+  { Scale = MatchLowercase , }
+\cs_new:Npn \__xdu_off_latin_ligatures:
+  { Ligatures = CommonOff , }
+\cs_new:Npn \__xdu_set_latin_main_font:nnnnn #1#2#3#4#5
+  {
+    \str_if_eq:NNTF { \l__xdu_font_type_tl } { font }
+      { \setmainfont { #1 } }
+      {
+        \setmainfont { #2 }
+          [
+            \__xdu_font_path:
+            \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 }
+          ]
+      }
+  }
+\cs_new:Npn \__xdu_set_latin_sans_font:nnnnn #1#2#3#4#5
+  {
+    \str_if_eq:NNTF { \l__xdu_font_type_tl } { font }
+      { \setsansfont { #1 } [ \__xdu_set_latin_scale: ] }
+      {
+        \setsansfont { #2 }
+          [
+            \__xdu_font_path:
+            \__xdu_set_latin_scale:
+            \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 }
+          ]
+      }
+  }
+\cs_new:Npn \__xdu_set_latin_mono_font:nnnnn #1#2#3#4#5
+  {
+    \str_if_eq:NNTF { \l__xdu_font_type_tl } { font }
+      { \setmonofont{ #1 } [ \__xdu_set_latin_scale: \__xdu_off_latin_ligatures: ]}
+      {
+        \setmonofont{ #2 }
+          [
+            \__xdu_font_path:
+            \__xdu_set_latin_scale:
+            \__xdu_off_latin_ligatures:
+            \__xdu_set_latin_font:nnn { #3 } { #4 } { #5 }
+          ]
+      }
+  }
+\cs_new:Npn \__xdu_set_latin_main_font:nnnn #1#2#3#4
+  {
+    \setmainfont { #1 }
+      [
+        \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 }
+      ]
+  }
+\cs_new:Npn \__xdu_set_latin_sans_font:nnnn #1#2#3#4
+  {
+    \setsansfont { #1 }
+      [
+        \__xdu_set_latin_scale:
+        \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 }
+      ]
+  }
+\cs_new:Npn \__xdu_set_latin_mono_font:nnnn #1#2#3#4
+  {
+    \setmonofont{ #1 }
+      [
+        \__xdu_set_latin_scale:
+        \__xdu_off_latin_ligatures:
+        \__xdu_set_latin_font:nnn { #2 } { #3 } { #4 }
+      ]
+  }
+\cs_new:Npn \__xdu_load_latin_font_tacn:
+  {
+    \__xdu_set_latin_main_font:nnnnn
+      { Times~New~Roman } { times.ttf } { timesbd.ttf } { timesi.ttf } { timesbi.ttf }
+    \__xdu_set_latin_sans_font:nnnnn
+      { Arial           } { arial.ttf } { arialbd.ttf } { ariali.ttf } { arialbi.ttf }
+    \__xdu_set_latin_mono_font:nnnnn
+      { Courier~New     } { cour.ttf  } { courbd.ttf  } { couri.ttf  } { courbi.ttf  }
+  }
+\cs_new:Npn \__xdu_load_latin_font_thcs:
+  {
+    \__xdu_set_latin_main_font:nnnnn
+      { Times~New~Roman            }
+      { times.ttf                  }
+      { timesbd.ttf                }
+      { timesi.ttf                 }
+      { timesbi.ttf                }
+    \__xdu_set_latin_sans_font:nnnnn
+      { Helvetica                  }
+      { Helvetica.ttf              }
+      { Helvetica~Bold.ttf         }
+      { Helvetica~Oblique.ttf      }
+      { Helvetica~Bold~Oblique.ttf }
+    \__xdu_set_latin_mono_font:nnnnn
+      { Courier~Std                }
+      { CourierStd.otf             }
+      { CourierStd-Bold.otf        }
+      { CourierStd-Oblique.otf     }
+      { CourierStd-BoldOblique.otf }
+  }
+\cs_new:Npn \__xdu_load_latin_font_gyre:
+  {
+    \__xdu_set_latin_main_font:nnnn
+      { texgyretermes-regular.otf    }
+      { texgyretermes-bold.otf       }
+      { texgyretermes-italic.otf     }
+      { texgyretermes-bolditalic.otf }
+    \__xdu_set_latin_sans_font:nnnn
+      { texgyreheros-regular.otf     }
+      { texgyreheros-bold.otf        }
+      { texgyreheros-italic.otf      }
+      { texgyreheros-bolditalic.otf  }
+    \__xdu_set_latin_mono_font:nnnn
+      { texgyrecursor-regular.otf    }
+      { texgyrecursor-bold.otf       }
+      { texgyrecursor-italic.otf     }
+      { texgyrecursor-bolditalic.otf }
+  }
+\cs_new:Npn \__xdu_load_latin_font_none: { }
+\cs_new:Npn \__xdu_load_unicode_math_pkg:
+  {
+    \RequirePackage
+      [ \l__xdu_unicode_math_tl ]
+      { unicode-math          }
+  }
+\cs_new:Npn \__xdu_load_math_font_cambria:
+  {
+    \__xdu_load_unicode_math_pkg:
+    \str_if_eq:NNTF { \l__xdu_font_type_tl} { font}
+      { \setmathfont { Cambria~Math} }
+      { \setmathfont { cambria.ttc} [ Path = \l__xdu_font_path_tl/, FontIndex = 1 ] }
+  }
+\cs_new:Npn \__xdu_define_math_font:nn #1#2
+  {
+    \cs_new:cpn { __xdu_load_math_font_ #1 : }
+      {
+        \__xdu_load_unicode_math_pkg:
+        \setmathfont { #2 }
+      }
+  }
+\clist_map_inline:nn
+  {
+    { asana      } { Asana-Math.otf             },
+    { fira       } { FiraMath-Regular.otf       },
+    { garamond   } { Garamond-Math.otf          },
+    { lm         } { latinmodern-math.otf       },
+    { libertinus } { LibertinusMath-Regular.otf },
+    { stix       } { STIXMath-Regular.otf       },
+    { bonum      } { texgyrebonum-math.otf      },
+    { dejavu     } { texgyredejavu-math.otf     },
+    { pagella    } { texgyrepagella-math.otf    },
+    { schola     } { texgyreschola-math.otf     },
+    { termes     } { texgyretermes-math.otf     }
+  }
+  { \__xdu_define_math_font:nn #1 }
+\cs_new:Npn \__xdu_load_math_font_xits:
+  {
+    \__xdu_load_unicode_math_pkg:
+    \__xdu_if_platform_macos:FT
+      {
+        \setmathfont { XITS~Math }
+      }
+      {
+        \__xdu_load_unicode_math_pkg:
+        \setmathfont { XITSMath-Regular.otf }
+        \setmathfont { XITSMath-Bold.otf    }
+          [range= { bfup -> up, bfit -> it } ]
+      }
+  }
+\cs_new:Npn \__xdu_load_math_font_cm: { }
+\cs_new:Npn \__xdu_load_math_font_none: { }
+\cs_new:Npn \__xdu_load_font:
+  {
+    \use:c { __xdu_load_cjk_font_   \l__xdu_cjk_font_tl   : }
+    \use:c { __xdu_load_latin_font_ \l__xdu_latin_font_tl : }
+    \use:c { __xdu_load_math_font_  \l__xdu_math_font_tl  : }
+  }
+\ctex_at_end_preamble:n { \__xdu_load_font: }
+\str_new:N \l__xdu_title_str
+\str_new:N \l__xdu_title_i_str
+\str_new:N \l__xdu_title_ii_str
+\str_new:N \l__xdu_dept_str
+\str_new:N \l__xdu_major_str
+\str_new:N \l__xdu_author_str
+\str_new:N \l__xdu_supv_str
+\str_new:N \l__xdu_supv_ent_str
+\str_new:N \l__xdu_student_id_str
+\tl_new:N \l__xdu_abstract_zh_tl
+\tl_new:N \l__xdu_abstract_en_tl
+\clist_new:N \l__xdu_keywords_zh_clist
+\clist_new:N \l__xdu_keywords_en_clist
+\tl_new:N \l__xdu_ack_tl
+\keys_define:nn { xdu / info }
+  {
+    title .tl_set:N = \l__xdu_title_str,
+    department .tl_set:N = \l__xdu_dept_str,
+    major .tl_set:N = \l__xdu_major_str,
+    author .tl_set:N = \l__xdu_author_str,
+    supervisor .tl_set:N = \l__xdu_supv_str,
+    supervisor-enterprise .tl_set:N = \l__xdu_supv_ent_str,
+    student-id .tl_set:N = \l__xdu_student_id_str,
+    abstract .tl_set:N = \l__xdu_abstract_zh_tl,
+    abstract* .tl_set:N = \l__xdu_abstract_en_tl,
+    keywords .clist_set:N = \l__xdu_keywords_zh_clist,
+    keywords* .clist_set:N = \l__xdu_keywords_en_clist,
+    acknowledgements .tl_set:N = \l__xdu_ack_tl
+  }
+\keys_set:nn { xdu }
+  {
+    info / title                 = { },
+    info / department            = { },
+    info / major                 = { },
+    info / author                = { },
+    info / supervisor            = { },
+    info / supervisor-enterprise = { },
+    info / student-id            = { },
+    info / abstract              = { },
+    info / abstract*             = { },
+    info / keywords              = { },
+    info / keywords*             = { },
+    info / acknowledgements      = { }
+  }
+\tl_new:N \l__xdu_gr_type_tl
+\keys_define:nn { xdu / info }
+  {
+    graduate-type .choices:nn = { master, doctor }
+      { \tl_set_eq:NN \l__xdu_gr_type_tl \l_keys_choice_tl }
+  }
+\keys_set:nn { xdu }
+  {
+    info / graduate-type = { master },
+  }
+\bool_new:N \l__xdu_en_cjk_font_bool
+\tl_new:N \l__xdu_lang_tl
+\tl_new:N \l__xdu_bib_tool_tl
+\clist_new:N \l__xdu_bib_file_clist
+\tl_new:N \l__xdu_ref_add_space
+\tl_new:N \l__xdu_cap_label_sep_tl
+\bool_new:N \l__xdu_tab_small_bool
+\bool_new:N \l__xdu_alg_small_bool
+\clist_new:N \l__xdu_before_skip_clist
+\clist_new:N \l__xdu_after_skip_clist
+\tl_new:N \l__xdu_chap_tl
+\tl_new:N \l__xdu_sec_tl
+\tl_new:N \l__xdu_subsec_tl
+\tl_new:N \l__xdu_subsubsec_tl
+\tl_new:N \l__xdu_para_tl
+\tl_new:N \l__xdu_subpara_tl
+\bool_new:N \l__xdu_sym_mgn_bool
+\keys_define:nn { xdu / style }
+  {
+    en-cjk-font .bool_set:N = \l__xdu_en_cjk_font_bool,
+    language .choices:nn = { zh, en }
+      { \tl_set_eq:NN \l__xdu_lang_tl \l_keys_choice_tl },
+    bib-backend .choices:nn = { bibtex, biblatex }
+      { \tl_set_eq:NN \l__xdu_bib_tool_tl \l_keys_choice_tl },
+    bib-resource .clist_set:N = \l__xdu_bib_file_clist,
+    ref-add-space .bool_set:N = \l__xdu_ref_add_space,
+    caption-label-sep .tl_set:N = \l__xdu_cap_label_sep_tl,
+    table-small-font .bool_set:N = \l__xdu_tab_small_bool,
+    algorithm-small-font .bool_set:N = \l__xdu_alg_small_bool,
+    before-skip .clist_set:N = \l__xdu_before_skip_clist,
+    after-skip .clist_set:N = \l__xdu_after_skip_clist,
+    chap-zihao .tl_set:N = \l__xdu_chap_tl,
+    sec-zihao .tl_set:N = \l__xdu_sec_tl,
+    subsec-zihao .tl_set:N = \l__xdu_subsec_tl,
+    subsubsec-zihao .tl_set:N = \l__xdu_subsubsec_tl,
+    para-zihao .tl_set:N = \l__xdu_para_tl,
+    subpara-zihao .tl_set:N = \l__xdu_subpara_tl,
+    symmetric-margin .bool_set:N = \l__xdu_sym_mgn_bool
+  }
+\keys_set:nn { xdu }
+  {
+    style / en-cjk-font          = false,
+    style / language             = zh,
+    style / bib-backend          = biblatex,
+    style / bib-resource         = { },
+    style / ref-add-space        = false,
+    style / caption-label-sep    = { 0.75em },
+    style / table-small-font     = true,
+    style / algorithm-small-font = true,
+    style / before-skip          = { 24pt, 18pt, 12pt, 12pt, 12pt, 12pt },
+    style / after-skip           = { 18pt, 12pt, 6pt, 6pt, 6pt, 6pt },
+    style / symmetric-margin     = false
+  }
+\NewDocumentCommand \xdusetup { m }
+  { \keys_set:nn { xdu } { #1 } }
+\keys_define:nn { xdu }
+  {
+    style .meta:nn = { xdu / style } { #1 },
+    info  .meta:nn = { xdu / info  } { #1 }
+  }
+\ProcessKeysOptions { xdu / style }
+\str_new:N \l__xdu_header_str
+\ctex_at_end_preamble:n
+  {
+    \__xdu_lang_switch:nn
+      {
+        \tl_if_eq:NnTF \l__xdu_gr_type_tl { master }
+          { \str_set:Nn \l__xdu_header_str { 西安电子科技大学硕士学位论文 } }
+          { \str_set:Nn \l__xdu_header_str { 西安电子科技大学博士学位论文 } }
+      }
+      {
+        \tl_if_eq:NnTF \l__xdu_gr_type_tl { master }
+          {
+            \str_set:Nn \l__xdu_header_str
+              { Master~Thesis~of~XIDIAN~UNIVERSITY }
+          }
+          {
+            \str_set:Nn \l__xdu_header_str
+              { Doctoral~Dissertation~of~XIDIAN~UNIVERSITY }
+          }
+      }
+  }
+\cs_new:Npn \__xdu_lang_switch:nn #1#2
+  {
+    \str_if_eq:NNTF { \l__xdu_lang_tl } { zh }
+      { #1 }
+      { #2 }
+  }
+\cs_new:Npn \__xdu_rm_family:
+  { \bool_if:NTF \l__xdu_en_cjk_font_bool { \CJKfamily+ { rm } } { \rmfamily } }
+\cs_new:Npn \__xdu_sf_family:
+  { \bool_if:NTF \l__xdu_en_cjk_font_bool { \CJKfamily+ { sf } } { \sffamily } }
+\cs_new:Npn \__xdu_tt_family:
+  { \bool_if:NTF \l__xdu_en_cjk_font_bool { \CJKfamily+ { tt } } { \ttfamily } }
+\ctex_at_end_preamble:n
+  {
+    \str_new:N \l__xdu_pure_title_str
+    \str_set_eq:NN \l__xdu_pure_title_str \l__xdu_title_str
+    \str_remove_all:Nn \l__xdu_pure_title_str { \\ }
+  }
+\cs_new:Npn \__xdu_uline:n #1
+  { \CJKunderline [ thickness = 0.5pt ] { #1 } }
+\cs_new:Npn \__xdu_tl_set_if_empty:Nn #1#2
+  { \tl_if_empty:NT #1 { \tl_set:Nn #1 { #2 } } }
+\cs_new:Npn \__xdu_get_text_width:Nn #1#2
+  {
+    \box_clear_new:N \l__xdu_tmp_box
+    \hbox_set:Nn \l__xdu_tmp_box { #2 }
+    \dim_set:Nn #1 { \box_wd:N \l__xdu_tmp_box }
+  }
+\cs_generate_variant:Nn \__xdu_get_text_width:Nn { NV }
+\cs_new:Npn \__xdu_add_bookmark:n #1
+  { \currentpdfbookmark { #1 } { #1 } }
+\cs_new:Npn \__xdu_add_toc:n #1
+  {
+    \cleardoublepage
+    \phantomsection
+    \addcontentsline { toc } { chapter } { #1 }
+  }
+\cs_new:Npn \__xdu_n_chapter_head:n #1
+  {
+    \__xdu_add_bookmark:n { #1 }
+    \chapter*          { #1 }
+    \markboth          { #1 } { }
+  }
+\cs_new:Npn \__xdu_n_chapter_head_ii:nn #1#2
+  {
+    {
+      \ctexset { chapter / format = { #2 } }
+      \__xdu_n_chapter_head:n { #1 }
+    }
+  }
+\cs_new:Npn \__xdu_n_chapter_head:nn #1#2
+  {
+    \__xdu_add_bookmark:n { #1 }
+    \chapter*          { #2 }
+    \markboth          { #1 } { }
+  }
+\cs_new:Npn \__xdu_n_chapter_head_ii:nnn #1#2#3
+  {
+    {
+      \ctexset { chapter / format = { #3 } }
+      \__xdu_n_chapter_head:nn { #1 } { #2 }
+    }
+  }
+\cs_new:Npn \__xdu_n_chapter_head_toc:n #1
+  {
+    \__xdu_add_toc:n { #1 }
+    \chapter* { #1 }
+    \markboth { #1 } { }
+  }
+\cs_new:Npn \__xdu_n_chapter_head_toc:nn #1#2
+  {
+    \__xdu_add_toc:n { #1 }
+    \chapter* { #2 }
+    \markboth { #1 } { }
+  }
+\cs_new:Npn \__xdu_typeout_keywords:nNn #1#2#3
+  {
+    \str_clear_new:N \l__xdu_keywords_label_str
+    \str_set:Nn \l__xdu_keywords_label_str { #1 }
+    \dim_zero_new:N \l__xdu_keywords_label_dim
+    \__xdu_get_text_width:NV \l__xdu_keywords_label_dim \l__xdu_keywords_label_str
+    \begin { list } { \l__xdu_keywords_label_str }
+      {
+        \labelwidth  \l__xdu_keywords_label_dim
+        \labelsep    \c_zero_dim
+        \rightmargin \c_zero_dim
+        \leftmargin  \l__xdu_keywords_label_dim
+      }
+      \item \clist_use:Nnnn #2 { #3 } { #3 } { #3 }
+    \end { list }
+  }
+\newgeometry
+  {
+    top           = 3cm,
+    bottom        = 2.5cm,
+    inner         = 2.5cm,
+    outer         = 2.5cm,
+    bindingoffset = 0.5cm,
+    head          = 2cm,
+    foot          = 0.75cm
+  }
+\savegeometry { main }
+\newgeometry
+  {
+    top    = 3cm,
+    bottom = 2.5cm,
+    inner  = 2.75cm,
+    outer  = 2.75cm,
+    head   = 2cm,
+    foot   = 0.75cm
+  }
+\savegeometry { main-sym }
+\newgeometry
+  {
+    top    = 3cm,
+    bottom = 2cm,
+    inner  = 3cm,
+    outer  = 2.5cm
+  }
+\savegeometry { cover }
+\cs_new:Npn \__xdu_load_main_geometry:
+  {
+    \bool_if:NTF \l__xdu_sym_mgn_bool
+      { \loadgeometry { main-sym } }
+      { \loadgeometry { main     } }
+  }
+\clist_map_inline:nn
+  {
+    { chinese  },
+    { arabic   },
+    { roman    },
+    { Roman    },
+    { alph     },
+    { Alph     },
+    { fnsymbol }
+  }
+  { \cs_new_eq:cc { __xdu _ #1 : } { #1 } }
+\tl_set:Nn \chaptername { Chapter }
+\tl_new:N \l__xdu_chaptername
+\tl_set_eq:NN \l__xdu_chaptername \chaptername
+\renewcommand { \chaptermark } [ 1 ]
+  {
+    \markboth
+      {
+        \__xdu_lang_switch:nn
+          { \CTEXthechapter }
+          { \l__xdu_chaptername \space \__xdu_Roman: { chapter } }
+        \quad #1
+      }
+      { }
+  }
+\fancypagestyle { plain }
+  {
+    \pagestyle { fancy }
+    \fancyhf { }
+    \fancyhead [ CE ] { \__xdu_rm_family: \zihao { 5  } \l__xdu_header_str     }
+    \fancyhead [ CO ] { \__xdu_rm_family: \zihao { 5  } \leftmark            }
+    \fancyfoot [ CE ] { \__xdu_rm_family: \zihao { -5 } \thepage             }
+    \fancyfoot [ CO ] { \__xdu_rm_family: \zihao { -5 } \thepage             }
+    \cs_set:Npn \headrulewidth { 0.5pt }
+    \cs_set:Npn \headrule
+      {
+        \hrule \@height \headrulewidth
+        \skip_vertical:N \headrulewidth
+        \hrule \@height \headrulewidth
+        \skip_vertical:N -\headrulewidth
+      }
+  }
+\fancypagestyle { front }
+  {
+    \pagestyle { plain }
+    \fancyfoot [ CE ] { \rmfamily \zihao { -5 } \thepage }
+    \fancyfoot [ CO ] { \rmfamily \zihao { -5 } \thepage }
+  }
+\renewcommand { \frontmatter }
+  {
+    \loadgeometry { cover }
+    \pagestyle    { empty }
+    \__xdu_load_main_geometry:
+    \pagestyle     { front }
+    \pagenumbering { Roman }
+  }
+\renewcommand { \mainmatter }
+  {
+    \__xdu_load_main_geometry:
+    \pagestyle     { plain  }
+    \pagenumbering { arabic }
+  }
+%% 
+%%
+%% End of file `xdupgthesis.cls'.


Property changes on: trunk/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls	2022-05-03 20:23:46 UTC (rev 63218)
+++ trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls	2022-05-03 20:24:11 UTC (rev 63219)
@@ -4,7 +4,7 @@
 %%
 %% The original source files were:
 %%
-%% xduts.dtx  (with options: `class,xduugthesis')
+%% xduts.dtx  (with options: `class,thesis,xduugthesis')
 %% 
 %% Copyright 2022--2022 by @note286 in GitHub and CTAN
 %% 
@@ -21,7 +21,7 @@
 %% The Current Maintainer of this work is @note286 in GitHub and CTAN.
 %% 
 %% This work consists of the files README.md, xduts.dtx, and xduts.ins
-%% and the derived files xduts.pdf, xduugthesis.cls, and xdufont.sty.
+%% and the derived files xduts.pdf, xdufont.sty, xdupgthesis.cls, and xduugthesis.cls.
 %% 
 %% The copyright of xidian-text.pdf and xidian-logo.pdf is Xidian University.
 %% 
@@ -28,12 +28,13 @@
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
 \ProvidesExplClass{xduugthesis}
-  {2022/04/16}{1.2.0.0}
+  {2022/05/03}{1.8.1.0}
   {Xidian University Undergraduate Thesis document class}
 \RequirePackage { xparse, l3keys2e }
 \PassOptionsToPackage { quiet } { xeCJK }
 \PassOptionsToClass
   {
+    a4paper,
     zihao=-4,
     sub4section,
     linespread = 1.5,
@@ -453,10 +454,7 @@
 \str_new:N \l__xdu_major_str
 \str_new:N \l__xdu_author_str
 \str_new:N \l__xdu_supv_str
-\str_new:N \l__xdu_supv_dept_str
 \str_new:N \l__xdu_supv_ent_str
-\str_new:N \l__xdu_supv_sch_str
-\str_new:N \l__xdu_class_id_str
 \str_new:N \l__xdu_student_id_str
 \tl_new:N \l__xdu_abstract_zh_tl
 \tl_new:N \l__xdu_abstract_en_tl
@@ -470,10 +468,7 @@
     major .tl_set:N = \l__xdu_major_str,
     author .tl_set:N = \l__xdu_author_str,
     supervisor .tl_set:N = \l__xdu_supv_str,
-    supervisor-department .tl_set:N = \l__xdu_supv_dept_str,
     supervisor-enterprise .tl_set:N = \l__xdu_supv_ent_str,
-    supervisor-school .tl_set:N = \l__xdu_supv_sch_str,
-    class-id .tl_set:N = \l__xdu_class_id_str,
     student-id .tl_set:N = \l__xdu_student_id_str,
     abstract .tl_set:N = \l__xdu_abstract_zh_tl,
     abstract* .tl_set:N = \l__xdu_abstract_en_tl,
@@ -483,22 +478,34 @@
   }
 \keys_set:nn { xdu }
   {
-    info  / title                 = { },
-    info  / department            = { },
-    info  / major                 = { },
-    info  / author                = { },
-    info  / supervisor            = { },
-    info  / supervisor-department = { },
-    info  / supervisor-enterprise = { },
-    info  / supervisor-school     = { },
-    info  / class-id              = { },
-    info  / student-id            = { },
-    info  / abstract              = { },
-    info  / abstract*             = { },
-    info  / keywords              = { },
-    info  / keywords*             = { },
-    info  / acknowledgements      = { }
+    info / title                 = { },
+    info / department            = { },
+    info / major                 = { },
+    info / author                = { },
+    info / supervisor            = { },
+    info / supervisor-enterprise = { },
+    info / student-id            = { },
+    info / abstract              = { },
+    info / abstract*             = { },
+    info / keywords              = { },
+    info / keywords*             = { },
+    info / acknowledgements      = { }
   }
+\str_new:N \l__xdu_supv_dept_str
+\str_new:N \l__xdu_supv_sch_str
+\str_new:N \l__xdu_class_id_str
+\keys_define:nn { xdu / info }
+  {
+    supervisor-department .tl_set:N = \l__xdu_supv_dept_str,
+    supervisor-school .tl_set:N = \l__xdu_supv_sch_str,
+    class-id .tl_set:N = \l__xdu_class_id_str
+  }
+\keys_set:nn { xdu }
+  {
+    info / supervisor-department = { },
+    info / supervisor-school     = { },
+    info / class-id              = { }
+  }
 \bool_new:N \l__xdu_en_cjk_font_bool
 \tl_new:N \l__xdu_lang_tl
 \tl_new:N \l__xdu_bib_tool_tl
@@ -616,6 +623,13 @@
     \chapter*          { #2 }
     \markboth          { #1 } { }
   }
+\cs_new:Npn \__xdu_n_chapter_head_ii:nnn #1#2#3
+  {
+    {
+      \ctexset { chapter / format = { #3 } }
+      \__xdu_n_chapter_head:nn { #1 } { #2 }
+    }
+  }
 \cs_new:Npn \__xdu_n_chapter_head_toc:n #1
   {
     \__xdu_add_toc:n { #1 }
@@ -679,6 +693,20 @@
       { \loadgeometry { main-sym } }
       { \loadgeometry { main     } }
   }
+\clist_map_inline:nn
+  {
+    { chinese  },
+    { arabic   },
+    { roman    },
+    { Roman    },
+    { alph     },
+    { Alph     },
+    { fnsymbol }
+  }
+  { \cs_new_eq:cc { __xdu _ #1 : } { #1 } }
+\tl_set:Nn \chaptername { Chapter }
+\tl_new:N \l__xdu_chaptername
+\tl_set_eq:NN \l__xdu_chaptername \chaptername
 \renewcommand { \chaptermark } [ 1 ]
   {
     \markboth
@@ -685,7 +713,7 @@
       {
         \__xdu_lang_switch:nn
           { \CTEXthechapter }
-          { \chaptername\space\Roman { chapter } }
+          { \l__xdu_chaptername \space \__xdu_Roman: { chapter } }
         \quad #1
       }
       { }
@@ -705,7 +733,7 @@
   {
     chapter       / name =
       {
-        \__xdu_lang_switch:nn { 第 } { \chaptername\space },
+        \__xdu_lang_switch:nn { 第 } { \l__xdu_chaptername \space },
         \__xdu_lang_switch:nn { 章 } { }
       },
     section       / name = { },
@@ -714,19 +742,31 @@
     paragraph     / name = { },
     subparagraph  / name = { }
   }
-\ctexset
+\ctex_at_end_preamble:n
   {
-    chapter       / number =
+    \__xdu_lang_switch:nn
       {
-        \__xdu_lang_switch:nn
-          { \chinese { chapter } }
-          { \Roman   { chapter } }
-      },
-    section       / number = { \thesection       },
-    subsection    / number = { \thesubsection    },
-    subsubsection / number = { \thesubsubsection },
-    paragraph     / number = { \theparagraph     },
-    subparagraph  / number = { \thesubparagraph  }
+        \ctexset
+          {
+            chapter       / number = { \chinese { chapter } },
+            section       / number = { \thesection          },
+            subsection    / number = { \thesubsection       },
+            subsubsection / number = { \thesubsubsection    },
+            paragraph     / number = { \theparagraph        },
+            subparagraph  / number = { \thesubparagraph     }
+          }
+      }
+      {
+        \ctexset
+          {
+            chapter       / number = { \Roman { chapter }           },
+            section       / number = { \thesection                  },
+            subsection    / number = { \thesubsection               },
+            subsubsection / number = { ( \roman { subsubsection } ) },
+            paragraph     / number = { ( \alph { paragraph } )      },
+            subparagraph  / number = { ( \arabic { subparagraph } ) }
+          }
+      }
   }
 \cs_new:Npn \__xdu_zh_t:nnn #1#2#3
   {
@@ -737,17 +777,24 @@
       { \raggedright }
   }
 \cs_new:Npn \__xdu_en_t:nn #1#2
-  { \zihao { \use:c { l__xdu_ #1 _tl } } \raggedright \skip_horizontal:n { #2 ex } }
+  {
+    \rmfamily
+    \zihao { \use:c { l__xdu_ #1 _tl } }
+    \bfseries
+    \str_if_eq:ccTF { #2 } { c }
+      { \centering   }
+      { \raggedright }
+  }
 \ctex_at_end_preamble:n
   {
     \__xdu_lang_switch:nn
       {
-         \__xdu_tl_set_if_empty:Nn \l__xdu_chap_tl      { 3 }
-         \__xdu_tl_set_if_empty:Nn \l__xdu_sec_tl       { 4 }
-         \__xdu_tl_set_if_empty:Nn \l__xdu_subsec_tl    { 4 }
-         \__xdu_tl_set_if_empty:Nn \l__xdu_subsubsec_tl { 4 }
-         \__xdu_tl_set_if_empty:Nn \l__xdu_para_tl      { 4 }
-         \__xdu_tl_set_if_empty:Nn \l__xdu_subpara_tl   { 4 }
+        \__xdu_tl_set_if_empty:Nn \l__xdu_chap_tl      { 3 }
+        \__xdu_tl_set_if_empty:Nn \l__xdu_sec_tl       { 4 }
+        \__xdu_tl_set_if_empty:Nn \l__xdu_subsec_tl    { 4 }
+        \__xdu_tl_set_if_empty:Nn \l__xdu_subsubsec_tl { 4 }
+        \__xdu_tl_set_if_empty:Nn \l__xdu_para_tl      { 4 }
+        \__xdu_tl_set_if_empty:Nn \l__xdu_subpara_tl   { 4 }
         \ctexset
           {
             chapter       / format = { \__xdu_zh_t:nnn { sf } { chap      } { c } },
@@ -759,8 +806,8 @@
           }
       }
       {
-        \__xdu_tl_set_if_empty:Nn \l__xdu_chap_tl      { 4  }
-        \__xdu_tl_set_if_empty:Nn \l__xdu_sec_tl       { -4 }
+        \__xdu_tl_set_if_empty:Nn \l__xdu_chap_tl      { 3  }
+        \__xdu_tl_set_if_empty:Nn \l__xdu_sec_tl       { 4  }
         \__xdu_tl_set_if_empty:Nn \l__xdu_subsec_tl    { -4 }
         \__xdu_tl_set_if_empty:Nn \l__xdu_subsubsec_tl { -4 }
         \__xdu_tl_set_if_empty:Nn \l__xdu_para_tl      { -4 }
@@ -767,12 +814,12 @@
         \__xdu_tl_set_if_empty:Nn \l__xdu_subpara_tl   { -4 }
         \ctexset
           {
-            chapter       / format = { \__xdu_en_t:nn { chap      } { 0  } },
-            section       / format = { \__xdu_en_t:nn { sec       } { 4  } },
-            subsection    / format = { \__xdu_en_t:nn { subsec    } { 8  } },
-            subsubsection / format = { \__xdu_en_t:nn { subsubsec } { 12 } },
-            paragraph     / format = { \__xdu_en_t:nn { para      } { 16 } },
-            subparagraph  / format = { \__xdu_en_t:nn { subpara   } { 20 } }
+            chapter       / format = { \__xdu_en_t:nn { chap      } { c } },
+            section       / format = { \__xdu_en_t:nn { sec       } { l } },
+            subsection    / format = { \__xdu_en_t:nn { subsec    } { l } },
+            subsubsection / format = { \__xdu_en_t:nn { subsubsec } { l } },
+            paragraph     / format = { \__xdu_en_t:nn { para      } { l } },
+            subparagraph  / format = { \__xdu_en_t:nn { subpara   } { l } }
           }
       }
   }
@@ -923,6 +970,19 @@
           { \end at float }
       }
   }
+\ctex_at_end_preamble:n
+  {
+    \@ifpackageloaded { longtable }
+      {
+        \bool_if:NT \l__xdu_tab_small_bool
+          {
+            \ctex_gadd_ltxhook:nn
+              { env/longtable/begin }
+              { \small }
+          }
+      }
+      { }
+  }
 \RequirePackage{hyperref}
 \hypersetup
   {
@@ -978,6 +1038,9 @@
 \RequirePackage { environ }
 \NewEnviron { appendixes }
   {
+    \cs_set:Npn \appendixname { \__xdu_lang_switch:nn { 附录 } { Appendix } }
+    \tl_set_eq:NN \l__xdu_chaptername \appendixname
+    \cs_set_eq:NN \__xdu_Roman: \__xdu_Alph:
     \appendix
     \renewcommand { \thefigure } { \thechapter \arabic { figure } }
     \renewcommand { \thetable  } { \thechapter \arabic { table  } }
@@ -1068,7 +1131,7 @@
           { \__xdu_cover_iii:nnnnn { 4em } { #1 } { #2 } { #3 } { #4 } }
       }
   }
-\renewcommand{\frontmatter}
+\renewcommand { \frontmatter }
   {
     \loadgeometry { cover }
     \pagestyle    { empty }
@@ -1115,11 +1178,16 @@
     \__xdu_load_main_geometry:
     \pagestyle     { plain }
     \pagenumbering { Roman }
-    \__xdu_n_chapter_head:nn
-      { 摘要            }
-      { 摘 { \quad } 要 }
+    \__xdu_lang_switch:nn
+      { \__xdu_n_chapter_head:nn { 摘要 } { 摘 { \quad } 要 } }
+      {
+        \__xdu_n_chapter_head_ii:nnn
+          { 摘要 }
+          { 摘 { \quad } 要 }
+          { \__xdu_sf_family: \zihao { 3 } \centering }
+      }
     {
-      \dim_set:Nn \parindent { 2\ccwd }
+      \dim_set:Nn \parindent { 2 \ccwd }
       \rmfamily \zihao { -4 }
       \file_if_exist_input:n { \l__xdu_abstract_zh_tl }
     }
@@ -1128,9 +1196,9 @@
       \__xdu_typeout_keywords:nNn { 关键词: } { \l__xdu_keywords_zh_clist } { \qquad }
     }
     \cleardoublepage
-    \__xdu_n_chapter_head_ii:nn {ABSTRACT} { \rmfamily \zihao{3} \bfseries \centering }
+    \__xdu_n_chapter_head_ii:nn {ABSTRACT} { \rmfamily \zihao { 3 } \bfseries \centering }
     {
-      \dim_set:Nn \parindent { 2\ccwd }
+      \dim_set:Nn \parindent { 2 \ccwd }
       \rmfamily \zihao { -4 }
       \file_if_exist_input:n { \l__xdu_abstract_en_tl }
     }
@@ -1146,33 +1214,36 @@
     \@starttoc { toc }
     \cleardoublepage
   }
-\renewcommand{\mainmatter}
+\renewcommand { \mainmatter }
   {
     \__xdu_load_main_geometry:
     \pagestyle     { plain  }
     \pagenumbering { arabic }
-    \dim_set:Nn \parindent { 2\ccwd }
+    \dim_set:Nn \parindent { 2 \ccwd }
     \rmfamily \zihao { -4 }
   }
-\renewcommand{\backmatter}
+\renewcommand { \backmatter }
   {
     \__xdu_n_chapter_head_toc:nn
       { \__xdu_lang_switch:nn { 致谢            } { Acknowledgements } }
       { \__xdu_lang_switch:nn { 致 { \quad } 谢 } { Acknowledgements } }
     {
-      \dim_set:Nn \parindent { 2\ccwd }
+      \dim_set:Nn \parindent { 2 \ccwd }
       \rmfamily \zihao { -4 }
       \file_if_exist_input:n { \l__xdu_ack_tl }
     }
-    \__xdu_add_toc:n { \__xdu_lang_switch:nn { 参考文献 } { Bibliography } }
+    \cs_set:Npn \bibname { \__xdu_lang_switch:nn { 参考文献 } { Bibliography } }
+    \__xdu_n_chapter_head_toc:n { \bibname }
     {
       \tl_if_eq:NnTF \l__xdu_bib_tool_tl { bibtex }
         {
+          \cs_set:Npn \bibsection { }
           \__xdu_rm_family: \zihao { 5 }
           \bibliography { \l__xdu_bib_file_clist }
         }
         {
-          \renewcommand { \bibfont } { \__xdu_rm_family: \zihao { 5 } }
+          \defbibheading { bibliography } [ ] { }
+          \cs_set:Npn \bibfont { \__xdu_rm_family: \zihao { 5 } }
           \printbibliography
         }
     }



More information about the tex-live-commits mailing list.