texlive[63013] Master/texmf-dist: xduts (12apr22)

commits+karl at tug.org commits+karl at tug.org
Tue Apr 12 22:40:29 CEST 2022


Revision: 63013
          http://tug.org/svn/texlive?view=revision&revision=63013
Author:   karl
Date:     2022-04-12 22:40:29 +0200 (Tue, 12 Apr 2022)
Log Message:
-----------
xduts (12apr22)

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/xduugthesis.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-logo.pdf
    trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-text.pdf

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/xelatex/xduts/xidian-logo.pdf
    trunk/Master/texmf-dist/doc/xelatex/xduts/xidian-text.pdf

Modified: trunk/Master/texmf-dist/doc/xelatex/xduts/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xduts/README.md	2022-04-12 20:39:51 UTC (rev 63012)
+++ trunk/Master/texmf-dist/doc/xelatex/xduts/README.md	2022-04-12 20:40:29 UTC (rev 63013)
@@ -2,20 +2,42 @@
 
 [![](https://img.shields.io/ctan/v/xduts)](https://www.ctan.org/pkg/xduts) [![](https://img.shields.io/github/license/note286/xduts)](https://github.com/note286/xduts/blob/main/LICENSE) [![](https://img.shields.io/github/stars/note286/xduts)](https://github.com/note286/xduts) [![](https://img.shields.io/github/issues/note286/xduts)](https://github.com/note286/xduts/issues?q=is%3Aopen+is%3Aissue) [![](https://img.shields.io/github/issues-closed/note286/xduts)](https://github.com/note286/xduts/issues?q=is%3Aissue+is%3Aclosed) [![](https://img.shields.io/github/commit-activity/m/note286/xduts)](https://github.com/note286/xduts/commits/main) [![](https://img.shields.io/github/v/tag/note286/xduts)](https://github.com/note286/xduts/tags)
 
-XDUTS(Xidian University TeX Suite)是面向西安电子科技大学本科生/研究生的LaTeX3文档类和宏包套装,支持XeLaTeX,支持TeX Live、MacTeX、MiKTeX,支持Windows、macOS、GNU/Linux、Overleaf和TeXPage。旨在帮助西安电子科技大学本科生/研究生撰写开题报告/学位论文及其他文档,目前有:
+XDUTS (Xidian University TeX Suite) is a LaTeX3 document class and package suite for undergraduate/postgraduate students in Xidian University, which can be compiled with XeLaTeX on Windows, macOS, GNU/Linux, Overleaf, and TeXPage. It is designed to typesetting proposal/thesis and other documents.
 
-- xduugthesis,本科毕业设计论文文档类
-- xdufont,中/英/数学字体配置宏包
+XDUTS currently includes:
 
-即将支持:
+- `xduugthesis.cls`, Xidian University Undergraduate Thesis document class
+- `xdufont.sty`, Xidian University Font package
 
-- xduugtp,本科生开题报告文档类
-- xdupgthesis,研究生学位论文文档类
-- xdupgtp,研究生开题报告文档类
+In the future, we plan to add the following document classes, including 
 
-## 获取
+- `xduugtp.cls`, Xidian University Undergraduate Thesis Proposal document class
+- `xdupgtp.cls`, Xidian University Postgraduate Thesis Proposal document class
+- `xdupgthesis.cls`, Xidian University Postgraduate Thesis document class
 
+## Installation
+
+You can install XDUTS by either CTAN or GitHub by following the instructions below. 
+
+### CTAN
+
+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
+```
+
+Run command below to open the documentation in TeX Live/MacTeX.
+
+```shell
+texdoc xduts
+```
+
+### GitHub
+
+Generally speaking, CTAN updates XDUTS slowly. If you want to use the latest version of XDUTS, download this repository and run the following commands to get the corresponding documentation and document class/package files.
+
+```shell
 xetex xduts.ins
 xelatex xduts.dtx
 makeindex -s gind.ist -o xduts.ind xduts.idx
@@ -24,6 +46,10 @@
 xelatex xduts.dtx
 ```
 
-## 许可
+## Note
 
-This material is subject to [the LaTeX Project Public License 1.3c](https://ctan.org/license/lppl1.3).
+`xidian-text.pdf` and `xidian-logo.pdf` should be placed in the same directory as `xduugthesis.cls`.
+
+## License
+
+XDUTS is subject to [the LaTeX Project Public License 1.3c](https://ctan.org/license/lppl1.3).

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

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

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

Modified: trunk/Master/texmf-dist/source/xelatex/xduts/xduts.dtx
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/xduts/xduts.dtx	2022-04-12 20:39:51 UTC (rev 63012)
+++ trunk/Master/texmf-dist/source/xelatex/xduts/xduts.dtx	2022-04-12 20:40:29 UTC (rev 63013)
@@ -1,15 +1,15 @@
 % \iffalse
 %<*driver>
 \ProvidesFile{xduts.dtx}
-[2022/04/10 v0.6.0.0 Xidian University TeX Suite]
+[2022/04/11 v0.7.0.0 Xidian University TeX Suite]
 %</driver>
 %<class|sty>\NeedsTeXFormat{LaTeX2e}
 %<class|sty>\RequirePackage{expl3}
 %<xduugthesis>\ProvidesExplClass{xduugthesis}
 %<xdufont>\ProvidesExplPackage{xdufont}
-%<class|sty>  {2022/04/10}{0.6.0.0}
+%<class|sty>  {2022/04/11}{0.7.0.0}
 %<xdufont>  {Xidian University Font package}
-%<xduugthesis>  {Xidian University Undergraduate Thesis class}
+%<xduugthesis>  {Xidian University Undergraduate Thesis document class}
 %<*driver>
 \documentclass{ctxdoc}
 \changes{v0.6.0.0}{2022/04/10}{新增xdufont宏包}
@@ -143,7 +143,7 @@
 \end{document}
 %</driver>
 % \fi
-% \CheckSum{823}
+% \CheckSum{872}
 % \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
@@ -539,6 +539,45 @@
 %   \end{syntax}
 % 设置章节标题后的垂直间距,默认值为\valuex{\{18pt, 12pt, 6pt, 6pt, 6pt, 6pt\}},分别对应\tnx{chapter}、\tnx{section}、\tnx{subsection}、\tnx{subsubsection}、\tnx{paragraph}和\tnx{subparagraph}。
 % \end{function}
+% \begin{function}[added=2022-04-11]
+%   {
+%     style/chap-zihao,
+%     style/sec-zihao,
+%     style/subsec-zihao,
+%     style/subsubsec-zihao,
+%     style/para-zihao,
+%     style/subpara-zihao
+%   }
+%   \begin{syntax}
+%     \optx{style/chap-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
+%     \optx{style/sec-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
+%     \optx{style/subsec-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
+%     \optx{style/subsubsec-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
+%     \optx{style/para-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
+%     \optx{style/subpara-zihao}=\metax{0|-0|1|-1|2|-2|3|-3|4|-4|5|-5|6|-6|7|8}
+%   \end{syntax}
+% 设置章节标题字号。
+% 当论文语言为中文时,默认值分别为\valuex{3}、\valuex{4}、\valuex{4}、\valuex{4}、\valuex{4}、\valuex{4}。
+% 当论文语言为英文时,默认值分别为\valuex{4}、\valuex{-4}、\valuex{-4}、\valuex{-4}、\valuex{-4}、\valuex{-4}。
+% \end{function}
+% \begin{optdesc}
+%   \item[0] 初号
+%   \item[−0] 小初号
+%   \item[1] 一号
+%   \item[-1] 小一号
+%   \item[2] 二号
+%   \item[-2] 小二号
+%   \item[3] 三号
+%   \item[-3] 小三号
+%   \item[4] 四号
+%   \item[-4] 小四号
+%   \item[5] 五号
+%   \item[-5] 小五号
+%   \item[6] 六号
+%   \item[-6] 小六号
+%   \item[7] 七号
+%   \item[8] 八号
+% \end{optdesc}
 % \subsection{附录环境}
 % \label{附录环境}
 % \begin{function}[added=2022-04-04]{appendixes}
@@ -1571,7 +1610,13 @@
 %     \l_@@_bib_file_clist,
 %     \l_@@_fig_label_sep_tl,
 %     \l_@@_before_skip_clist,
-%     \l_@@_after_skip_clist
+%     \l_@@_after_skip_clist,
+%     \l_@@_chap_tl,
+%     \l_@@_sec_tl,
+%     \l_@@_subsec_tl,
+%     \l_@@_subsubsec_tl,
+%     \l_@@_para_tl,
+%     \l_@@_subpara_tl
 %   }
 % 英文是否使用中文字体。
 %    \begin{macrocode}
@@ -1598,6 +1643,15 @@
 \clist_new:N \l_@@_before_skip_clist
 \clist_new:N \l_@@_after_skip_clist
 %    \end{macrocode}
+% 设置章节标题字号。
+%    \begin{macrocode}
+\tl_new:N \l_@@_chap_tl
+\tl_new:N \l_@@_sec_tl
+\tl_new:N \l_@@_subsec_tl
+\tl_new:N \l_@@_subsubsec_tl
+\tl_new:N \l_@@_para_tl
+\tl_new:N \l_@@_subpara_tl
+%    \end{macrocode}
 % \end{variable}
 % \begin{macro}{\keys_define:nn}
 % 定义样式键值。
@@ -1633,7 +1687,16 @@
 %    \end{macrocode}
 % 设置章节标题后的垂直间距。
 %    \begin{macrocode}
-    after-skip .clist_set:N = \l_@@_after_skip_clist
+    after-skip .clist_set:N = \l_@@_after_skip_clist,
+%    \end{macrocode}
+% 设置章节标题字号。
+%    \begin{macrocode}
+    chap-zihao .tl_set:N = \l_@@_chap_tl,
+    sec-zihao .tl_set:N = \l_@@_sec_tl,
+    subsec-zihao .tl_set:N = \l_@@_subsec_tl,
+    subsubsec-zihao .tl_set:N = \l_@@_subsubsec_tl,
+    para-zihao .tl_set:N = \l_@@_para_tl,
+    subpara-zihao .tl_set:N = \l_@@_subpara_tl
   }
 %    \end{macrocode}
 % \end{macro}
@@ -1642,13 +1705,13 @@
 %    \begin{macrocode}
 \keys_set:nn { xdu }
   {
-    style / en-cjk-font           = false,
-    style / language              = zh,
-    style / bib-backend           = biblatex,
-    style / bib-resource          = { },
-    style / fig-label-sep         = { 0.75em },
-    style / before-skip           = { 24pt, 18pt, 12pt, 12pt, 12pt, 12pt },
-    style / after-skip            = { 18pt, 12pt, 6pt, 6pt, 6pt, 6pt }
+    style / en-cjk-font   = false,
+    style / language      = zh,
+    style / bib-backend   = biblatex,
+    style / bib-resource  = { },
+    style / fig-label-sep = { 0.75em },
+    style / before-skip   = { 24pt, 18pt, 12pt, 12pt, 12pt, 12pt },
+    style / after-skip    = { 18pt, 12pt, 6pt, 6pt, 6pt, 6pt }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -1731,6 +1794,14 @@
   { \CJKunderline [ thickness = 0.5pt ] { #1 } }
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{\@@_tl_set_if_empty:Nn}
+% \changes{v0.7.0.0}{2022/04/11}{对空凭据表赋值}
+% 对空凭据表赋值。
+%    \begin{macrocode}
+\cs_new:Npn \@@_tl_set_if_empty:Nn #1#2
+  { \tl_if_empty:NT #1 { \tl_set:Nn #1 { #2 } } }
+%    \end{macrocode}
+% \end{macro}
 % \begin{macro}{\@@_get_text_width:Nn,\@@_get_text_width:NV}
 % 获取文本宽度。
 % \begin{arguments}
@@ -1936,7 +2007,7 @@
 %    \end{macrocode}
 % \end{macro}
 % \subsubsection{章节和标题}
-% \begin{macro}{\@@_zh_title:nnn}
+% \begin{macro}{\@@_zh_t:nnn}
 % 设置中文章节名字和随后的标题内容格式。
 % \begin{arguments}
 %   \item 字体族。
@@ -1944,10 +2015,10 @@
 %   \item 位置。
 % \end{arguments}
 %    \begin{macrocode}
-\cs_new:Npn \@@_zh_title:nnn #1#2#3
+\cs_new:Npn \@@_zh_t:nnn #1#2#3
   {
     \use:c { @@_ #1 _family : }
-    \zihao { #2 }
+    \zihao { \use:c { l_@@_ #2 _tl } }
     \str_if_eq:ccTF { #3 } { c }
       { \centering   }
       { \raggedright }
@@ -1955,17 +2026,18 @@
 %    \end{macrocode}
 % \end{macro}
 % 设置英文章节名字和随后的标题内容格式。
-% \begin{macro}{\@@_en_title:nn}
+% \begin{macro}{\@@_en_t:nn}
 % \begin{arguments}
 %   \item 字号。
 %   \item 偏移量。
 % \end{arguments}
 %    \begin{macrocode}
-\cs_new:Npn \@@_en_title:nn #1#2
-  { \zihao { #1 } \raggedright \skip_horizontal:n { #2 ex } }
+\cs_new:Npn \@@_en_t:nn #1#2
+  { \zihao { \use:c { l_@@_ #1 _tl } } \raggedright \skip_horizontal:n { #2 ex } }
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\ctexset}
+% \changes{v0.7.0.0}{2022/04/11}{自定义章节标题字号}
 % 设置章节名字和随后的标题内容格式。
 %    \begin{macrocode}
 \ctex_at_end_preamble:n
@@ -1972,25 +2044,37 @@
   {
     \@@_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 }
         \ctexset
           {
-            chapter       / format = { \@@_zh_title:nnn { sf } { 3 } { c } },
-            section       / format = { \@@_zh_title:nnn { rm } { 4 } { c } },
-            subsection    / format = { \@@_zh_title:nnn { rm } { 4 } { l } },
-            subsubsection / format = { \@@_zh_title:nnn { rm } { 4 } { l } },
-            paragraph     / format = { \@@_zh_title:nnn { rm } { 4 } { l } },
-            subparagraph  / format = { \@@_zh_title:nnn { rm } { 4 } { l } }
+            chapter       / format = { \@@_zh_t:nnn { sf } { chap      } { c } },
+            section       / format = { \@@_zh_t:nnn { rm } { sec       } { c } },
+            subsection    / format = { \@@_zh_t:nnn { rm } { subsec    } { l } },
+            subsubsection / format = { \@@_zh_t:nnn { rm } { subsubsec } { l } },
+            paragraph     / format = { \@@_zh_t:nnn { rm } { para      } { l } },
+            subparagraph  / format = { \@@_zh_t:nnn { rm } { subpara   } { l } }
           }
       }
       {
+        \@@_tl_set_if_empty:Nn \l_@@_chap_tl      { 4  }
+        \@@_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 = { \@@_en_title:nn { 4  } { 0  } },
-            section       / format = { \@@_en_title:nn { -4 } { 4  } },
-            subsection    / format = { \@@_en_title:nn { -4 } { 8  } },
-            subsubsection / format = { \@@_en_title:nn { -4 } { 12 } },
-            paragraph     / format = { \@@_en_title:nn { -4 } { 16 } },
-            subparagraph  / format = { \@@_en_title:nn { -4 } { 20 } }
+            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 } }
           }
       }
   }
@@ -2205,6 +2289,7 @@
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\@@_cover_ii:nnn}
+% \changes{v0.6.1.0}{2022/04/11}{修复logo不存在导致的无法编译}
 % 绘制西电logo。
 % \begin{arguments}
 %   \item 盒子高度。
@@ -2218,7 +2303,8 @@
       {
         \mode_leave_vertical:
         \hfil
-        \includegraphics [ height = #2, keepaspectratio ] { #3 }
+        \file_if_exist:nT { #3 }
+          { \includegraphics [ height = #2, keepaspectratio ] { #3 } }
         \hfil
       }
   }
@@ -2321,7 +2407,7 @@
 %    \end{macrocode}
 % 排版西电文字logo。
 %    \begin{macrocode}
-    \@@_cover_ii:nnn { 65pt } { 35pt } { xidian-text }
+    \@@_cover_ii:nnn { 65pt } { 35pt } { xidian-text.pdf }
 %    \end{macrocode}
 % 排版封面标题。
 %    \begin{macrocode}
@@ -2330,7 +2416,7 @@
 %    \end{macrocode}
 % 排版西电logo。
 %    \begin{macrocode}
-    \@@_cover_ii:nnn { 130pt } { 120pt } { xidian-logo }
+    \@@_cover_ii:nnn { 130pt } { 120pt } { xidian-logo.pdf }
 %    \end{macrocode}
 % 拆分论文标题并排版。
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty	2022-04-12 20:39:51 UTC (rev 63012)
+++ trunk/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty	2022-04-12 20:40:29 UTC (rev 63013)
@@ -26,7 +26,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
 \ProvidesExplPackage{xdufont}
-  {2022/04/10}{0.6.0.0}
+  {2022/04/11}{0.7.0.0}
   {Xidian University Font package}
 \RequirePackage { xparse, l3keys2e }
 \PassOptionsToPackage { quiet } { xeCJK }

Modified: trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls	2022-04-12 20:39:51 UTC (rev 63012)
+++ trunk/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls	2022-04-12 20:40:29 UTC (rev 63013)
@@ -26,8 +26,8 @@
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
 \ProvidesExplClass{xduugthesis}
-  {2022/04/10}{0.6.0.0}
-  {Xidian University Undergraduate Thesis class}
+  {2022/04/11}{0.7.0.0}
+  {Xidian University Undergraduate Thesis document class}
 \RequirePackage { xparse, l3keys2e }
 \PassOptionsToPackage { quiet } { xeCJK }
 \PassOptionsToClass
@@ -438,6 +438,12 @@
 \tl_new:N \l__xdu_fig_label_sep_tl
 \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
 \keys_define:nn { xdu / style }
   {
     en-cjk-font .bool_set:N = \l__xdu_en_cjk_font_bool,
@@ -448,17 +454,23 @@
     bib-resource .clist_set:N = \l__xdu_bib_file_clist,
     fig-label-sep .tl_set:N = \l__xdu_fig_label_sep_tl,
     before-skip .clist_set:N = \l__xdu_before_skip_clist,
-    after-skip .clist_set:N = \l__xdu_after_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
   }
 \keys_set:nn { xdu }
   {
-    style / en-cjk-font           = false,
-    style / language              = zh,
-    style / bib-backend           = biblatex,
-    style / bib-resource          = { },
-    style / fig-label-sep         = { 0.75em },
-    style / before-skip           = { 24pt, 18pt, 12pt, 12pt, 12pt, 12pt },
-    style / after-skip            = { 18pt, 12pt, 6pt, 6pt, 6pt, 6pt }
+    style / en-cjk-font   = false,
+    style / language      = zh,
+    style / bib-backend   = biblatex,
+    style / bib-resource  = { },
+    style / fig-label-sep = { 0.75em },
+    style / before-skip   = { 24pt, 18pt, 12pt, 12pt, 12pt, 12pt },
+    style / after-skip    = { 18pt, 12pt, 6pt, 6pt, 6pt, 6pt }
   }
 \NewDocumentCommand \xdusetup { m }
   { \keys_set:nn { xdu } { #1 } }
@@ -488,6 +500,8 @@
   }
 \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
@@ -606,39 +620,51 @@
     paragraph     / number = { \theparagraph     },
     subparagraph  / number = { \thesubparagraph  }
   }
-\cs_new:Npn \__xdu_zh_title:nnn #1#2#3
+\cs_new:Npn \__xdu_zh_t:nnn #1#2#3
   {
     \use:c { __xdu_ #1 _family : }
-    \zihao { #2 }
+    \zihao { \use:c { l__xdu_ #2 _tl } }
     \str_if_eq:ccTF { #3 } { c }
       { \centering   }
       { \raggedright }
   }
-\cs_new:Npn \__xdu_en_title:nn #1#2
-  { \zihao { #1 } \raggedright \skip_horizontal:n { #2 ex } }
+\cs_new:Npn \__xdu_en_t:nn #1#2
+  { \zihao { \use:c { l__xdu_ #1 _tl } } \raggedright \skip_horizontal:n { #2 ex } }
 \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 }
         \ctexset
           {
-            chapter       / format = { \__xdu_zh_title:nnn { sf } { 3 } { c } },
-            section       / format = { \__xdu_zh_title:nnn { rm } { 4 } { c } },
-            subsection    / format = { \__xdu_zh_title:nnn { rm } { 4 } { l } },
-            subsubsection / format = { \__xdu_zh_title:nnn { rm } { 4 } { l } },
-            paragraph     / format = { \__xdu_zh_title:nnn { rm } { 4 } { l } },
-            subparagraph  / format = { \__xdu_zh_title:nnn { rm } { 4 } { l } }
+            chapter       / format = { \__xdu_zh_t:nnn { sf } { chap      } { c } },
+            section       / format = { \__xdu_zh_t:nnn { rm } { sec       } { c } },
+            subsection    / format = { \__xdu_zh_t:nnn { rm } { subsec    } { l } },
+            subsubsection / format = { \__xdu_zh_t:nnn { rm } { subsubsec } { l } },
+            paragraph     / format = { \__xdu_zh_t:nnn { rm } { para      } { l } },
+            subparagraph  / format = { \__xdu_zh_t:nnn { rm } { subpara   } { l } }
           }
       }
       {
+        \__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_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_en_title:nn { 4  } { 0  } },
-            section       / format = { \__xdu_en_title:nn { -4 } { 4  } },
-            subsection    / format = { \__xdu_en_title:nn { -4 } { 8  } },
-            subsubsection / format = { \__xdu_en_title:nn { -4 } { 12 } },
-            paragraph     / format = { \__xdu_en_title:nn { -4 } { 16 } },
-            subparagraph  / format = { \__xdu_en_title:nn { -4 } { 20 } }
+            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 } }
           }
       }
   }
@@ -766,7 +792,8 @@
       {
         \mode_leave_vertical:
         \hfil
-        \includegraphics [ height = #2, keepaspectratio ] { #3 }
+        \file_if_exist:nT { #3 }
+          { \includegraphics [ height = #2, keepaspectratio ] { #3 } }
         \hfil
       }
   }
@@ -825,10 +852,10 @@
     \__xdu_cover_i:nn   { 班级 } { \l__xdu_class_id_str   }
     \__xdu_cover_i:nn   { 学号 } { \l__xdu_student_id_str }
     \skip_vertical:n { 30pt }
-    \__xdu_cover_ii:nnn { 65pt } { 35pt } { xidian-text }
+    \__xdu_cover_ii:nnn { 65pt } { 35pt } { xidian-text.pdf }
     \vbox_to_ht:nn { 75pt }
       { \__xdu_sf_family: \zihao { 0 } \centering { 本科毕业设计论文 } }
-    \__xdu_cover_ii:nnn { 130pt } { 120pt } { xidian-logo }
+    \__xdu_cover_ii:nnn { 130pt } { 120pt } { xidian-logo.pdf }
     \clist_new:N \l__xdu_title_clist
     \__xdu_split_title:NV \l__xdu_title_clist \l__xdu_title_str
     \str_set:Nx \l__xdu_title_i_str  { \clist_item:Nn  \l__xdu_title_clist { 1 } }

Added: trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-logo.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-logo.pdf
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-logo.pdf	2022-04-12 20:39:51 UTC (rev 63012)
+++ trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-logo.pdf	2022-04-12 20:40:29 UTC (rev 63013)

Property changes on: trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-logo.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-text.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-text.pdf
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-text.pdf	2022-04-12 20:39:51 UTC (rev 63012)
+++ trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-text.pdf	2022-04-12 20:40:29 UTC (rev 63013)

Property changes on: trunk/Master/texmf-dist/tex/xelatex/xduts/xidian-text.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property


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