From df318fff657410f45cb2497f87d9d80c5c3f745a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 5 Mar 2023 20:50:23 +0000 Subject: xduts (5mar23) (branch) git-svn-id: svn://tug.org/texlive/branches/branch2022.final@66368 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/xelatex/xduts/xduts.dtx | 118 +++++++++++++++++++---- 1 file changed, 101 insertions(+), 17 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/xelatex/xduts/xduts.dtx b/Master/texmf-dist/source/xelatex/xduts/xduts.dtx index 3802edfdaf2..2212a981cbb 100644 --- a/Master/texmf-dist/source/xelatex/xduts/xduts.dtx +++ b/Master/texmf-dist/source/xelatex/xduts/xduts.dtx @@ -1,7 +1,7 @@ % \iffalse %<*driver> \ProvidesFile{xduts.dtx} -[2023/03/03 v6.0.1.0 Xidian University TeX Suite] +[2023/03/05 v6.1.0.1 Xidian University TeX Suite] % %\NeedsTeXFormat{LaTeX2e} %\RequirePackage{expl3} @@ -9,7 +9,7 @@ %\ProvidesExplClass{xduugtp} %\ProvidesExplClass{xdupgthesis} %\ProvidesExplClass{xduugthesis} -% {2023/03/03}{6.0.1.0} +% {2023/03/05}{6.1.0.1} % {Xidian University Font package} % {Xidian University Undergraduate Thesis Proposal class} % {Xidian University Postgraduate Thesis document class} @@ -179,7 +179,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % \changes{v4.4.5.4}{2023/02/11}{更新许可证版本号} % \renewcommand{\abstractname}{免责声明} % \begin{abstract} -% 在使用\xduts{}时,默认您同意以下内容: +% 在使用\xduts{}时,默认你同意以下内容: % \begin{enumerate} % \item \xduts[]{}作者不对使用\xduts{}产生的格式审查问题负责。 % \item \xduts[]{}的发布遵守\LaTeX{} Project Public License Version 1.3c或更高版本\footurl{https://www.latex-project.org/lppl.txt}。 @@ -237,7 +237,8 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % \par % 请在最新版\LaTeX{}环境中使用最新版\xduts{}[], % 认真阅读相应宏包/文档类使用说明章节后即可使用\xduts{}[]。 -% \subsection{\pkgx[]{xdufont}宏包} +% \changes{v6.0.1.1}{2023/03/04}{修正文档中部分标题书签字符} +% \subsection{\textsf{xdufont}宏包} % \pkgx[]{xdufont}宏包基于\pkgx{xeCJK}宏包和\pkgx{unicode-math}宏包, % 在中文字体配置方面相较于\pkgx{ctex}宏包的主要优势为默认支持宋体粗体、斜体, % 内置多种字体配置,可任意搭配中/英/数学字体,更加符合校内各种文档的撰写要求。 @@ -256,7 +257,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % \secrefx{编译}介绍了如何编译,\secrefx{参数设置}介绍了如何自定义配置,具体的配置选项见\secrefx{字体选项}。 % \par % 学会以上用法后即可使用\pkgx{xdufont}宏包。 -% \subsection{\clsx[]{xduugtp}文档类} +% \subsection{\textsf{xduugtp}文档类} % \clsx[]{xduugtp}文档类基于\clsx{ctexart}文档类, % 提供多种字体配置,信息录入便捷。 % 请在阅读《西安电子科技大学本科毕设设计(论文)开题报告》后再使用\clsx{xduugtp}文档类。 @@ -285,7 +286,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % 支持的信息录入选项见\secrefx{信息录入}。 % \par % 学会以上用法后即可使用\clsx{xduugtp}文档类。 -% \subsection{\clsx[]{xduugthesis}文档类} +% \subsection{\textsf{xduugthesis}文档类} % \clsx[]{xduugthesis}文档类基于\clsx{ctexbook}文档类, % 提供多种字体配置,部分样式可自定义,信息录入便捷。 % \changes{v1.3.1.1}{2022/04/26}{英文本科生毕业设计规范参考说明} @@ -323,7 +324,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % \changes{v1.4.0.0}{2022/04/26}{增加研究生学位论文} % \changes{v1.30.0.2}{2022/06/20}{研究生学位论文文档} % \changes{v2.2.1.1}{2022/06/23}{移除研究生学位论文中关于章节配置的文档} -% \subsection{\clsx[]{xdupgthesis}文档类} +% \subsection{\textsf{xdupgthesis}文档类} % \clsx[]{xdupgthesis}文档类基于\clsx{ctexbook}文档类, % 提供多种字体配置,部分样式可自定义,信息录入便捷。 % 请在阅读《西安电子科技大学研究生学位论文模板(2015年修订版)-2019.03修订》后再使用\clsx{xdupgthesis}文档类。 @@ -802,6 +803,19 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % \item[centering-left] 只有一行时居中,多行时左对齐。 % \end{optdesc} % \end{function} +% \changes{v6.1.0.0}{2023/03/04}{增加图表对齐接口} +% \begin{function}[added=2023-03-04]{style/figure-align,style/table-align} +% \begin{syntax} +% \opt{style/figure-align} = left|(centering)|right +% \opt{style/table-align} = left|(centering)|right +% \end{syntax} +% 设置\envx{figure}和\envx{table}环境中内容对齐方式。 +% \end{function} +% \begin{optdesc} +% \item[left] 左对齐。 +% \item[centering] 居中。 +% \item[right] 右对齐。 +% \end{optdesc} % \changes{v0.10.0.1}{2022/04/13}{补充表格内容字号文档说明} % \begin{function}[added=2022-04-13,updated=2022-04-15]{style/table-small-font} % \begin{syntax} @@ -1748,10 +1762,9 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % 其中,在\clsx{xduugthesis}的开发过程中,^^A % \href{https://github.com/Ke-Huo}{\ttfamily @Ke-Huo}、^^A % \href{https://github.com/GRHun}{\ttfamily @RH}、^^A -% \href{https://github.com/songyueran}{\ttfamily @syr-bloom}^^A +% \href{https://github.com/songyueran}{\ttfamily @syr-bloom} % 等人参与了内测。 -% 同时,也要感谢所有在GitHub和睿思上反馈问题和提出建议的同学、老师们。^^A -% \xduts[]{}的持续发展,离不开你们的帮助与支持。 +% \changes{v6.1.0.1}{2023/03/04}{增加赞助致谢} % \changes{v4.4.5.3}{2023/02/11}{增加致谢参考链接} % \section{致谢} % 在学习文学编程的过程中, @@ -1761,16 +1774,21 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % 在文档的编写过程中,参考了^^A % \filex{ctex.dtx}[]\footurl{https://github.com/CTeX-org/ctex-kit/blob/master/ctex/ctex.dtx}、^^A % \filex[]{fduthesis.dtx}[]\footurl{https://github.com/stone-zeng/fduthesis/blob/main/source/fduthesis.dtx}、^^A -% \filex[]{njuthesis.dtx}[]\footurl{https://github.com/nju-lug/NJUThesis/blob/master/source/njuthesis.dtx}和^^A +% \filex[]{njuthesis.dtx}[]\footurl{https://github.com/nju-lug/NJUThesis/blob/master/source/njuthesis.dtx}\space{}和^^A % \filex{thuthesis.dtx}[]\footurl{https://github.com/tuna/thuthesis/blob/master/thuthesis.dtx}。 +% \par +% 同时,非常感谢赞助\xduts{}的同学们,你们的赞助让我有持续维护的动力。^^A +% 也感谢所有在GitHub和睿思上反馈问题和提出建议的同学、老师们,^^A +% \xduts[]{}的持续发展,离不开你们的帮助与支持。 % \changes{v4.0.1.1}{2022/12/12}{增加支付宝红包二维码} % \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}{增加赞助二维码} % \section{赞助} -% 如果\xduts{}对您有所帮助, -% 可以扫描\figrefx{fig:zanzhu}中的二维码来赞助\xduts{}[]。 +% 如果\xduts{}对你有所帮助, +% 可以扫描\figrefx{fig:zanzhu}中的二维码来赞助\xduts{}[], +% 并备注\xduts{}或其他相关字样以便于确认款项来源。 % \ExplSyntaxOn % \str_set_convert:Nnnn \l_xduts_alipay_red_packet_qr_str {% % 68747470733A2F2F71722E616C697061792E636F6D2F31317731333035336232617236757438% @@ -3629,6 +3647,8 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % \l_@@_alg_cap_align_tl, % \l_@@_add_alg_rule_vspace_bool, % \l_@@_tab_small_bool, +% \l_@@__figure_align_tl, +% \l_@@__table_align_tl, % \l_@@_alg_small_cap_bool, % \l_@@_alg_small_bool, % \l_@@_before_skip_clist, @@ -3699,6 +3719,11 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % \begin{macrocode} \bool_new:N \l_@@_tab_small_bool % \end{macrocode} +% 设置图表内容对齐方式。 +% \begin{macrocode} +\tl_new:N \l_@@_figure_align_tl +\tl_new:N \l_@@_table_align_tl +% \end{macrocode} % 设置算法Caption字号是否为五号。 % \begin{macrocode} \bool_new:N \l_@@_alg_small_cap_bool @@ -3798,6 +3823,13 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % \begin{macrocode} table-small-font .bool_set:N = \l_@@_tab_small_bool, % \end{macrocode} +% 设置图表内容对齐方式。 +% \begin{macrocode} + figure-align .choices:nn = { left, centering, right } + { \tl_set_eq:NN \l_@@_figure_align_tl \l_keys_choice_tl }, + table-align .choices:nn = { left, centering, right } + { \tl_set_eq:NN \l_@@_table_align_tl \l_keys_choice_tl }, +% \end{macrocode} % 设置算法Caption字号是否为五号。 % \begin{macrocode} alg-small-caption .bool_set:N = \l_@@_alg_small_cap_bool, @@ -3857,6 +3889,8 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} style / alg-caption-align = left, style / add-alg-rule-vspace = false, style / table-small-font = true, + style / figure-align = centering, + style / table-align = centering, style / alg-small-caption = true, style / algorithm-small-caption = true, style / alg-small-font = true, @@ -5539,6 +5573,31 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % \end{macrocode} % \end{macro} % \subsection{图片} +% \changes{v6.1.0.0}{2023/03/04}{设置\envx{figure}环境中内容对齐方式} +% \begin{macro}{\@floatboxreset} +% 设置\envx{figure}环境中内容对齐方式。 +% \begin{macrocode} +\ctex_at_end_preamble:n + { + \tl_if_eq:NnTF \l_@@_figure_align_tl { left } + { + \AtBeginEnvironment { figure } + { \g@addto@macro { \@floatboxreset } { \raggedright } } + } + { + \tl_if_eq:NnTF \l_@@_figure_align_tl { centering } + { + \AtBeginEnvironment { figure } + { \g@addto@macro { \@floatboxreset } { \centering } } + } + { + \AtBeginEnvironment { figure } + { \g@addto@macro { \@floatboxreset } { \raggedleft } } + } + } + } +% \end{macrocode} +% \end{macro} % \begin{macro}{\PassOptionsToPackage,\captionsetup*} % \changes{v0.4.2.0}{2022/04/05}{设置子图标签与标题字体字号} % 设置子图标签与标题字体字号,支持\pkgx{subfig}和\pkgx{subcaption}宏包。 @@ -5578,18 +5637,43 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1} % \end{macrocode} % \end{macro} % \subsection{表格} +% \changes{v6.1.0.0}{2023/03/04}{设置\envx{table}环境中内容对齐方式} +% \begin{macro}{\@floatboxreset} +% 设置\envx{table}环境中内容对齐方式。 +% \begin{macrocode} +\ctex_at_end_preamble:n + { + \tl_if_eq:NnTF \l_@@_table_align_tl { left } + { + \AtBeginEnvironment { table } + { \g@addto@macro { \@floatboxreset } { \raggedright } } + } + { + \tl_if_eq:NnTF \l_@@_table_align_tl { centering } + { + \AtBeginEnvironment { table } + { \g@addto@macro { \@floatboxreset } { \centering } } + } + { + \AtBeginEnvironment { table } + { \g@addto@macro { \@floatboxreset } { \raggedleft } } + } + } + } +% \end{macrocode} +% \end{macro} +% \changes{v6.1.0.0}{2023/03/04}{修改表格字号设置方法} % \changes{v0.10.0.0}{2022/04/13}{设置表格字号是否为五号} % \changes{v1.0.2.0}{2022/04/14}{修复表格五号字无法设定浮动位置} -% \begin{macro}{table} +% \begin{macro}{\@floatboxreset} % 设置表格字号是否为五号。 % \begin{macrocode} \ctex_at_end_preamble:n { \bool_if:NT \l_@@_tab_small_bool { - \renewenvironment { table } - { \def\@floatboxreset { \reset@font\small\@setminipage } \@float { table } } - { \end@float } + \AtBeginEnvironment { table } + { \g@addto@macro { \@floatboxreset } { \small } } } } % \end{macrocode} -- cgit v1.2.3