From 7a92e89960daddace54ddc3e8a0abcc4832a6fe9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 28 Jul 2022 20:12:00 +0000 Subject: xduts (28jul22) git-svn-id: svn://tug.org/texlive/trunk@63996 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/xelatex/xduts/xduts.dtx | 172 ++++++++++++++++++----- 1 file changed, 134 insertions(+), 38 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 8e43cadca14..86fd91d50f1 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/06/28 v2.10.3.0 Xidian University TeX Suite] +[2022/07/28 v2.12.1.1 Xidian University TeX Suite] % %\NeedsTeXFormat{LaTeX2e} %\RequirePackage{expl3} %\ProvidesExplPackage{xdufont} %\ProvidesExplClass{xdupgthesis} %\ProvidesExplClass{xduugthesis} -% {2022/06/28}{2.10.3.0} +% {2022/07/28}{2.12.1.1} % {Xidian University Font package} % {Xidian University Postgraduate Thesis document class} % {Xidian University Undergraduate Thesis document class} @@ -155,22 +155,6 @@ \end{document} % % \fi -% \CheckSum{3008} -% \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 -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} % \GetFileInfo{\jobname.dtx} % \title{\bfseries\xduts{}手册} % \author{\href{https://github.com/note286/}{note286}} @@ -197,6 +181,8 @@ % \end{enumerate} % \end{abstract} % \clearpage +% \begin{documentation} +% \changes{v2.12.1.1}{2022/07/28}{使用\clsx{l3doc}文档和实现环境} % \section*{\contentsname\markright{目录}} % \makeatletter % \@starttoc{toc} @@ -225,7 +211,6 @@ % 如确定\xduts{}存在bug, % 可以在GitHub Issues\footurl{https://github.com/note286/xduts/issues/} % 具体描述。另外,\textbf{不接受任何Pull Requests}。 -% \StopEventually{} % \section{使用说明} % \label{使用说明} % 《一份(不太)简短的\LaTeXe{}介绍》\footctan{info/lshort/chinese/lshort-zh-cn.pdf} @@ -289,6 +274,8 @@ % 语言配置见\secrefx{语言配置}, % 参考文献配置见\secrefx{参考文献配置}, % 页面配置见\secrefx{页面配置}, +% \changes{v2.12.0.1}{2022/07/01}{研究生学位论文增加文件配置} +% 文件配置见\secrefx{文件配置}, % 交叉引用配置见\secrefx{交叉引用配置}, % Caption配置见\secrefx{Caption配置}, % 表格配置见\secrefx{表格配置}, @@ -329,6 +316,8 @@ % 部分英文字体切换见\secrefx{英文字体}, % 参考文献配置见\secrefx{参考文献配置}, % 页面配置见\secrefx{页面配置}, +% \changes{v2.12.0.1}{2022/07/01}{本科生毕业设计增加文件配置} +% 文件配置见\secrefx{文件配置}, % 交叉引用配置见\secrefx{交叉引用配置}, % Caption配置见\secrefx{Caption配置}, % 表格配置见\secrefx{表格配置}, @@ -642,6 +631,27 @@ % \item[分散对齐] 页面高度均匀地填满,使每一页的底部直接对齐。 % \item[顶部对齐] 页面中的内容保持它的自然高度,每一页的页面底部用空白填满。 % \end{optdesc} +% \subsection{文件配置} +% \label{文件配置} +% \begin{function}[added=2022-07-01]{style/file-search-path} +% \begin{syntax} +% \optx{style/file-search-path}=\argx{路径} +% \end{syntax} +% 设置文件搜索路径,可用于\tnx{input}、\tnx{include}和\tnx{includegraphics}, +% 多个路径之间需要使用英文半角逗号隔开。 +% 设置后\tnx{input}、\tnx{include}和\tnx{includegraphics}仅需填写文件名。 +% \end{function} +% \begin{function}[added=2022-07-01]{style/fix-input,style/fix-include,style/fix-includegraphics} +% \begin{syntax} +% \optx{style/fix-input}=\metax{true|(false)} +% \optx{style/fix-include}=\metax{true|(false)} +% \optx{style/fix-includegraphics}=\metax{true|(false)} +% \end{syntax} +% TEXMF树搜索优先级高于用户自定义的文件搜索路径, +% 如果在TEXMF树内存在同名文件,则会导致错误的文件被加载。 +% 通过为\tnx{input}、\tnx{include}和\tnx{includegraphics}命令打补丁可以避免该问题。 +% 如果用户的\TeX{}或图片等文件不与TEXMF树内文件同名,或与\TeX{}主文件在同一目录,则无需打补丁。 +% \end{function} % \subsection{交叉引用配置} % \label{交叉引用配置} % \begin{function}[added=2022-04-16,updated=2022-05-08]{style/ref-add-space} @@ -1443,9 +1453,10 @@ % \setlength\parindent{2em} % \subsection{页面和信息移除} % \label{页面和信息移除} +% \changes{v2.12.1.0}{2022/07/03}{页面和信息移除选项增加分组} % \begin{function}[added=2022-06-26]{style/remove-page} % \begin{syntax} -% \optx{style/remove-page}=\metax{封面|提名页|声明页|摘要|索引|对照表|目录|附录|参考文献|致谢|作者简介} +% \optx{style/remove-page}=\argx{封面|提名页|声明页|摘要|索引|对照表|目录|附录|参考文献|致谢|作者简介} % \end{syntax} % 设置移除的页面,可多选,多个值之间需要使用英文半角逗号隔开。 % \end{function} @@ -1559,6 +1570,9 @@ % 提供了很大帮助。 % 在文档的编写过程中,参考了\filex{ctex.dtx}、\filex{fduthesis.dtx}、\filex{njuthesis.dtx}和\filex{thuthesis.dtx}。 % \clearpage +% \end{documentation} +% \begin{implementation} +% \addtocontents{toc}{\protect\value{tocdepth}=5} % \section{代码实现} % \changes{v0.1.0.0}{2022/04/03}{基本完成本科毕业设计论文模板} % \setlength\parindent{0pt} @@ -2393,17 +2407,15 @@ % \end{macro} % \begin{macro}{\@@_load_math_font_xits:} % \changes{v0.5.1.0}{2022/04/06}{适配macOS平台MacTeX内置XITSMath数学字体} +% \changes{v2.12.1.0}{2022/07/03}{移除XITSMath数学字体冗余语句} % 数学字体配置\valuex{xits}。 % \begin{macrocode} \cs_new:Npn \@@_load_math_font_xits: { \@@_load_unicode_math_pkg: \@@_if_platform_macos:FT + { \setmathfont { XITS~Math } } { - \setmathfont { XITS~Math } - } - { - \@@_load_unicode_math_pkg: \setmathfont { XITSMath-Regular.otf } \setmathfont { XITSMath-Bold.otf } [ range= { bfup -> up, bfit -> it } ] @@ -3163,6 +3175,11 @@ % \l_@@_lang_tl, % \l_@@_bib_tool_tl, % \l_@@_biblatex_option_tl, +% \l_@@_search_path_clist, +% \l_@@_fix_input_bool, +% \l_@@_fix_include_bool, +% \l_@@_fix_graphics_bool, +% \l_@@_ref_add_space_bool, % \l_@@_cap_label_sep_tl, % \l_@@_tab_small_bool, % \l_@@_alg_small_cap_bool, @@ -3178,6 +3195,7 @@ % \l_@@_sym_mgn_bool, % \l_@@_page_v_align_tl % } +% \changes{v2.12.0.2}{2022/07/01}{精简变量名称} % 英文是否使用中文字体。 % \begin{macrocode} \bool_new:N \l_@@_en_cjk_font_bool @@ -3194,9 +3212,19 @@ % \begin{macrocode} \tl_new:N \l_@@_biblatex_option_tl % \end{macrocode} +% 设置文件搜索路径。 +% \begin{macrocode} +\clist_new:N \l_@@_search_path_clist +% \end{macrocode} +% 是否修复文件导入命令。 +% \begin{macrocode} +\bool_new:N \l_@@_fix_input_bool +\bool_new:N \l_@@_fix_include_bool +\bool_new:N \l_@@_fix_graphics_bool +% \end{macrocode} % 是否在\tnx{ref}和\tnx{pageref}两侧自动调整中英文间空白。 % \begin{macrocode} -\tl_new:N \l_@@_ref_add_space +\tl_new:N \l_@@_ref_add_space_bool % \end{macrocode} % 标签与后面标题之间的间距。 % \begin{macrocode} @@ -3261,9 +3289,19 @@ % \begin{macrocode} biblatex-option .tl_set:N = \l_@@_biblatex_option_tl, % \end{macrocode} +% 设置文件搜索路径。 +% \begin{macrocode} + file-search-path .clist_set:N = \l_@@_search_path_clist, +% \end{macrocode} +% 是否修复文件导入命令。 +% \begin{macrocode} + fix-input .bool_set:N = \l_@@_fix_input_bool, + fix-include .bool_set:N = \l_@@_fix_include_bool, + fix-includegraphics .bool_set:N = \l_@@_fix_graphics_bool, +% \end{macrocode} % 是否在\tnx{ref}和\tnx{pageref}两侧自动调整中英文间空白。 % \begin{macrocode} - ref-add-space .bool_set:N = \l_@@_ref_add_space, + ref-add-space .bool_set:N = \l_@@_ref_add_space_bool, % \end{macrocode} % 标签与后面标题之间的间距。 % \begin{macrocode} @@ -3317,6 +3355,10 @@ style / language = zh, style / bib-backend = biblatex, style / biblatex-option = { }, + style / file-search-path = { }, + style / fix-input = false, + style / fix-include = false, + style / fix-includegraphics = false, style / ref-add-space = false, style / caption-label-sep = { 0.75em }, style / table-small-font = true, @@ -3419,16 +3461,16 @@ % \subsection{作者简介样式配置} % \begin{variable} % { -% \l_@@_customize_edubg_bool, -% \l_@@_customize_resresult_bool +% \l_@@_cust_edubg_bool, +% \l_@@_cust_resresult_bool % } % 是否完全自定义作者简介中教育背景。 % \begin{macrocode} -\bool_new:N \l_@@_customize_edubg_bool +\bool_new:N \l_@@_cust_edubg_bool % \end{macrocode} % 是否完全自定义作者简介中攻读硕士学位期间的研究成果。 % \begin{macrocode} -\bool_new:N \l_@@_customize_resresult_bool +\bool_new:N \l_@@_cust_resresult_bool % \end{macrocode} % \end{variable} % \begin{macro}{\keys_define:nn} @@ -3439,11 +3481,11 @@ % \end{macrocode} % 是否完全自定义作者简介中教育背景。 % \begin{macrocode} - customize-edubg .bool_set:N = \l_@@_customize_edubg_bool, + customize-edubg .bool_set:N = \l_@@_cust_edubg_bool, % \end{macrocode} % 是否完全自定义作者简介中攻读硕士学位期间的研究成果。 % \begin{macrocode} - customize-resresult .bool_set:N = \l_@@_customize_resresult_bool + customize-resresult .bool_set:N = \l_@@_cust_resresult_bool } % \end{macrocode} % \end{macro} @@ -4496,6 +4538,48 @@ % %<*thesis> % \end{macrocode} +% \subsection{文件配置} +% \begin{macro} +% { +% \input, +% \include, +% \includegraphics +% } +% \changes{v2.12.0.0}{2022/07/01}{配置文件搜索路径} +% 配置文件搜索路径。 +% \begin{macrocode} +\ctex_at_end_preamble:n + { + \seq_if_empty:NF \l_@@_search_path_clist + { + \clist_map_inline:Nn \l_@@_search_path_clist + { \seq_put_right:Nn \l_file_search_path_seq { #1 } } + } + \bool_if:NT \l_@@_fix_input_bool + { + \cs_new_eq:NN \@@_org_input:n \input + \RenewDocumentCommand { \input } { m } + { \@@_org_input:n { ./ #1 } } + } + \bool_if:NT \l_@@_fix_include_bool + { + \cs_new_eq:NN \@@_org_include:n \include + \RenewDocumentCommand { \include } { m } + { \@@_org_include:n { ./ #1 } } + } + \bool_if:NT \l_@@_fix_graphics_bool + { + \cs_new_eq:NN \@@_org_includegraphics:n \includegraphics + \RenewDocumentCommand { \includegraphics } { o m } + { + \IfNoValueTF { #1 } + { \@@_org_includegraphics:n { ./ #2 } } + { \@@_org_includegraphics:n [ #1 ] { ./ #2 } } + } + } + } +% \end{macrocode} +% \end{macro} % \subsection{公式} % \begin{macro}{\theequation} % 重定义公式编号样式。 @@ -4503,6 +4587,19 @@ \renewcommand { \theequation } { \thechapter - \arabic { equation } } % \end{macrocode} % \end{macro} +% \subsection{浮动体} +% \begin{variable} +% { +% \topfraction, +% \floatpagefraction +% } +% \changes{v2.11.0.0}{2022/06/30}{限制浮动环境占用大小} +% 限制浮动环境占用大小。 +% \begin{macrocode} +\cs_set:Npn \topfraction { .8 } +\cs_set:Npn \floatpagefraction { .8 } +% \end{macrocode} +% \end{variable} % \subsection{算法} % \begin{macro}{\ALG@name,\algorithmcfname} % \changes{v1.1.1.0}{2022/04/15}{汉化算法标签名称} @@ -4776,7 +4873,7 @@ % \end{macrocode} % \end{macro} % \subsection{超链接和PDF元数据} -% \begin{macro}{\hyperref} +% \begin{macro}{\hypersetup} % \changes{v0.5.0.0}{2022/04/05}{添加PDF主题元数据} % \changes{v1.10.0.0}{2022/05/04}{添加PDF应用程序元数据} % 配置超链接和PDF元数据。 @@ -4809,7 +4906,7 @@ % \begin{macrocode} \ctex_at_end_preamble:n { - \bool_if:NT \l_@@_ref_add_space + \bool_if:NT \l_@@_ref_add_space_bool { \str_if_eq:NNT { \l_@@_lang_tl } { zh } { @@ -6633,7 +6730,7 @@ % \end{macrocode} % 定义教育背景表格环境。 % \begin{macrocode} - \bool_if:NF \l_@@_customize_edubg_bool + \bool_if:NF \l_@@_cust_edubg_bool { \RequirePackage { tabularray } \newenvironment { edubg } @@ -6653,7 +6750,7 @@ % \end{macrocode} % 定义研究成果列表。 % \begin{macrocode} - \bool_if:NF \l_@@_customize_resresult_bool + \bool_if:NF \l_@@_cust_resresult_bool { \RequirePackage { enumitem } \SetEnumitemKey { resresult } @@ -6776,5 +6873,4 @@ % \begin{macrocode} %<@@=> % \end{macrocode} -% \Finale -\endinput +% \end{implementation} -- cgit v1.2.3