texlive[65243] Master/texmf-dist: xduts (11dec22)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 11 22:35:37 CET 2022


Revision: 65243
          http://tug.org/svn/texlive?view=revision&revision=65243
Author:   karl
Date:     2022-12-11 22:35:37 +0100 (Sun, 11 Dec 2022)
Log Message:
-----------
xduts (11dec22)

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/tex/xelatex/xduts/xdufont.sty
    trunk/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls
    trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls

Modified: trunk/Master/texmf-dist/doc/xelatex/xduts/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xduts/README.md	2022-12-11 21:35:17 UTC (rev 65242)
+++ trunk/Master/texmf-dist/doc/xelatex/xduts/README.md	2022-12-11 21:35:37 UTC (rev 65243)
@@ -53,6 +53,10 @@
 texdoc xduts
 ```
 
+#### Overleaf/TeXPage
+
+If you have installed LaTeX distribution locally, you can get the document class/package files and the documentation according to the [description below](#github). Otherwise, you need to download [the document class/package files](https://mirrors.cloud.tencent.com/CTAN/systems/texlive/tlnet/archive/xduts.tar.xz) and [the documentation](https://mirrors.cloud.tencent.com/CTAN/systems/texlive/tlnet/archive/xduts.doc.tar.xz) from CTAN. Finally, upload the document class/package files to the project on Overleaf/TeXPage.
+
 ### GitHub
 
 Generally speaking, CTAN updates XDUTS slowly. If you want to use the latest version of XDUTS, [download this repository](https://github.com/note286/xduts/archive/refs/heads/main.zip) and run the following command to get the document class/package files.

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-12-11 21:35:17 UTC (rev 65242)
+++ trunk/Master/texmf-dist/source/xelatex/xduts/xduts.dtx	2022-12-11 21:35:37 UTC (rev 65243)
@@ -1,7 +1,7 @@
 % \iffalse
 %<*driver>
 \ProvidesFile{xduts.dtx}
-[2022/12/06 v3.1.1.2 Xidian University TeX Suite]
+[2022/12/11 v4.0.1.0 Xidian University TeX Suite]
 %</driver>
 %<class|sty>\NeedsTeXFormat{LaTeX2e}
 %<class|sty>\RequirePackage{expl3}
@@ -8,7 +8,7 @@
 %<xdufont>\ProvidesExplPackage{xdufont}
 %<xdupgthesis>\ProvidesExplClass{xdupgthesis}
 %<xduugthesis>\ProvidesExplClass{xduugthesis}
-%<class|sty>  {2022/12/06}{3.1.1.2}
+%<class|sty>  {2022/12/11}{4.0.1.0}
 %<xdufont>  {Xidian University Font package}
 %<xdupgthesis>  {Xidian University Postgraduate Thesis document class}
 %<xduugthesis>  {Xidian University Undergraduate Thesis document class}
@@ -89,7 +89,7 @@
 \newcommand{\cmdx}[1]{\xspace{\ttfamily\seqsplit{#1}}\xspace}
 % 链接
 \newcommand{\footurl}[1]{\footnote{\url{#1}}}
-\newcommand{\ctanurl}[1]{\href{https://mirrors.ustc.edu.cn/CTAN/#1}{\ttfamily CTAN://#1}}
+\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}}
@@ -125,7 +125,7 @@
 texcs           = [2]{begin,end},
 texcs           = [3]{part,chapter,section,subsection,subsubsection,paragraph,subparagraph},
 texcs           = [4]{xdusetup,anon,noauxwrite},
-texcs           = [5]{textbf,textsl,textsf,frontmatter,mainmatter,backmatter,par,item,caption,parencite},
+texcs           = [5]{textbf,textsl,textsf,par,item,caption,parencite},
 emph            = [6]{document,tabular,edubg,resresult,appendixes},
 literate        = {\$}{{\textcolor{purple3}{\$}}}{1}
                   {\{}{{\textcolor{purple3}{\{}}}{1}
@@ -141,6 +141,8 @@
 \makeatother
 \RenewDocumentCommand{\floatpagefraction}{}{.8}
 \usepackage[nolinks]{qrcode}
+\usepackage{fontawesome5}
+\usepackage{tikz}
 \changes{v3.1.1.1}{2022/12/04}{手册首页增加水印}
 \usepackage[firstpageonly=true]{draftwatermark}
 \DraftwatermarkOptions{angle=45,fontsize=40pt,color={gray9!25}}
@@ -218,8 +220,9 @@
 % \label{使用说明}
 % 《一份(不太)简短的\LaTeXe{}介绍》\footctan{info/lshort/chinese/lshort-zh-cn.pdf}
 % 中提及的内容本文档将不再赘述。
+% 此外,在\secrefx{使用建议}中给出了部分使用建议。
 % \xduts{}中的所有文档类和宏包仅内置了实现功能所需的宏包,
-% 对于常用的宏包如\pkgx{subfig}、\pkgx{algpseudocodex}、
+% 对于常用的宏包如\pkgx{subcaption}、\pkgx{algpseudocodex}、
 % \pkgx{amsmath}、\pkgx{amsthm}和\pkgx{siunitx}等\textbf{均未内置},
 % 用户可以参考\secrefx{兼容性说明}后,视需求自行加载。
 % 相应格式规范均已实现,用户仅需要撰写文章内容即可,请勿随意添加格式修改命令。
@@ -228,7 +231,7 @@
 % 用户可以结合学校规范并参考\secrefx{功能说明}功能说明自行修改。
 % \par
 % 请在最新版\LaTeX{}环境中使用最新版\xduts{},
-% 认真阅读相应文档类/宏包使用说明章节即可使用\xduts{}。
+% 认真阅读相应文档类/宏包使用说明章节后即可使用\xduts{}。
 % \subsection{\pkgx{xdufont}宏包}
 % \pkgx{xdufont}宏包基于\pkgx{xeCJK}宏包和\pkgx{unicode-math}宏包,
 % 在中文字体配置方面相较于\pkgx{ctex}宏包的主要优势为默认支持宋体粗体、斜体,
@@ -257,16 +260,13 @@
 % 专业学位硕士请额外阅读《西安电子科技大学专业学位硕士学位论文封面及中英文题名页模板(2015年版)-2019.03修订》,
 % 撰写英文学位论文请额外阅读《西安电子科技大学英文学位论文撰写相关规定》。
 % \par
-% 一个典型的使用\clsx{xdupgthesis}文档类的\filex{.tex}主文件结构如下所示:
+% 使用\clsx{xdupgthesis}文档类的最小示例如下所示:
 % \begin{lstlisting}
 % \documentclass{xdupgthesis}
 % \xdusetup{}
 % \begin{document}
-% \frontmatter
-% \mainmatter
 % \chapter{欢迎}
 % 使用\LaTeX{}!
-% \backmatter
 % \end{document}
 % \end{lstlisting}
 % \par
@@ -286,7 +286,6 @@
 % 算法配置见\secrefx{算法配置},
 % 对照表配置见\secrefx{对照表配置},
 % 作者简介配置见\secrefx{作者简介配置}。
-% 如需附录,请使用附录环境,具体见\secrefx{附录环境}。
 % 支持的信息录入选项见\secrefx{信息录入}。
 % 页面和信息移除见\secrefx{页面和信息移除}。
 % \par
@@ -298,16 +297,13 @@
 % \changes{v1.3.1.1}{2022/04/26}{英文本科生毕业设计规范参考说明}
 % 请在阅读《本科生毕业设计(论文)工作手册》后再使用\pkgx{xduugthesis}文档类。
 % \par
-% 一个典型的使用\clsx{xduugthesis}文档类的\filex{.tex}主文件结构如下所示:
+% 使用\clsx{xduugthesis}文档类的最小示例如下所示:
 % \begin{lstlisting}
 % \documentclass{xduugthesis}
 % \xdusetup{}
 % \begin{document}
-% \frontmatter
-% \mainmatter
 % \chapter{欢迎}
 % 使用\LaTeX{}!
-% \backmatter
 % \end{document}
 % \end{lstlisting}
 % \par
@@ -326,7 +322,6 @@
 % 图表配置见\secrefx{图表配置},
 % 算法配置见\secrefx{算法配置},
 % 章节配置见\secrefx{章节配置},
-% 附录配置见\secrefx{附录环境},
 % 支持的信息录入选项见\secrefx{信息录入}。
 % \par
 % 学会以上用法后即可使用\clsx{xduugthesis}文档类。
@@ -352,6 +347,29 @@
 % 包括所有使用\envx{table}浮动体的表格、
 % \pkgx{tabularray}宏包提供的\envx{tblr}、\envx{longtblr}环境
 % 和\pkgx{longtable}宏包提供的\envx{longtable}环境。
+% \changes{v4.0.0.1}{2022/12/11}{增加使用建议}
+% \section{使用建议}
+% \label{使用建议}
+% 本节主要针对\pkgx{xduugthesis}和\pkgx{xduugthesis}文档类提出使用建议,
+% 用户仍可不遵守本节的建议并根据自己的偏好进行使用。
+% \par
+% 宏包方面,在\secrefx{兼容性说明}中提到已适配多种宏包。
+% 但是,由于各种原因,部分宏包已不建议使用。
+% 推荐使用\pkgx{algorithm}和\pkgx{algpseudocodex}宏包排版算法;
+% 推荐使用\pkgx{subcaption}宏包排版子图;
+% 推荐使用\pkgx{tabularray}宏包排版\textbf{所有的表格};
+% 推荐使用\pkgx{siunitx}宏包排版单位;
+% 推荐使用\pkgx{xurl}宏包实现链接自动折行。
+% 另外,不要加载任何与参考文献相关的宏包。
+% 使用宏包提供的功能时,\textbf{请阅读相应的宏包文档}。
+% \par
+% 字体方面,中文、英文和数学字体均提供了多种配置。
+% 对于中英文字体,用户可以根据自己的喜好选择合适的配置,
+% 部分配置对应的字体可能需要自行购买并安装。
+% 对于数学字体,强烈建议用户选择一个与中英文字体搭配的数学字体。
+% 注意,当使用非Computer Modern字体时,
+% 部分命令(例如,加粗等)可能与传统方式不同,
+% 请自行阅读\pkgx{unicode-math}文档。
 % \section{功能说明}
 % \label{功能说明}
 % 请根据\secrefx{使用说明}中相应文档类/宏包的说明来选择性地阅读本节内容。
@@ -956,24 +974,7 @@
 % \label{附录环境}
 % \changes{v1.29.0.0}{2022/06/19}{研究生学位论文附录环境}
 % \begin{function}[added=2022-04-04,updated=2022-06-19]{appendixes}
-% 本科生毕业设计附录位于参考文献后,即在\tnx{backmatter}后。
-% \begin{lstlisting}
-% \chapter{这是正文章节}
-% \backmatter
-% \begin{appendixes}
-%   \chapter{这是一个附录}
-%   \chapter{这是另一个附录}
-% \end{appendixes}
-% \end{lstlisting}
-% 研究生学位论文附录位于参考文献前,即在\tnx{backmatter}前。
-% \begin{lstlisting}
-% \chapter{这是正文章节}
-% \begin{appendixes}
-%   \chapter{这是一个附录}
-%   \chapter{这是另一个附录}
-% \end{appendixes}
-% \backmatter
-% \end{lstlisting}
+% 已弃用。
 % \end{function}
 % \subsection{信息录入}
 % \label{信息录入}
@@ -1041,6 +1042,7 @@
 % los                          &        &        & \cmark & \cmark & \cmark & \cmark \\
 % loa                          &        &        & \cmark & \cmark & \cmark & \cmark \\
 % bib-resource                 & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
+% appendix                     & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
 % acknowledgements             & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
 % bio                          &        &        & \cmark & \cmark & \cmark & \cmark \\
 % \end{tblr}
@@ -1247,6 +1249,13 @@
 %   \end{syntax}
 % 设置参考文献\filex{.bib}文件路径,多个文件之间需要使用英文半角逗号隔开。
 % \end{function}
+% \changes{v4.0.0.0}{2022/12/11}{增加附录文件接口}
+% \begin{function}[added=2022-12-11]{info/appendix}
+%   \begin{syntax}
+%     \optx{info/appendix}=\argx{附录文件路径}
+%   \end{syntax}
+% 设置附录文件路径,多个文件之间需要使用英文半角逗号隔开。
+% \end{function}
 % \begin{function}[added=2022-04-02]{info/acknowledgements}
 %   \begin{syntax}
 %     \optx{info/acknowledgements}=\argx{致谢文件路径}
@@ -1650,6 +1659,7 @@
 % 和《Good things come in little packages: An introduction to writing .ins and .dtx files》\footurl{https://www.tug.org/TUGboat/tb29-2/tb92pakin.pdf}
 % 提供了很大帮助。
 % 在文档的编写过程中,参考了\filex{ctex.dtx}、\filex{fduthesis.dtx}、\filex{njuthesis.dtx}和\filex{thuthesis.dtx}。
+% \changes{v3.1.1.3}{2022/12/10}{二维码增加图标}
 % \changes{v3.1.1.2}{2022/12/06}{增加QQ支付二维码}
 % \changes{v2.16.1.2}{2022/11/27}{修正文档中图片引用间距}
 % \changes{v2.15.0.1}{2022/11/26}{增加赞助二维码}
@@ -1656,13 +1666,6 @@
 % \section{赞助}
 % 如果觉得\xduts{}对您有所帮助,可以扫描\figrefx{fig:zanzhu}中的二维码来赞助\xduts{},赞助主要用于给作者补充营养。
 % \ExplSyntaxOn
-% \str_set_convert:Nnnn \l_xduts_qq_qr_str {%
-% 68747470733A2F2F692E7169616E62616F2E71712E636F6D2F77616C6C65742F737172636F64%
-% 652E68746D3F6D3D74656E70617926613D3126753D313138333133313434372661633D434145%
-% 517438365574415159343457366E415934414549675A4755775A6D51314D6A55784E3249354E%
-% 32566A4D4455794E445A684D32457A4D6A45325A6A55314E7A512533445F7878785F7369676E%
-% 266E3D4361726F6C26663D77616C6C6574 } { utf8/hex } { }
-% \newcommand{\qqqr}{\str_use:N \l_xduts_qq_qr_str}
 % \str_set_convert:Nnnn \l_xduts_alipay_qr_str {%
 % 68747470733A2F2F71722E616C697061792E636F6D2F666B7831353935393164716575747463%
 % 77626175726235} { utf8/hex } { }
@@ -1671,13 +1674,29 @@
 % 7778703A2F2F6632663074504D4D506D3161616467483665396162527030446E317746337344%
 % 6C6468764350382D66765346424577} { utf8/hex } { }
 % \newcommand{\wxpqr}{\str_use:N \l_xduts_wxp_qr_str}
+% \str_set_convert:Nnnn \l_xduts_qq_qr_str {%
+% 68747470733A2F2F692E7169616E62616F2E71712E636F6D2F77616C6C65742F737172636F64%
+% 652E68746D3F6D3D74656E70617926613D3126753D313138333133313434372661633D434145%
+% 517438365574415159343457366E415934414549675A4755775A6D51314D6A55784E3249354E%
+% 32566A4D4455794E445A684D32457A4D6A45325A6A55314E7A512533445F7878785F7369676E%
+% 266E3D4361726F6C26663D77616C6C6574 } { utf8/hex } { }
+% \newcommand{\qqqr}{\str_use:N \l_xduts_qq_qr_str}
 % \ExplSyntaxOff
-% \begin{figure}[h]
+% \definecolor{alipayc}{RGB}{22,120,255}
+% \definecolor{weixinc}{RGB}{7,193,96}
+% \definecolor{qqc}{RGB}{18,184,246}
+% \NewDocumentCommand{\qrcodex}{mmm}{
+% \begin{tikzpicture}
+% \node at (0,0) {\textcolor{#3!30}{\qrcode[height=4cm]{#1}}};
+% \node at (current bounding box.center) {\textcolor{#3}{\scalebox{3}{\faIcon{#2}}}};
+% \end{tikzpicture}
+% }
+% \begin{figure}[htbp]
 % \centering
 % \mbox{}\hfill
-% \subcaptionbox{支付宝}{\textcolor[RGB]{22,120,255}{\qrcode[height=4cm]{\alipayqr}}}\hfill
-% \subcaptionbox{微信支付}{\textcolor[RGB]{7,193,96}{\qrcode[height=4cm]{\wxpqr}}}\hfill
-% \subcaptionbox{QQ支付}{\textcolor[RGB]{18,184,246}{\qrcode[height=4cm]{\qqqr}}}
+% \subcaptionbox{支付宝}{\qrcodex{\alipayqr}{alipay}{alipayc}}\hfill
+% \subcaptionbox{微信支付}{\qrcodex{\wxpqr}{weixin}{weixinc}}\hfill
+% \subcaptionbox{QQ支付}{\qrcodex{\qqqr}{qq}{qqc}}
 % \hfill\mbox{}
 % \caption{赞助二维码}
 % \label{fig:zanzhu}
@@ -2563,6 +2582,7 @@
 %     \l_@@_keywords_zh_clist,
 %     \l_@@_keywords_en_clist,
 %     \l_@@_bib_file_clist,
+%     \l_@@_appendix_clist,
 %     \l_@@_ack_tl
 %   }
 % 论文标题。
@@ -2615,6 +2635,10 @@
 %    \begin{macrocode}
 \clist_new:N \l_@@_bib_file_clist
 %    \end{macrocode}
+% 附录。
+%    \begin{macrocode}
+\clist_new:N \l_@@_appendix_clist
+%    \end{macrocode}
 % 致谢。
 %    \begin{macrocode}
 \tl_new:N \l_@@_ack_tl
@@ -2674,6 +2698,10 @@
 %    \begin{macrocode}
     bib-resource .clist_set:N = \l_@@_bib_file_clist,
 %    \end{macrocode}
+% 附录。
+%    \begin{macrocode}
+    appendix .clist_set:N = \l_@@_appendix_clist,
+%    \end{macrocode}
 % 致谢。
 %    \begin{macrocode}
     acknowledgements .tl_set:N = \l_@@_ack_tl
@@ -2697,6 +2725,7 @@
     info / keywords              = { },
     info / keywords*             = { },
     info / bib-resource          = { },
+    info / appendix              = { },
     info / acknowledgements      = { }
   }
 %    \end{macrocode}
@@ -5323,7 +5352,7 @@
 %    \end{macrocode}
 % \end{macro}
 % \subsection{附录}
-% \begin{macro}{appendixes}
+% \begin{macro}{\@@_appendix:}
 % 附录环境。
 % \changes{v0.3.0.0}{2022/04/04}{新增附录环境}
 % \changes{v0.3.1.0}{2022/04/04}{修正附录中图表编号样式}
@@ -5331,8 +5360,7 @@
 % \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_new:Npn \@@_appendix:
   {
     \cs_set:Npn \appendixname { \@@_lang_switch:nn { 附录 } { Appendix } }
     \tl_set_eq:NN \l_@@_chaptername \appendixname
@@ -5344,25 +5372,25 @@
       { \cs_set:Npn \thealgorithm { \thechapter \arabic { algorithm } } }
     \cs_if_exist:NT \thealgocf
       { \cs_set:Npn \thealgocf { \thechapter \arabic { algocf } } }
-    \BODY
+    \bool_if_exist:NTF \l_@@_rm_appendix_bool
+      {
+        \bool_if:NF \l_@@_rm_appendix_bool
+          {
+            \clist_map_inline:Nn \l_@@_appendix_clist
+              { \file_if_exist_input:n { ##1 } }
+          }
+      }
+      {
+        \clist_map_inline:Nn \l_@@_appendix_clist
+          { \file_if_exist_input:n { ##1 } }
+      }
   }
 %    \end{macrocode}
 %    \begin{macrocode}
 %</thesis>
-%<*xdupgthesis>
 %    \end{macrocode}
-% \changes{v2.7.0.0}{2022/06/26}{研究生学位论文支持移除附录}
-% 研究生学位论文支持移除附录。
-%    \begin{macrocode}
-\ctex_at_end_preamble:n
-  {
-    \bool_if:NT \l_@@_rm_appendix_bool
-      { \RenewEnviron { appendixes } { } }
-  }
-%    \end{macrocode}
 % \end{macro}
 %    \begin{macrocode}
-%</xdupgthesis>
 %<*xduugthesis>
 %    \end{macrocode}
 % \changes{v1.26.7.1}{2022/06/12}{整理代码结构}
@@ -5492,12 +5520,13 @@
   }
 %    \end{macrocode}
 % \end{macro}
-% \paragraph{\tn{frontmatter}}
-% \begin{macro}{\frontmatter}
+% \paragraph{重定义\tn{frontmatter}}
+% \begin{macro}{\frontmatter,\@@_frontmatter:}
 % \changes{v1.9.1.0}{2022/05/04}{修正封面元素位置及尺寸}
 % 排版前言部分。
 %    \begin{macrocode}
-\renewcommand { \frontmatter }
+\RenewDocumentCommand { \frontmatter } { } { }
+\cs_new:Npn \@@_frontmatter:
   {
     \loadgeometry { cover }
     \pagestyle    { empty }
@@ -6774,8 +6803,8 @@
   }
 %    \end{macrocode}
 % \end{macro}
-% \paragraph{\tn{frontmatter}}
-% \begin{macro}{\frontmatter}
+% \paragraph{重定义\tn{frontmatter}}
+% \begin{macro}{\frontmatter,\@@_frontmatter:}
 % \changes{v1.5.0.0}{2022/05/01}{设置封面页边距}
 % \changes{v1.6.0.0}{2022/05/02}{设置页脚页码}
 % \changes{v1.16.0.0}{2022/05/22}{绘制研究生封面}
@@ -6782,7 +6811,8 @@
 % \changes{v2.7.0.0}{2022/06/26}{研究生学位论文支持移除前言部分页面}
 % 排版前言部分。
 %    \begin{macrocode}
-\renewcommand { \frontmatter }
+\RenewDocumentCommand { \frontmatter } { } { }
+\cs_new:Npn \@@_frontmatter:
   {
     \loadgeometry { cover }
     \pagestyle    { empty }
@@ -6903,11 +6933,12 @@
 %    \end{macrocode}
 % \subsection{正文部分}
 % \subsubsection{本科生}
-% \begin{macro}{\mainmatter}
+% \begin{macro}{\mainmatter,\@@_mainmatter:}
 % \changes{v0.8.0.0}{2022/04/12}{支持对称页边距}
 % 排版正文部分。
 %    \begin{macrocode}
-\renewcommand { \mainmatter }
+\RenewDocumentCommand { \mainmatter } { } { }
+\cs_new:Npn \@@_mainmatter:
   {
     \@@_load_main_geometry:
     \pagestyle     { plain  }
@@ -6922,7 +6953,7 @@
 %<*xdupgthesis>
 %    \end{macrocode}
 % \subsubsection{研究生}
-% \begin{macro}{\mainmatter}
+% \begin{macro}{\mainmatter,\@@_mainmatter:}
 % \changes{v1.5.0.0}{2022/05/01}{设置正文页边距}
 % \changes{v1.6.0.0}{2022/05/02}{设置页脚页码}
 % \changes{v1.23.1.0}{2022/06/05}{设置正文字号和行间距}
@@ -6929,7 +6960,8 @@
 % \changes{v2.10.3.0}{2022/06/28}{修正公式与正文间距}
 % 排版正文部分。
 %    \begin{macrocode}
-\renewcommand { \mainmatter }
+\RenewDocumentCommand { \mainmatter } { } { }
+\cs_new:Npn \@@_mainmatter:
   {
     \@@_load_main_geometry:
     \pagestyle     { plain  }
@@ -6979,10 +7011,11 @@
 %    \end{macrocode}
 % \subsection{后记部分}
 % \subsubsection{本科生}
-% \begin{macro}{\backmatter}
+% \begin{macro}{\backmatter,\@@_backmatter:}
 % 排版后记部分。
 %    \begin{macrocode}
-\renewcommand { \backmatter }
+\RenewDocumentCommand { \backmatter } { } { }
+\cs_new:Npn \@@_backmatter:
   {
 %    \end{macrocode}
 % \changes{v1.1.4.0}{2022/04/16}{为致谢章节标题增加间距}
@@ -7017,6 +7050,10 @@
         }
         { \printbibliography }
     \group_end:
+%    \end{macrocode}
+% 本科生毕业设计附录。
+%    \begin{macrocode}
+    \@@_appendix:
   }
 %    \end{macrocode}
 % \end{macro}
@@ -7081,12 +7118,17 @@
 %    \end{macrocode}
 % \end{macro}
 % \changes{v2.7.0.0}{2022/06/26}{研究生学位论文支持移除后记部分页面}
-% \begin{macro}{\backmatter}
+% \begin{macro}{\backmatter,\@@_backmatter:}
 % 排版后记部分。
 %    \begin{macrocode}
-\renewcommand { \backmatter }
+\RenewDocumentCommand { \backmatter } { } { }
+\cs_new:Npn \@@_backmatter:
   {
 %    \end{macrocode}
+% 研究生学位论文附录。
+%    \begin{macrocode}
+    \@@_appendix:
+%    \end{macrocode}
 % \changes{v1.30.0.0}{2022/06/20}{恢复英文研究生学位论文后记一二三级标题命令}
 % 恢复英文研究生学位论文后记一二三级标题命令。
 %    \begin{macrocode}
@@ -7157,6 +7199,7 @@
           \rmfamily \zihao { -4 }
           \dim_set:Nn \baselineskip { 20pt }
 %    \end{macrocode}
+% \changes{v4.0.1.0}{2022/12/11}{兼容\pkgx{calc}包}
 % 配置作者简介部分标题样式。
 %    \begin{macrocode}
           \ctexset
@@ -7168,7 +7211,7 @@
                 subsection / indent = { \l_@@_bio_indent_dim }
             }
           \setcounter { section } { 0 }
-          \addtocontents { toc } { \setcounter { tocdepth } { 0 } }
+          \addtocontents { toc } { \protect \setcounter { tocdepth } { 0 } }
 %    \end{macrocode}
 % 作者简介文件。
 %    \begin{macrocode}
@@ -7180,8 +7223,19 @@
 % \end{macro}
 %    \begin{macrocode}
 %</xdupgthesis>
+%<*thesis>
 %    \end{macrocode}
+% \section{前言、正文和后记部分}
+% \changes{v4.0.0.0}{2022/12/11}{本科生毕业设计和研究生学位论文添加前言、正文和后记部分}
+% 本科生毕业设计和研究生学位论文添加前言、正文和后记部分。
 %    \begin{macrocode}
+\ctex_after_end_preamble:n { \@@_frontmatter: \@@_mainmatter: }
+\AtEndDocument             { \@@_backmatter:                  }
+%    \end{macrocode}
+%    \begin{macrocode}
+%</thesis>
+%    \end{macrocode}
+%    \begin{macrocode}
 %<@@=>
 %    \end{macrocode}
 % \end{implementation}

Modified: trunk/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty	2022-12-11 21:35:17 UTC (rev 65242)
+++ trunk/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty	2022-12-11 21:35:37 UTC (rev 65243)
@@ -28,7 +28,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
 \ProvidesExplPackage{xdufont}
-  {2022/12/06}{3.1.1.2}
+  {2022/12/11}{4.0.1.0}
   {Xidian University Font package}
 \RequirePackage { xparse, l3keys2e }
 \PassOptionsToPackage { quiet } { xeCJK }

Modified: trunk/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls	2022-12-11 21:35:17 UTC (rev 65242)
+++ trunk/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls	2022-12-11 21:35:37 UTC (rev 65243)
@@ -28,7 +28,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
 \ProvidesExplClass{xdupgthesis}
-  {2022/12/06}{3.1.1.2}
+  {2022/12/11}{4.0.1.0}
   {Xidian University Postgraduate Thesis document class}
 \RequirePackage { xparse, l3keys2e }
 \PassOptionsToPackage { quiet } { xeCJK }
@@ -460,6 +460,7 @@
 \clist_new:N \l__xdu_keywords_zh_clist
 \clist_new:N \l__xdu_keywords_en_clist
 \clist_new:N \l__xdu_bib_file_clist
+\clist_new:N \l__xdu_appendix_clist
 \tl_new:N \l__xdu_ack_tl
 \keys_define:nn { xdu / info }
   {
@@ -475,6 +476,7 @@
     keywords .clist_set:N = \l__xdu_keywords_zh_clist,
     keywords* .clist_set:N = \l__xdu_keywords_en_clist,
     bib-resource .clist_set:N = \l__xdu_bib_file_clist,
+    appendix .clist_set:N = \l__xdu_appendix_clist,
     acknowledgements .tl_set:N = \l__xdu_ack_tl
   }
 \keys_set:nn { xdu }
@@ -491,6 +493,7 @@
     info / keywords              = { },
     info / keywords*             = { },
     info / bib-resource          = { },
+    info / appendix              = { },
     info / acknowledgements      = { }
   }
 \str_new:N \l__xdu_supv_str
@@ -1587,8 +1590,7 @@
         \dim_set:Nn \baselineskip { 20pt }
       }
   }
-\RequirePackage { environ }
-\NewEnviron { appendixes }
+\cs_new:Npn \__xdu_appendix:
   {
     \cs_set:Npn \appendixname { \__xdu_lang_switch:nn { 附录 } { Appendix } }
     \tl_set_eq:NN \l__xdu_chaptername \appendixname
@@ -1600,13 +1602,19 @@
       { \cs_set:Npn \thealgorithm { \thechapter \arabic { algorithm } } }
     \cs_if_exist:NT \thealgocf
       { \cs_set:Npn \thealgocf { \thechapter \arabic { algocf } } }
-    \BODY
+    \bool_if_exist:NTF \l__xdu_rm_appendix_bool
+      {
+        \bool_if:NF \l__xdu_rm_appendix_bool
+          {
+            \clist_map_inline:Nn \l__xdu_appendix_clist
+              { \file_if_exist_input:n { ##1 } }
+          }
+      }
+      {
+        \clist_map_inline:Nn \l__xdu_appendix_clist
+          { \file_if_exist_input:n { ##1 } }
+      }
   }
-\ctex_at_end_preamble:n
-  {
-    \bool_if:NT \l__xdu_rm_appendix_bool
-      { \RenewEnviron { appendixes } { } }
-  }
 \bool_new:N \l__xdu_phd
 \bool_new:N \l__xdu_master
 \bool_new:N \l__xdu_ac
@@ -2408,7 +2416,8 @@
       { \phantomsection \addcontentsline { zh.toc } { #1 } { \__xdu_sf_family: #2 } }
       { \phantomsection \addcontentsline { zh.toc } { #1 } { #2 } }
   }
-\renewcommand { \frontmatter }
+\RenewDocumentCommand { \frontmatter } { } { }
+\cs_new:Npn \__xdu_frontmatter:
   {
     \loadgeometry { cover }
     \pagestyle    { empty }
@@ -2487,7 +2496,8 @@
           }
       }
   }
-\renewcommand { \mainmatter }
+\RenewDocumentCommand { \mainmatter } { } { }
+\cs_new:Npn \__xdu_mainmatter:
   {
     \__xdu_load_main_geometry:
     \pagestyle     { plain  }
@@ -2562,8 +2572,10 @@
           { \end { enumerate } }
       }
   }
-\renewcommand { \backmatter }
+\RenewDocumentCommand { \backmatter } { } { }
+\cs_new:Npn \__xdu_backmatter:
   {
+    \__xdu_appendix:
     \__xdu_lang_switch:nn { }
       {
         \cs_set_eq:NN \chapter \__xdu_org_chapter:n
@@ -2622,11 +2634,13 @@
                 subsection / indent = { \l__xdu_bio_indent_dim }
             }
           \setcounter { section } { 0 }
-          \addtocontents { toc } { \setcounter { tocdepth } { 0 } }
+          \addtocontents { toc } { \protect \setcounter { tocdepth } { 0 } }
           \file_if_exist_input:n { \l__xdu_bio_str }
         \group_end:
       }
   }
+\ctex_after_end_preamble:n { \__xdu_frontmatter: \__xdu_mainmatter: }
+\AtEndDocument             { \__xdu_backmatter:                  }
 %% 
 %%
 %% End of file `xdupgthesis.cls'.

Modified: trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls	2022-12-11 21:35:17 UTC (rev 65242)
+++ trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls	2022-12-11 21:35:37 UTC (rev 65243)
@@ -28,7 +28,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
 \ProvidesExplClass{xduugthesis}
-  {2022/12/06}{3.1.1.2}
+  {2022/12/11}{4.0.1.0}
   {Xidian University Undergraduate Thesis document class}
 \RequirePackage { xparse, l3keys2e }
 \PassOptionsToPackage { quiet } { xeCJK }
@@ -461,6 +461,7 @@
 \clist_new:N \l__xdu_keywords_zh_clist
 \clist_new:N \l__xdu_keywords_en_clist
 \clist_new:N \l__xdu_bib_file_clist
+\clist_new:N \l__xdu_appendix_clist
 \tl_new:N \l__xdu_ack_tl
 \keys_define:nn { xdu / info }
   {
@@ -476,6 +477,7 @@
     keywords .clist_set:N = \l__xdu_keywords_zh_clist,
     keywords* .clist_set:N = \l__xdu_keywords_en_clist,
     bib-resource .clist_set:N = \l__xdu_bib_file_clist,
+    appendix .clist_set:N = \l__xdu_appendix_clist,
     acknowledgements .tl_set:N = \l__xdu_ack_tl
   }
 \keys_set:nn { xdu }
@@ -492,6 +494,7 @@
     info / keywords              = { },
     info / keywords*             = { },
     info / bib-resource          = { },
+    info / appendix              = { },
     info / acknowledgements      = { }
   }
 \str_new:N \l__xdu_supv_str
@@ -1367,8 +1370,7 @@
         \zihao { 5 }
       }
   }
-\RequirePackage { environ }
-\NewEnviron { appendixes }
+\cs_new:Npn \__xdu_appendix:
   {
     \cs_set:Npn \appendixname { \__xdu_lang_switch:nn { 附录 } { Appendix } }
     \tl_set_eq:NN \l__xdu_chaptername \appendixname
@@ -1380,7 +1382,18 @@
       { \cs_set:Npn \thealgorithm { \thechapter \arabic { algorithm } } }
     \cs_if_exist:NT \thealgocf
       { \cs_set:Npn \thealgocf { \thechapter \arabic { algocf } } }
-    \BODY
+    \bool_if_exist:NTF \l__xdu_rm_appendix_bool
+      {
+        \bool_if:NF \l__xdu_rm_appendix_bool
+          {
+            \clist_map_inline:Nn \l__xdu_appendix_clist
+              { \file_if_exist_input:n { ##1 } }
+          }
+      }
+      {
+        \clist_map_inline:Nn \l__xdu_appendix_clist
+          { \file_if_exist_input:n { ##1 } }
+      }
   }
 \cs_new:Npn \__xdu_cover_i:nn #1#2
   {
@@ -1453,7 +1466,8 @@
           { \__xdu_cover_iii:nnnnn { 4em } { #1 } { #2 } { #3 } { #4 } }
       }
   }
-\renewcommand { \frontmatter }
+\RenewDocumentCommand { \frontmatter } { } { }
+\cs_new:Npn \__xdu_frontmatter:
   {
     \loadgeometry { cover }
     \pagestyle    { empty }
@@ -1545,7 +1559,8 @@
     \@starttoc { toc }
     \cleardoublepage
   }
-\renewcommand { \mainmatter }
+\RenewDocumentCommand { \mainmatter } { } { }
+\cs_new:Npn \__xdu_mainmatter:
   {
     \__xdu_load_main_geometry:
     \pagestyle     { plain  }
@@ -1553,7 +1568,8 @@
     \dim_set:Nn \parindent { 2 \ccwd }
     \rmfamily \zihao { -4 }
   }
-\renewcommand { \backmatter }
+\RenewDocumentCommand { \backmatter } { } { }
+\cs_new:Npn \__xdu_backmatter:
   {
     \__xdu_n_chapter_head_toc:nn
       { \__xdu_lang_switch:nn { 致谢            } { Acknowledgements } }
@@ -1573,7 +1589,10 @@
         }
         { \printbibliography }
     \group_end:
+    \__xdu_appendix:
   }
+\ctex_after_end_preamble:n { \__xdu_frontmatter: \__xdu_mainmatter: }
+\AtEndDocument             { \__xdu_backmatter:                  }
 %% 
 %%
 %% End of file `xduugthesis.cls'.



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