summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-12-03 21:02:25 +0000
committerKarl Berry <karl@freefriends.org>2022-12-03 21:02:25 +0000
commit9d3d4cf4171b39007b2c96eabf5640839b3520ed (patch)
tree9511d379c40b60f8d399e18b0a6e4db5fa2c5f15
parent29bf525f876e4654f4acff755e0ec7b925041c2e (diff)
xduts (3dec22)
git-svn-id: svn://tug.org/texlive/trunk@65186 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/xelatex/xduts/xduts.pdfbin306469 -> 307600 bytes
-rw-r--r--Master/texmf-dist/source/xelatex/xduts/xduts.dtx263
-rw-r--r--Master/texmf-dist/tex/xelatex/xduts/xdufont.sty2
-rw-r--r--Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls149
-rw-r--r--Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls149
5 files changed, 430 insertions, 133 deletions
diff --git a/Master/texmf-dist/doc/xelatex/xduts/xduts.pdf b/Master/texmf-dist/doc/xelatex/xduts/xduts.pdf
index eb83cd20a4a..19527913c31 100644
--- a/Master/texmf-dist/doc/xelatex/xduts/xduts.pdf
+++ b/Master/texmf-dist/doc/xelatex/xduts/xduts.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/xelatex/xduts/xduts.dtx b/Master/texmf-dist/source/xelatex/xduts/xduts.dtx
index 25c448bb668..ac9c27edf94 100644
--- a/Master/texmf-dist/source/xelatex/xduts/xduts.dtx
+++ b/Master/texmf-dist/source/xelatex/xduts/xduts.dtx
@@ -1,14 +1,14 @@
% \iffalse
%<*driver>
\ProvidesFile{xduts.dtx}
-[2022/12/01 v2.18.1.1 Xidian University TeX Suite]
+[2022/12/03 v3.1.0.0 Xidian University TeX Suite]
%</driver>
%<class|sty>\NeedsTeXFormat{LaTeX2e}
%<class|sty>\RequirePackage{expl3}
%<xdufont>\ProvidesExplPackage{xdufont}
%<xdupgthesis>\ProvidesExplClass{xdupgthesis}
%<xduugthesis>\ProvidesExplClass{xduugthesis}
-%<class|sty> {2022/12/01}{2.18.1.1}
+%<class|sty> {2022/12/03}{3.1.0.0}
%<xdufont> {Xidian University Font package}
%<xdupgthesis> {Xidian University Postgraduate Thesis document class}
%<xduugthesis> {Xidian University Undergraduate Thesis document class}
@@ -276,7 +276,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% 文件配置见\secrefx{文件配置},
% 交叉引用配置见\secrefx{交叉引用配置},
% caption配置见\secrefx{caption配置},
-% 表格配置见\secrefx{表格配置},
+% 图表配置见\secrefx{图表配置},
% 算法配置见\secrefx{算法配置},
% 对照表配置见\secrefx{对照表配置},
% 作者简介配置见\secrefx{作者简介配置}。
@@ -317,7 +317,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% 文件配置见\secrefx{文件配置},
% 交叉引用配置见\secrefx{交叉引用配置},
% caption配置见\secrefx{caption配置},
-% 表格配置见\secrefx{表格配置},
+% 图表配置见\secrefx{图表配置},
% 算法配置见\secrefx{算法配置},
% 章节配置见\secrefx{章节配置},
% 附录配置见\secrefx{附录环境},
@@ -679,20 +679,36 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \end{function}
% \changes{v2.17.0.0}{2022/11/28}{设置图、表、算法caption格式}
% \begin{function}[added=2022-11-28]{style/caption-format}
+% 已弃用。
+% \end{function}
+% \begin{function}[added=2022-04-03]{style/fig-label-sep}
+% 已弃用。
+% \end{function}
+% \subsection{图表配置}
+% \label{图表配置}
+% \changes{v3.0.0.0}{2022/12/03}{设置图表caption格式}
+% \begin{function}[added=2022-12-03]{style/ft-caption-format}
% \begin{syntax}
-% \optx{style/caption-format}=\metax{plain|(hang)}
+% \optx{style/ft-caption-format}=\metax{plain|(hang)}
% \end{syntax}
-% 设置图、表、算法caption的对齐方式。
+% 设置图表caption格式。
% \begin{optdesc}
-% \item[plain] 无缩进。
+% \item[plain] 无缩进,即自然段落。
% \item[hang] 悬挂缩进。
% \end{optdesc}
% \end{function}
-% \begin{function}[added=2022-04-03]{style/fig-label-sep}
-% 已弃用。
+% \changes{v3.0.0.0}{2022/12/03}{设置图表caption对齐方式}
+% \begin{function}[added=2022-12-03]{style/ft-caption-align}
+% \begin{syntax}
+% \optx{style/ft-caption-align}=\metax{left|centering|(centering-left)}
+% \end{syntax}
+% 设置图表caption对齐方式。
+% \begin{optdesc}
+% \item[left] 左对齐。
+% \item[centering] 居中。
+% \item[centering-left] 只有一行时居中,多行时左对齐。
+% \end{optdesc}
% \end{function}
-% \subsection{表格配置}
-% \label{表格配置}
% \changes{v0.10.0.1}{2022/04/13}{补充表格内容字号文档说明}
% \begin{function}[added=2022-04-13,updated=2022-04-15]{style/table-small-font}
% \begin{syntax}
@@ -726,16 +742,43 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \item[true] 五号。
% \item[false] 小四号。
% \end{optdesc}
-% \begin{function}[added=2022-11-29]{style/algorithm-caption-align}
+% \changes{v3.0.0.0}{2022/12/03}{设置算法caption格式}
+% \begin{function}[added=2022-12-03]{style/alg-caption-format}
% \begin{syntax}
-% \optx{style/algorithm-caption-align}=\metax{(left)|centering}
+% \optx{style/alg-caption-format}=\metax{plain|(hang)}
% \end{syntax}
-% 设置算法caption对齐方式。
+% 设置算法caption格式。
+% \begin{optdesc}
+% \item[plain] 无缩进,即自然段落。
+% \item[hang] 悬挂缩进。
+% \end{optdesc}
% \end{function}
+% \changes{v3.0.0.0}{2022/12/03}{设置算法caption对齐方式}
+% \begin{function}[added=2022-12-03]{style/alg-caption-align}
+% \begin{syntax}
+% \optx{style/alg-caption-align}=\metax{(left)|centering|centering-left}
+% \end{syntax}
+% 设置算法caption对齐方式。
% \begin{optdesc}
% \item[left] 左对齐。
-% \item[centering] 居中,此时\optx{style/caption-format}中的设置对算法caption无效。
+% \item[centering] 居中。
+% \item[centering-left] 只有一行时居中,多行时左对齐。
+% \end{optdesc}
+% \end{function}
+% \changes{v3.1.0.0}{2022/12/03}{设置算法三线间距}
+% \begin{function}[added=2022-12-03]{style/add-alg-rule-vspace}
+% \begin{syntax}
+% \optx{style/add-alg-rule-vspace}=\metax{true|(false)}
+% \end{syntax}
+% 设置是否为ruled样式的算法环境的三条横线增加纵向间距。
+% \begin{optdesc}
+% \item[true] 增加。
+% \item[false] 不增加。
% \end{optdesc}
+% \end{function}
+% \begin{function}[added=2022-11-29]{style/algorithm-caption-align}
+% 已弃用。
+% \end{function}
% \subsection{章节配置}
% \label{章节配置}
% \begin{function}[added=2022-04-05]{style/before-skip}
@@ -3219,11 +3262,14 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \l_@@_fix_graphics_bool,
% \l_@@_ref_add_space_bool,
% \l_@@_cap_label_sep_tl,
-% \l_@@_cap_format_tl,
+% \l_@@_ft_cap_format_tl,
+% \l_@@_alg_cap_format_tl,
+% \l_@@_ft_cap_align_tl,
+% \l_@@_alg_cap_align_tl,
+% \l_@@_add_alg_rule_vspace_bool,
% \l_@@_tab_small_bool,
% \l_@@_alg_small_cap_bool,
% \l_@@_alg_small_bool,
-% \l_@@_alg_capt_align_tl,
% \l_@@_before_skip_clist,
% \l_@@_after_skip_clist,
% \l_@@_chap_tl,
@@ -3272,7 +3318,17 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \end{macrocode}
% 图、表、算法caption格式。
% \begin{macrocode}
-\tl_new:N \l_@@_cap_format_tl
+\tl_new:N \l_@@_ft_cap_format_tl
+\tl_new:N \l_@@_alg_cap_format_tl
+% \end{macrocode}
+% 图、表、算法caption对齐方式。
+% \begin{macrocode}
+\tl_new:N \l_@@_ft_cap_align_tl
+\tl_new:N \l_@@_alg_cap_align_tl
+% \end{macrocode}
+% 设置算法三线间距。
+% \begin{macrocode}
+\bool_new:N \l_@@_add_alg_rule_vspace_bool
% \end{macrocode}
% 设置表格字号是否为五号。
% \begin{macrocode}
@@ -3286,10 +3342,6 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \begin{macrocode}
\bool_new:N \l_@@_alg_small_bool
% \end{macrocode}
-% 设置算法caption对齐方式。
-% \begin{macrocode}
-\tl_new:N \l_@@_alg_capt_align_tl
-% \end{macrocode}
% 设置章节标题前后的垂直间距。
% \begin{macrocode}
\clist_new:N \l_@@_before_skip_clist
@@ -3357,8 +3409,21 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \end{macrocode}
% 图、表、算法caption格式。
% \begin{macrocode}
- caption-format .choices:nn = { plain, hang }
- { \tl_set_eq:NN \l_@@_cap_format_tl \l_keys_choice_tl },
+ ft-caption-format .choices:nn = { plain, hang }
+ { \tl_set_eq:NN \l_@@_ft_cap_format_tl \l_keys_choice_tl },
+ alg-caption-format .choices:nn = { plain, hang }
+ { \tl_set_eq:NN \l_@@_alg_cap_format_tl \l_keys_choice_tl },
+% \end{macrocode}
+% 图、表、算法caption对齐方式。
+% \begin{macrocode}
+ ft-caption-align .choices:nn = { left, centering, centering-left }
+ { \tl_set_eq:NN \l_@@_ft_cap_align_tl \l_keys_choice_tl },
+ alg-caption-align .choices:nn = { left, centering, centering-left }
+ { \tl_set_eq:NN \l_@@_alg_cap_align_tl \l_keys_choice_tl },
+% \end{macrocode}
+% 设置算法三线间距。
+% \begin{macrocode}
+ add-alg-rule-vspace .bool_set:N = \l_@@_add_alg_rule_vspace_bool,
% \end{macrocode}
% 设置表格字号是否为五号。
% \begin{macrocode}
@@ -3372,11 +3437,6 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \begin{macrocode}
algorithm-small-font .bool_set:N = \l_@@_alg_small_bool,
% \end{macrocode}
-% 设置算法caption对齐方式。
-% \begin{macrocode}
- algorithm-caption-align .choices:nn = { left, centering }
- { \tl_set_eq:NN \l_@@_alg_capt_align_tl \l_keys_choice_tl },
-% \end{macrocode}
% 设置章节标题前的垂直间距。
% \begin{macrocode}
before-skip .clist_set:N = \l_@@_before_skip_clist,
@@ -3419,7 +3479,11 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
style / fix-includegraphics = false,
style / ref-add-space = false,
style / caption-label-sep = { 0.75em },
- style / caption-format = { hang },
+ style / ft-caption-format = { hang },
+ style / alg-caption-format = { hang },
+ style / ft-caption-align = { centering-left },
+ style / alg-caption-align = { left },
+ style / add-alg-rule-vspace = { false },
style / table-small-font = true,
style / algorithm-small-caption = true,
style / algorithm-small-font = true,
@@ -4762,22 +4826,17 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \end{macro}
% \subsection{Caption}
% \begin{macro}{\DeclareCaptionLabelSeparator,\DeclareCaptionFont,\captionsetup}
+% \changes{v3.0.0.0}{2022/12/03}{设置图、表caption格式}
% \changes{v2.17.0.0}{2022/11/28}{设置图、表caption格式}
% \changes{v0.1.2.0}{2022/04/03}{设置图片标签与后面标题之间的间距}
% \changes{v0.1.3.0}{2022/04/03}{设置图片标签与标题字体字号}
% \changes{v2.10.1.0}{2022/06/26}{修复算法标签与标题字体字号警告}
% 设置图表标签与后面标题之间的间距及caption字体字号。
% \begin{macrocode}
+\PassOptionsToPackage { ruled } { caption }
\RequirePackage { caption }
\DeclareCaptionLabelSeparator { customskip } { \hskip \l_@@_cap_label_sep_tl }
\DeclareCaptionFont { customfont } { \@@_rm_family: \zihao { 5 } }
-\DeclareCaptionFont { algcustomfont }
- {
- \@@_rm_family:
- \bool_if:NTF \l_@@_alg_small_cap_bool
- { \zihao { 5 } }
- { \zihao { -4 } }
- }
\captionsetup
{
labelsep = customskip,
@@ -4785,12 +4844,21 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
}
\ctex_at_end_preamble:n
{
- \tl_if_eq:NnTF \l_@@_cap_format_tl { hang }
- { \captionsetup { format = hang } } { }
+ \tl_if_eq:NnTF \l_@@_ft_cap_format_tl { hang }
+ { \captionsetup { format = hang } }
+ { \captionsetup { format = plain } }
+ \tl_if_eq:NnTF \l_@@_ft_cap_align_tl { left }
+ { \captionsetup { singlelinecheck = false, justification = justified } }
+ {
+ \tl_if_eq:NnTF \l_@@_ft_cap_align_tl { centering }
+ { \captionsetup { singlelinecheck = false, justification = centerlast } }
+ { \captionsetup { singlelinecheck = true, justification = justified } }
+ }
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\captionsetup}
+% \begin{macro}{\DeclareCaptionFont,\captionsetup*}
+% \changes{v3.0.0.0}{2022/12/03}{设置算法caption格式}
% \changes{v2.18.0.0}{2022/11/28}{设置算法caption对齐方式}
% \changes{v2.17.0.0}{2022/11/28}{设置算法caption格式}
% \changes{v1.0.4.0}{2022/04/15}{设置\pkgx{algorithm}算法标签与标题字体字号及标签与后面标题之间的间距}
@@ -4798,7 +4866,14 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \changes{v2.6.0.0}{2022/06/25}{设置\pkgx{algorithm}算法Caption字号是否为五号}
% 设置\pkgx{algorithm}算法标签与标题字体字号及标签与后面标题之间的间距。
% \begin{macrocode}
-\captionsetup [ algorithm ]
+\DeclareCaptionFont { algcustomfont }
+ {
+ \@@_rm_family:
+ \bool_if:NTF \l_@@_alg_small_cap_bool
+ { \zihao { 5 } }
+ { \zihao { -4 } }
+ }
+\captionsetup* [ algorithm ]
{
labelsep = customskip,
labelfont = algcustomfont,
@@ -4806,12 +4881,48 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
}
\ctex_at_end_preamble:n
{
- \tl_if_eq:NnTF \l_@@_alg_capt_align_tl { left }
+ \tl_if_eq:NnTF \l_@@_alg_cap_format_tl { hang }
+ { \captionsetup* [ algorithm ] { format = hang } }
+ { \captionsetup* [ algorithm ] { format = plain } }
+ \captionsetup* [ ruled ] { strut = 0 }
+ \tl_if_eq:NnTF \l_@@_ft_cap_align_tl { left }
{
- \tl_if_eq:NnTF \l_@@_cap_format_tl { hang }
- { \captionsetup [ algorithm ] { format = hang } } { }
+ \captionsetup* [ algorithm ]
+ { singlelinecheck = false, justification = justified }
+ }
+ {
+ \tl_if_eq:NnTF \l_@@_ft_cap_align_tl { centering }
+ {
+ \captionsetup* [ algorithm ]
+ { singlelinecheck = false, justification = centerlast }
+ }
+ {
+ \cs_set_eq:NN \floatc@ruled \floatc@plain
+ \captionsetup* [ ruled ] { slc = 1 }
+ \captionsetup* [ algorithm ]
+ { singlelinecheck = true, justification = justified }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \changes{v3.1.0.0}{2022/12/03}{设置\pkgx{algorithm}算法三线间距}
+% \begin{macro}{\ctex_at_end_preamble:n}
+% 设置\pkgx{algorithm}算法三线间距。
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \bool_if:NT \l_@@_add_alg_rule_vspace_bool
+ {
+ \cs_set:Npn \fs@ruled
+ {
+ \cs_set_eq:NN \@fs@capt \floatc@plain
+ \cs_set:Npn \@fs@pre { \hrule height .8pt depth 0pt \kern 5pt }
+ \cs_set:Npn \@fs@post { \kern 5pt \hrule \relax }
+ \cs_set:Npn \@fs@mid { \kern 5pt \hrule \kern 5pt }
+ \cs_set_eq:NN \@fs@iftopcapt \iftrue
+ }
}
- { \captionsetup [ algorithm ] { justification = centering } }
}
% \end{macrocode}
% \end{macro}
@@ -4841,33 +4952,51 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \end{macrocode}
% 设置\pkgx{algorithm2e}算法caption格式及对齐方式。
% \begin{macrocode}
- \tl_if_eq:NnTF \l_@@_alg_capt_align_tl { left }
+ \RenewDocumentCommand { \algocf@makecaption } { mm }
{
- \box_new:N \l_@@_algtwoe_capt_box
- \RenewDocumentCommand { \algocf@makecaption } { mm }
+ \box_clear_new:N \l_@@_algiie_capt_box
+ \hbox_set:Nn \l_@@_algiie_capt_box
+ { \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ \dim_compare:nNnTF { \box_wd:N \l_@@_algiie_capt_box } > { \hsize }
{
- \hbox_set:Nn \l_@@_algtwoe_capt_box
- { \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
- \dim_compare:nNnTF { \box_wd:N \l_@@_algtwoe_capt_box } > { \hsize }
+ \tl_if_eq:NnTF \l_@@_alg_cap_format_tl { hang }
{
- \tl_if_eq:NnTF \l_@@_cap_format_tl { hang }
+ \tl_if_eq:NnTF \l_@@_alg_cap_align_tl { centering }
+ {
+ \makebox { \AlCapFnt #1 \algocf@capseparator }
+ \makebox
+ {
+ \parbox [ t ] { \hsize }
+ { \centering \AlCapNameFnt #2 }
+ }
+ }
{
\makebox { \AlCapFnt #1 \algocf@capseparator }
\makebox { \parbox [ t ] { \hsize } { \AlCapNameFnt #2 } }
}
+ }
+ {
+ \tl_if_eq:NnTF \l_@@_alg_cap_align_tl { centering }
+ {
+ \parbox { \columnwidth }
+ { \centering \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2}
+ }
{
\parbox { \columnwidth }
{ \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2}
}
}
- { \makebox [ \columnwidth ] { \box_use:N \l_@@_algtwoe_capt_box } }
}
- }
- {
- \RenewDocumentCommand { \algocf@makecaption } { mm }
{
- \parbox { \columnwidth }
- { \centering \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ \tl_if_eq:NnTF \l_@@_alg_cap_align_tl { left }
+ {
+ \parbox { \columnwidth }
+ { \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ }
+ {
+ \parbox { \columnwidth }
+ { \centering \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ }
}
}
\RenewDocumentCommand { \algocf@makecaption@ruled } { mm }
@@ -4878,6 +5007,20 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
}
% \end{macrocode}
% \end{macro}
+% \changes{v3.1.0.0}{2022/12/03}{设置\pkgx{algorithm2e}算法三线间距}
+% \begin{macro}{\ctex_at_end_preamble:n}
+% 设置\pkgx{algorithm2e}算法三线间距。
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \bool_if:NT \l_@@_add_alg_rule_vspace_bool
+ {
+ \dim_set:Nn \interspacetitleruled { 5pt }
+ \dim_set:Nn \interspacealgoruled { 5pt }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\@@_tblr_caption_box:n}
% \changes{v2.16.2.0}{2022/11/27}{\envx{longtblr}环境整页宽的caption盒子}
% \pkgx{tabularray}中\envx{longtblr}环境整页宽的caption盒子。
@@ -4933,12 +5076,12 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \end{macrocode}
% \end{macro}
% \subsection{图片}
-% \begin{macro}{\PassOptionsToPackage,\captionsetup}
+% \begin{macro}{\PassOptionsToPackage,\captionsetup*}
% \changes{v0.4.2.0}{2022/04/05}{设置子图标签与标题字体字号}
% 设置子图标签与标题字体字号,支持\pkgx{subfig}和\pkgx{subcaption}宏包。
% \begin{macrocode}
\PassOptionsToPackage { font = small } { subfig }
-\captionsetup [ sub ] { font = customfont }
+\captionsetup* [ sub ] { font = customfont }
% \end{macrocode}
% \end{macro}
% \begin{macro}{\captionsetup}
diff --git a/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty b/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty
index 3d5fb585d62..0414b344920 100644
--- a/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty
+++ b/Master/texmf-dist/tex/xelatex/xduts/xdufont.sty
@@ -28,7 +28,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplPackage{xdufont}
- {2022/12/01}{2.18.1.1}
+ {2022/12/03}{3.1.0.0}
{Xidian University Font package}
\RequirePackage { xparse, l3keys2e }
\PassOptionsToPackage { quiet } { xeCJK }
diff --git a/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls b/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls
index bc23e6e99c2..da26f8d49e7 100644
--- a/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls
+++ b/Master/texmf-dist/tex/xelatex/xduts/xdupgthesis.cls
@@ -28,7 +28,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplClass{xdupgthesis}
- {2022/12/01}{2.18.1.1}
+ {2022/12/03}{3.1.0.0}
{Xidian University Postgraduate Thesis document class}
\RequirePackage { xparse, l3keys2e }
\PassOptionsToPackage { quiet } { xeCJK }
@@ -697,11 +697,14 @@
\bool_new:N \l__xdu_fix_graphics_bool
\tl_new:N \l__xdu_ref_add_space_bool
\tl_new:N \l__xdu_cap_label_sep_tl
-\tl_new:N \l__xdu_cap_format_tl
+\tl_new:N \l__xdu_ft_cap_format_tl
+\tl_new:N \l__xdu_alg_cap_format_tl
+\tl_new:N \l__xdu_ft_cap_align_tl
+\tl_new:N \l__xdu_alg_cap_align_tl
+\bool_new:N \l__xdu_add_alg_rule_vspace_bool
\bool_new:N \l__xdu_tab_small_bool
\bool_new:N \l__xdu_alg_small_cap_bool
\bool_new:N \l__xdu_alg_small_bool
-\tl_new:N \l__xdu_alg_capt_align_tl
\clist_new:N \l__xdu_before_skip_clist
\clist_new:N \l__xdu_after_skip_clist
\tl_new:N \l__xdu_chap_tl
@@ -726,13 +729,18 @@
fix-includegraphics .bool_set:N = \l__xdu_fix_graphics_bool,
ref-add-space .bool_set:N = \l__xdu_ref_add_space_bool,
caption-label-sep .tl_set:N = \l__xdu_cap_label_sep_tl,
- caption-format .choices:nn = { plain, hang }
- { \tl_set_eq:NN \l__xdu_cap_format_tl \l_keys_choice_tl },
+ ft-caption-format .choices:nn = { plain, hang }
+ { \tl_set_eq:NN \l__xdu_ft_cap_format_tl \l_keys_choice_tl },
+ alg-caption-format .choices:nn = { plain, hang }
+ { \tl_set_eq:NN \l__xdu_alg_cap_format_tl \l_keys_choice_tl },
+ ft-caption-align .choices:nn = { left, centering, centering-left }
+ { \tl_set_eq:NN \l__xdu_ft_cap_align_tl \l_keys_choice_tl },
+ alg-caption-align .choices:nn = { left, centering, centering-left }
+ { \tl_set_eq:NN \l__xdu_alg_cap_align_tl \l_keys_choice_tl },
+ add-alg-rule-vspace .bool_set:N = \l__xdu_add_alg_rule_vspace_bool,
table-small-font .bool_set:N = \l__xdu_tab_small_bool,
algorithm-small-caption .bool_set:N = \l__xdu_alg_small_cap_bool,
algorithm-small-font .bool_set:N = \l__xdu_alg_small_bool,
- algorithm-caption-align .choices:nn = { left, centering }
- { \tl_set_eq:NN \l__xdu_alg_capt_align_tl \l_keys_choice_tl },
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,
@@ -756,7 +764,11 @@
style / fix-includegraphics = false,
style / ref-add-space = false,
style / caption-label-sep = { 0.75em },
- style / caption-format = { hang },
+ style / ft-caption-format = { hang },
+ style / alg-caption-format = { hang },
+ style / ft-caption-align = { centering-left },
+ style / alg-caption-align = { left },
+ style / add-alg-rule-vspace = { false },
style / table-small-font = true,
style / algorithm-small-caption = true,
style / algorithm-small-font = true,
@@ -1257,16 +1269,10 @@
}
{ }
}
+\PassOptionsToPackage { ruled } { caption }
\RequirePackage { caption }
\DeclareCaptionLabelSeparator { customskip } { \hskip \l__xdu_cap_label_sep_tl }
\DeclareCaptionFont { customfont } { \__xdu_rm_family: \zihao { 5 } }
-\DeclareCaptionFont { algcustomfont }
- {
- \__xdu_rm_family:
- \bool_if:NTF \l__xdu_alg_small_cap_bool
- { \zihao { 5 } }
- { \zihao { -4 } }
- }
\captionsetup
{
labelsep = customskip,
@@ -1274,10 +1280,25 @@
}
\ctex_at_end_preamble:n
{
- \tl_if_eq:NnTF \l__xdu_cap_format_tl { hang }
- { \captionsetup { format = hang } } { }
+ \tl_if_eq:NnTF \l__xdu_ft_cap_format_tl { hang }
+ { \captionsetup { format = hang } }
+ { \captionsetup { format = plain } }
+ \tl_if_eq:NnTF \l__xdu_ft_cap_align_tl { left }
+ { \captionsetup { singlelinecheck = false, justification = justified } }
+ {
+ \tl_if_eq:NnTF \l__xdu_ft_cap_align_tl { centering }
+ { \captionsetup { singlelinecheck = false, justification = centerlast } }
+ { \captionsetup { singlelinecheck = true, justification = justified } }
+ }
}
-\captionsetup [ algorithm ]
+\DeclareCaptionFont { algcustomfont }
+ {
+ \__xdu_rm_family:
+ \bool_if:NTF \l__xdu_alg_small_cap_bool
+ { \zihao { 5 } }
+ { \zihao { -4 } }
+ }
+\captionsetup* [ algorithm ]
{
labelsep = customskip,
labelfont = algcustomfont,
@@ -1285,12 +1306,42 @@
}
\ctex_at_end_preamble:n
{
- \tl_if_eq:NnTF \l__xdu_alg_capt_align_tl { left }
+ \tl_if_eq:NnTF \l__xdu_alg_cap_format_tl { hang }
+ { \captionsetup* [ algorithm ] { format = hang } }
+ { \captionsetup* [ algorithm ] { format = plain } }
+ \captionsetup* [ ruled ] { strut = 0 }
+ \tl_if_eq:NnTF \l__xdu_ft_cap_align_tl { left }
{
- \tl_if_eq:NnTF \l__xdu_cap_format_tl { hang }
- { \captionsetup [ algorithm ] { format = hang } } { }
+ \captionsetup* [ algorithm ]
+ { singlelinecheck = false, justification = justified }
+ }
+ {
+ \tl_if_eq:NnTF \l__xdu_ft_cap_align_tl { centering }
+ {
+ \captionsetup* [ algorithm ]
+ { singlelinecheck = false, justification = centerlast }
+ }
+ {
+ \cs_set_eq:NN \floatc@ruled \floatc@plain
+ \captionsetup* [ ruled ] { slc = 1 }
+ \captionsetup* [ algorithm ]
+ { singlelinecheck = true, justification = justified }
+ }
+ }
+ }
+\ctex_at_end_preamble:n
+ {
+ \bool_if:NT \l__xdu_add_alg_rule_vspace_bool
+ {
+ \cs_set:Npn \fs@ruled
+ {
+ \cs_set_eq:NN \@fs@capt \floatc@plain
+ \cs_set:Npn \@fs@pre { \hrule height .8pt depth 0pt \kern 5pt }
+ \cs_set:Npn \@fs@post { \kern 5pt \hrule \relax }
+ \cs_set:Npn \@fs@mid { \kern 5pt \hrule \kern 5pt }
+ \cs_set_eq:NN \@fs@iftopcapt \iftrue
+ }
}
- { \captionsetup [ algorithm ] { justification = centering } }
}
\ctex_at_end_preamble:n
{
@@ -1307,33 +1358,51 @@
\SetAlCapFnt { \__xdu_rm_family: \zihao { -4 } }
}
\SetAlCapSty { }
- \tl_if_eq:NnTF \l__xdu_alg_capt_align_tl { left }
+ \RenewDocumentCommand { \algocf@makecaption } { mm }
{
- \box_new:N \l__xdu_algtwoe_capt_box
- \RenewDocumentCommand { \algocf@makecaption } { mm }
+ \box_clear_new:N \l__xdu_algiie_capt_box
+ \hbox_set:Nn \l__xdu_algiie_capt_box
+ { \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ \dim_compare:nNnTF { \box_wd:N \l__xdu_algiie_capt_box } > { \hsize }
{
- \hbox_set:Nn \l__xdu_algtwoe_capt_box
- { \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
- \dim_compare:nNnTF { \box_wd:N \l__xdu_algtwoe_capt_box } > { \hsize }
+ \tl_if_eq:NnTF \l__xdu_alg_cap_format_tl { hang }
{
- \tl_if_eq:NnTF \l__xdu_cap_format_tl { hang }
+ \tl_if_eq:NnTF \l__xdu_alg_cap_align_tl { centering }
+ {
+ \makebox { \AlCapFnt #1 \algocf@capseparator }
+ \makebox
+ {
+ \parbox [ t ] { \hsize }
+ { \centering \AlCapNameFnt #2 }
+ }
+ }
{
\makebox { \AlCapFnt #1 \algocf@capseparator }
\makebox { \parbox [ t ] { \hsize } { \AlCapNameFnt #2 } }
}
+ }
+ {
+ \tl_if_eq:NnTF \l__xdu_alg_cap_align_tl { centering }
+ {
+ \parbox { \columnwidth }
+ { \centering \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2}
+ }
{
\parbox { \columnwidth }
{ \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2}
}
}
- { \makebox [ \columnwidth ] { \box_use:N \l__xdu_algtwoe_capt_box } }
}
- }
- {
- \RenewDocumentCommand { \algocf@makecaption } { mm }
{
- \parbox { \columnwidth }
- { \centering \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ \tl_if_eq:NnTF \l__xdu_alg_cap_align_tl { left }
+ {
+ \parbox { \columnwidth }
+ { \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ }
+ {
+ \parbox { \columnwidth }
+ { \centering \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ }
}
}
\RenewDocumentCommand { \algocf@makecaption@ruled } { mm }
@@ -1342,6 +1411,14 @@
{ \global \sbox \algocf@capbox { \algocf@makecaption { #1 } { #2 } } }
}
}
+\ctex_at_end_preamble:n
+ {
+ \bool_if:NT \l__xdu_add_alg_rule_vspace_bool
+ {
+ \dim_set:Nn \interspacetitleruled { 5pt }
+ \dim_set:Nn \interspacealgoruled { 5pt }
+ }
+ }
\cs_new:Npn \__xdu_tblr_caption_box:n #1
{ \makebox [ \tablewidth ] { \parbox { \columnwidth } { #1 } } }
\ctex_at_end_preamble:n
@@ -1382,7 +1459,7 @@
{ }
}
\PassOptionsToPackage { font = small } { subfig }
-\captionsetup [ sub ] { font = customfont }
+\captionsetup* [ sub ] { font = customfont }
\ctex_at_end_preamble:n
{
\@ifpackageloaded { subfig }
diff --git a/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls b/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls
index 26afb1b1b6d..61ede967dac 100644
--- a/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls
+++ b/Master/texmf-dist/tex/xelatex/xduts/xduugthesis.cls
@@ -28,7 +28,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplClass{xduugthesis}
- {2022/12/01}{2.18.1.1}
+ {2022/12/03}{3.1.0.0}
{Xidian University Undergraduate Thesis document class}
\RequirePackage { xparse, l3keys2e }
\PassOptionsToPackage { quiet } { xeCJK }
@@ -530,11 +530,14 @@
\bool_new:N \l__xdu_fix_graphics_bool
\tl_new:N \l__xdu_ref_add_space_bool
\tl_new:N \l__xdu_cap_label_sep_tl
-\tl_new:N \l__xdu_cap_format_tl
+\tl_new:N \l__xdu_ft_cap_format_tl
+\tl_new:N \l__xdu_alg_cap_format_tl
+\tl_new:N \l__xdu_ft_cap_align_tl
+\tl_new:N \l__xdu_alg_cap_align_tl
+\bool_new:N \l__xdu_add_alg_rule_vspace_bool
\bool_new:N \l__xdu_tab_small_bool
\bool_new:N \l__xdu_alg_small_cap_bool
\bool_new:N \l__xdu_alg_small_bool
-\tl_new:N \l__xdu_alg_capt_align_tl
\clist_new:N \l__xdu_before_skip_clist
\clist_new:N \l__xdu_after_skip_clist
\tl_new:N \l__xdu_chap_tl
@@ -559,13 +562,18 @@
fix-includegraphics .bool_set:N = \l__xdu_fix_graphics_bool,
ref-add-space .bool_set:N = \l__xdu_ref_add_space_bool,
caption-label-sep .tl_set:N = \l__xdu_cap_label_sep_tl,
- caption-format .choices:nn = { plain, hang }
- { \tl_set_eq:NN \l__xdu_cap_format_tl \l_keys_choice_tl },
+ ft-caption-format .choices:nn = { plain, hang }
+ { \tl_set_eq:NN \l__xdu_ft_cap_format_tl \l_keys_choice_tl },
+ alg-caption-format .choices:nn = { plain, hang }
+ { \tl_set_eq:NN \l__xdu_alg_cap_format_tl \l_keys_choice_tl },
+ ft-caption-align .choices:nn = { left, centering, centering-left }
+ { \tl_set_eq:NN \l__xdu_ft_cap_align_tl \l_keys_choice_tl },
+ alg-caption-align .choices:nn = { left, centering, centering-left }
+ { \tl_set_eq:NN \l__xdu_alg_cap_align_tl \l_keys_choice_tl },
+ add-alg-rule-vspace .bool_set:N = \l__xdu_add_alg_rule_vspace_bool,
table-small-font .bool_set:N = \l__xdu_tab_small_bool,
algorithm-small-caption .bool_set:N = \l__xdu_alg_small_cap_bool,
algorithm-small-font .bool_set:N = \l__xdu_alg_small_bool,
- algorithm-caption-align .choices:nn = { left, centering }
- { \tl_set_eq:NN \l__xdu_alg_capt_align_tl \l_keys_choice_tl },
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,
@@ -589,7 +597,11 @@
style / fix-includegraphics = false,
style / ref-add-space = false,
style / caption-label-sep = { 0.75em },
- style / caption-format = { hang },
+ style / ft-caption-format = { hang },
+ style / alg-caption-format = { hang },
+ style / ft-caption-align = { centering-left },
+ style / alg-caption-align = { left },
+ style / add-alg-rule-vspace = { false },
style / table-small-font = true,
style / algorithm-small-caption = true,
style / algorithm-small-font = true,
@@ -1043,16 +1055,10 @@
}
{ }
}
+\PassOptionsToPackage { ruled } { caption }
\RequirePackage { caption }
\DeclareCaptionLabelSeparator { customskip } { \hskip \l__xdu_cap_label_sep_tl }
\DeclareCaptionFont { customfont } { \__xdu_rm_family: \zihao { 5 } }
-\DeclareCaptionFont { algcustomfont }
- {
- \__xdu_rm_family:
- \bool_if:NTF \l__xdu_alg_small_cap_bool
- { \zihao { 5 } }
- { \zihao { -4 } }
- }
\captionsetup
{
labelsep = customskip,
@@ -1060,10 +1066,25 @@
}
\ctex_at_end_preamble:n
{
- \tl_if_eq:NnTF \l__xdu_cap_format_tl { hang }
- { \captionsetup { format = hang } } { }
+ \tl_if_eq:NnTF \l__xdu_ft_cap_format_tl { hang }
+ { \captionsetup { format = hang } }
+ { \captionsetup { format = plain } }
+ \tl_if_eq:NnTF \l__xdu_ft_cap_align_tl { left }
+ { \captionsetup { singlelinecheck = false, justification = justified } }
+ {
+ \tl_if_eq:NnTF \l__xdu_ft_cap_align_tl { centering }
+ { \captionsetup { singlelinecheck = false, justification = centerlast } }
+ { \captionsetup { singlelinecheck = true, justification = justified } }
+ }
}
-\captionsetup [ algorithm ]
+\DeclareCaptionFont { algcustomfont }
+ {
+ \__xdu_rm_family:
+ \bool_if:NTF \l__xdu_alg_small_cap_bool
+ { \zihao { 5 } }
+ { \zihao { -4 } }
+ }
+\captionsetup* [ algorithm ]
{
labelsep = customskip,
labelfont = algcustomfont,
@@ -1071,12 +1092,42 @@
}
\ctex_at_end_preamble:n
{
- \tl_if_eq:NnTF \l__xdu_alg_capt_align_tl { left }
+ \tl_if_eq:NnTF \l__xdu_alg_cap_format_tl { hang }
+ { \captionsetup* [ algorithm ] { format = hang } }
+ { \captionsetup* [ algorithm ] { format = plain } }
+ \captionsetup* [ ruled ] { strut = 0 }
+ \tl_if_eq:NnTF \l__xdu_ft_cap_align_tl { left }
{
- \tl_if_eq:NnTF \l__xdu_cap_format_tl { hang }
- { \captionsetup [ algorithm ] { format = hang } } { }
+ \captionsetup* [ algorithm ]
+ { singlelinecheck = false, justification = justified }
+ }
+ {
+ \tl_if_eq:NnTF \l__xdu_ft_cap_align_tl { centering }
+ {
+ \captionsetup* [ algorithm ]
+ { singlelinecheck = false, justification = centerlast }
+ }
+ {
+ \cs_set_eq:NN \floatc@ruled \floatc@plain
+ \captionsetup* [ ruled ] { slc = 1 }
+ \captionsetup* [ algorithm ]
+ { singlelinecheck = true, justification = justified }
+ }
+ }
+ }
+\ctex_at_end_preamble:n
+ {
+ \bool_if:NT \l__xdu_add_alg_rule_vspace_bool
+ {
+ \cs_set:Npn \fs@ruled
+ {
+ \cs_set_eq:NN \@fs@capt \floatc@plain
+ \cs_set:Npn \@fs@pre { \hrule height .8pt depth 0pt \kern 5pt }
+ \cs_set:Npn \@fs@post { \kern 5pt \hrule \relax }
+ \cs_set:Npn \@fs@mid { \kern 5pt \hrule \kern 5pt }
+ \cs_set_eq:NN \@fs@iftopcapt \iftrue
+ }
}
- { \captionsetup [ algorithm ] { justification = centering } }
}
\ctex_at_end_preamble:n
{
@@ -1093,33 +1144,51 @@
\SetAlCapFnt { \__xdu_rm_family: \zihao { -4 } }
}
\SetAlCapSty { }
- \tl_if_eq:NnTF \l__xdu_alg_capt_align_tl { left }
+ \RenewDocumentCommand { \algocf@makecaption } { mm }
{
- \box_new:N \l__xdu_algtwoe_capt_box
- \RenewDocumentCommand { \algocf@makecaption } { mm }
+ \box_clear_new:N \l__xdu_algiie_capt_box
+ \hbox_set:Nn \l__xdu_algiie_capt_box
+ { \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ \dim_compare:nNnTF { \box_wd:N \l__xdu_algiie_capt_box } > { \hsize }
{
- \hbox_set:Nn \l__xdu_algtwoe_capt_box
- { \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
- \dim_compare:nNnTF { \box_wd:N \l__xdu_algtwoe_capt_box } > { \hsize }
+ \tl_if_eq:NnTF \l__xdu_alg_cap_format_tl { hang }
{
- \tl_if_eq:NnTF \l__xdu_cap_format_tl { hang }
+ \tl_if_eq:NnTF \l__xdu_alg_cap_align_tl { centering }
+ {
+ \makebox { \AlCapFnt #1 \algocf@capseparator }
+ \makebox
+ {
+ \parbox [ t ] { \hsize }
+ { \centering \AlCapNameFnt #2 }
+ }
+ }
{
\makebox { \AlCapFnt #1 \algocf@capseparator }
\makebox { \parbox [ t ] { \hsize } { \AlCapNameFnt #2 } }
}
+ }
+ {
+ \tl_if_eq:NnTF \l__xdu_alg_cap_align_tl { centering }
+ {
+ \parbox { \columnwidth }
+ { \centering \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2}
+ }
{
\parbox { \columnwidth }
{ \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2}
}
}
- { \makebox [ \columnwidth ] { \box_use:N \l__xdu_algtwoe_capt_box } }
}
- }
- {
- \RenewDocumentCommand { \algocf@makecaption } { mm }
{
- \parbox { \columnwidth }
- { \centering \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ \tl_if_eq:NnTF \l__xdu_alg_cap_align_tl { left }
+ {
+ \parbox { \columnwidth }
+ { \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ }
+ {
+ \parbox { \columnwidth }
+ { \centering \AlCapFnt #1 \algocf@capseparator \AlCapNameFnt #2 }
+ }
}
}
\RenewDocumentCommand { \algocf@makecaption@ruled } { mm }
@@ -1128,6 +1197,14 @@
{ \global \sbox \algocf@capbox { \algocf@makecaption { #1 } { #2 } } }
}
}
+\ctex_at_end_preamble:n
+ {
+ \bool_if:NT \l__xdu_add_alg_rule_vspace_bool
+ {
+ \dim_set:Nn \interspacetitleruled { 5pt }
+ \dim_set:Nn \interspacealgoruled { 5pt }
+ }
+ }
\cs_new:Npn \__xdu_tblr_caption_box:n #1
{ \makebox [ \tablewidth ] { \parbox { \columnwidth } { #1 } } }
\ctex_at_end_preamble:n
@@ -1168,7 +1245,7 @@
{ }
}
\PassOptionsToPackage { font = small } { subfig }
-\captionsetup [ sub ] { font = customfont }
+\captionsetup* [ sub ] { font = customfont }
\ctex_at_end_preamble:n
{
\@ifpackageloaded { subfig }