summaryrefslogtreecommitdiff
path: root/macros/xetex/latex/xduts/xduts.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/xetex/latex/xduts/xduts.dtx')
-rw-r--r--macros/xetex/latex/xduts/xduts.dtx620
1 files changed, 525 insertions, 95 deletions
diff --git a/macros/xetex/latex/xduts/xduts.dtx b/macros/xetex/latex/xduts/xduts.dtx
index e17a05a32e..8ec2d39d83 100644
--- a/macros/xetex/latex/xduts/xduts.dtx
+++ b/macros/xetex/latex/xduts/xduts.dtx
@@ -1,19 +1,24 @@
% \iffalse
%<*driver>
\ProvidesFile{xduts.dtx}
-[2022/05/03 v1.8.1.0 Xidian University TeX Suite]
+[2022/05/08 v1.13.2.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/05/03}{1.8.1.0}
+%<class|sty> {2022/05/08}{1.13.2.0}
%<xdufont> {Xidian University Font package}
%<xdupgthesis> {Xidian University Postgraduate Thesis document class}
%<xduugthesis> {Xidian University Undergraduate Thesis document class}
%<*driver>
+\PassOptionsToPackage{AutoFakeBold=3}{xeCJK}
\documentclass{ctxdoc}
+\changes{v1.9.0.0}{2022/05/03}{支持中文选项默认值加粗}
+\changes{v1.9.0.0}{2022/05/03}{增大function环境盒子宽度}
+\addtolength{\marginparwidth}{5mm}
+\geometry{hmargin={0mm,10mm}}
\changes{v0.6.0.0}{2022/04/10}{新增xdufont宏包}
\changes{v0.5.2.1}{2022/04/09}{修改项目名称}
\changes{v0.4.2.1}{2022/04/05}{调整文档目录缩进}
@@ -37,10 +42,15 @@
\usepackage{xurl}
\usepackage{xspace}
\xspaceaddexceptions{。?!,、;:“”‘’—….--~·《》<>_}
-\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage{multirow}
-\usepackage{makecell}
+\usepackage{pifont}
+\newcommand{\cmark}{\ding{51}}
+\usepackage{tabularray}
+\SetTblrStyle{caption-tag}{font=\bfseries}
+\DefTblrTemplate{caption-sep}{default}{\quad}
+\DefTblrTemplate{conthead-text}{default}{(续表)}
+\DefTblrTemplate{contfoot-text}{default}{接下页}
% 交叉引用
\newcommand{\secrefx}[1]{第\xspace\ref{#1}\xspace 节}
\newcommand{\tabrefx}[1]{\tablename\xspace\ref{#1}\xspace}
@@ -145,7 +155,7 @@
\end{document}
%</driver>
% \fi
-% \CheckSum{1195}
+% \CheckSum{1283}
% \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
@@ -320,7 +330,9 @@
% 包括\pkgx{subfig}宏包和\pkgx{subcaption}宏包。
% \subsection{表格}
% 主要适配表格内容字号,
-% 包括所有使用\envx{table}浮动体的表格和\pkgx{longtable}宏包提供的\envx{longtable}环境。
+% 包括所有使用\envx{table}浮动体的表格、
+% \pkgx{tabularray}宏包提供的\envx{tblr}、\envx{longtblr}环境
+% 和\pkgx{longtable}宏包提供的\envx{longtable}环境。
% \section{功能说明}
% \label{功能说明}
% 请根据\secrefx{使用说明}中相应文档类/宏包的说明来选择性地阅读本节内容。
@@ -414,9 +426,9 @@
% \end{syntax}
% 设置中文字体伪斜体倾斜程度。默认为\valuex{0.2}。
% \end{function}
-% \begin{function}[added=2022-03-06,updated=2022-04-13]{style/latin-font}
+% \begin{function}[added=2022-03-06,updated=2022-05-06]{style/latin-font}
% \begin{syntax}
-% \optx{style/latin-font}=\metax{tacn|thcs|(gyre)|none}
+% \optx{style/latin-font}=\metax{tac|tacn|thcs|(gyre)|none}
% \end{syntax}
% 设置英文字体,具体配置见\tabrefx{tab:latin-font}。
% \end{function}
@@ -432,14 +444,16 @@
% \toprule
% \strong{选项名称} & \strong{罗马字体族} & \strong{无衬线字体族} & \strong{打字机字体族} \\
% \midrule
-% |tacn|\tnote{1} & Times New Roman & Arial & Courier New \\
-% |thcs|\tnote{2} & Times New Roman & Helvetica & Courier Std \\
+% |tac|\tnote{1} & Times New Roman & Arial & Consolas \\
+% |tacn|\tnote{2} & Times New Roman & Arial & Courier New \\
+% |thcs|\tnote{3} & Times New Roman & Helvetica & Courier Std \\
% |gyre| & TeX Gyre Termes & TeX Gyre Heros & TeX Gyre Cursor \\
% \bottomrule
% \end{tabularx}
% \begin{tablenotes}
-% \item [1] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{arial.ttf}、\filex{arialbd.ttf}、\filex{ariali.ttf}、\filex{arialbi.ttf}、\filex{cour.ttf}、\filex{courbd.ttf}、\filex{couri.ttf}和\filex{courbi.ttf}。
-% \item [2] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{Helvetica.ttf}、\filex{Helvetica~Bold.ttf}、\filex{Helvetica~Oblique.ttf}、\filex{Helvetica~Bold~Oblique.ttf}、\filex{CourierStd.otf}、\filex{CourierStd-Bold.otf}、\filex{CourierStd-Oblique.otf}和\filex{CourierStd-BoldOblique.otf}。
+% \item [1] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{arial.ttf}、\filex{arialbd.ttf}、\filex{ariali.ttf}、\filex{arialbi.ttf}、\filex{consola.ttf}、\filex{consolab.ttf}、\filex{consolai.ttf}和\filex{consolaz.ttf}。
+% \item [2] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{arial.ttf}、\filex{arialbd.ttf}、\filex{ariali.ttf}、\filex{arialbi.ttf}、\filex{cour.ttf}、\filex{courbd.ttf}、\filex{couri.ttf}和\filex{courbi.ttf}。
+% \item [3] \filex{times.ttf}、\filex{timesbd.ttf}、\filex{timesi.ttf}、\filex{timesbi.ttf}、\filex{Helvetica.ttf}、\filex{Helvetica~Bold.ttf}、\filex{Helvetica~Oblique.ttf}、\filex{Helvetica~Bold~Oblique.ttf}、\filex{CourierStd.otf}、\filex{CourierStd-Bold.otf}、\filex{CourierStd-Oblique.otf}和\filex{CourierStd-BoldOblique.otf}。
% \end{tablenotes}
% \end{threeparttable}
% \end{table}
@@ -569,6 +583,16 @@
% \item[true] 对称。
% \item[false] 不对称。
% \end{optdesc}
+% \begin{function}[added=2022-05-08]{style/page-vertical-align}
+% \begin{syntax}
+% \optx{style/page-vertical-align}=\metax{分散对齐|(顶部对齐)}
+% \end{syntax}
+% 设置页面垂直方向的对齐方式。
+% \end{function}
+% \begin{optdesc}
+% \item[分散对齐] 页面高度均匀地填满,使每一页的底部直接对齐。
+% \item[顶部对齐] 页面中的内容保持它的自然高度,每一页的页面底部用空白填满。
+% \end{optdesc}
% \subsection{交叉引用配置}
% \label{交叉引用配置}
% \begin{function}[added=2022-04-16]{style/ref-add-space}
@@ -684,19 +708,99 @@
% \end{function}
% \subsection{信息录入}
% \label{信息录入}
-% \begin{function}[added=2022-05-02]{info/graduate-type}
+% \changes{v1.9.0.0}{2022/05/03}{增加信息录入选项分类表}
+% \changes{v1.10.3.1}{2022/05/04}{移除专业博士校外导师信息录入}
+% 用户根据\tabrefx{tblr:info}选择相应的选项进行信息录入。
+% \begin{tblr}
+% [
+% long,
+% caption = {信息录入选项分类},
+% label = {tblr:info}
+% ]
+% {
+% width = \linewidth,
+% colspec = lX[c]X[c]X[c]X[c]X[c]X[c],
+% cell{1}{1} = {r = 2}{},
+% cell{1}{2} = {c = 2}{},
+% cell{1}{4} = {c = 2}{},
+% cell{1}{6} = {c = 2}{},
+% hline{1,Z} = {.08em},
+% hline{2} = {2-3}{.08em, leftpos = -1, rightpos = -1, endpos},
+% hline{2} = {4-5}{.08em, leftpos = -1, rightpos = -1, endpos},
+% hline{2} = {6-7}{.08em, leftpos = -1, rightpos = -1, endpos},
+% hline{3} = {.08em},
+% cell{odd[3-Z]}{1-Z} = {gray9},
+% cell{3-Z}{1} = {cmd = \texttt},
+% rowhead = 2
+% }
+% & 本科 & & 硕士 & & 博士 & \\
+% & 校内 & 校外 & 学术 & 专业 & 学术 & 专业 \\
+% graduate-type & & & \cmark & \cmark & \cmark & \cmark \\
+% degree-type & & & \cmark & \cmark & \cmark & \cmark \\
+% degree & & & \cmark & \cmark & \cmark & \cmark \\
+% degree* & & & & \cmark & & \\
+% title & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
+% title* & & & \cmark & \cmark & \cmark & \cmark \\
+% department & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
+% major & \cmark & \cmark & \cmark & & \cmark & \\
+% major* & & & \cmark & & \cmark & \\
+% sub-major & & & \cmark & & \cmark & \\
+% domain & & & & \cmark & & \cmark \\
+% author & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
+% author* & & & \cmark & \cmark & \cmark & \cmark \\
+% supervisor & \cmark & & \cmark & \cmark & \cmark & \cmark \\
+% supervisor* & & & \cmark & \cmark & \cmark & \cmark \\
+% supervisor-department & \cmark & & & & & \\
+% supervisor-enterprise & & \cmark & & \cmark & & \\
+% supervisor-enterprise* & & & & \cmark & & \\
+% supervisor-school & & \cmark & & & & \\
+% supervisor-title & & & \cmark & \cmark & \cmark & \cmark \\
+% supervisor-title* & & & \cmark & \cmark & \cmark & \cmark \\
+% supervisor-enterprise-title & & & & \cmark & & \\
+% supervisor-enterprise-title* & & & & \cmark & & \\
+% class-id & \cmark & \cmark & & & & \\
+% student-id & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
+% clc & & & \cmark & \cmark & \cmark & \cmark \\
+% secret-level & & & \cmark & \cmark & \cmark & \cmark \\
+% submit-date & & & \cmark & \cmark & \cmark & \cmark \\
+% abstract & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
+% abstract* & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
+% keywords & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
+% keywords* & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
+% acknowledgements & \cmark & \cmark & \cmark & \cmark & \cmark & \cmark \\
+% \end{tblr}
+% \changes{v1.9.0.0}{2022/05/03}{增加研究生信息录入选项文档}
+% \begin{function}[added=2022-05-02,updated=2022-05-03]{info/graduate-type}
% \begin{syntax}
-% \optx{info/graduate-type}=\metax{(master)|doctor}
+% \optx{info/graduate-type}=\metax{(硕士)|博士}
% \end{syntax}
% 设置研究生类型。
% \end{function}
% \begin{optdesc}
-% \item[master] 硕士研究生。
-% \item[doctor] 博士研究生。
+% \item[硕士] 硕士研究生。
+% \item[博士] 博士研究生。
+% \end{optdesc}
+% \begin{function}[added=2022-05-03]{info/degree-type}
+% \begin{syntax}
+% \optx{info/degree-type}=\metax{(学术)|专业}
+% \end{syntax}
+% 设置研究生学位类型。
+% \end{function}
+% \begin{optdesc}
+% \item[学术] 学术学位。
+% \item[专业] 专业学位。
% \end{optdesc}
-% \begin{function}[added=2022-04-01]{info/title}
+% \begin{function}[added=2022-05-03]{info/degree,info/degree*}
% \begin{syntax}
-% \optx{info/title}=\argx{论文标题}
+% \optx{info/degree}=\argx{研究生学位类别中文名称}
+% \optx{info/degree*}=\argx{研究生学位类别英文名称}
+% \end{syntax}
+% 设置研究生学位类别。
+% \end{function}
+% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/title,info/title*}
+% \begin{syntax}
+% \optx{info/title}=\argx{论文中文标题}
+% \optx{info/title*}=\argx{论文英文标题}
% \end{syntax}
% 设置论文标题。如果需要手动制定换行位点,请使用换行控制符(|\\|),最多两行。
% \end{function}
@@ -706,41 +810,71 @@
% \end{syntax}
% 设置院系名称。
% \end{function}
-% \begin{function}[added=2022-04-01]{info/major}
+% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/major,info/major*}
+% \begin{syntax}
+% \optx{info/major}=\argx{专业名称/一级学科名称}
+% \optx{info/major*}=\argx{一级学科英文名称}
+% \end{syntax}
+% 设置专业名称/一级学科名称。
+% \end{function}
+% \begin{function}[added=2022-05-03]{info/sub-major}
% \begin{syntax}
-% \optx{info/major}=\argx{专业名称}
+% \optx{info/sub-major}=\argx{二级学科名称}
% \end{syntax}
-% 设置专业名称。
+% 设置二级学科名称。
% \end{function}
-% \begin{function}[added=2022-04-01]{info/author}
+% \begin{function}[added=2022-05-03]{info/domain}
+% \begin{syntax}
+% \optx{info/domain}=\argx{领域}
+% \end{syntax}
+% 设置领域名称。
+% \end{function}
+% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/author,info/author*}
% \begin{syntax}
% \optx{info/author}=\argx{作者姓名}
+% \optx{info/author*}=\argx{作者姓名拼音}
% \end{syntax}
% 设置作者姓名。
% \end{function}
-% \begin{function}[added=2022-04-01]{info/supervisor}
+% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/supervisor,info/supervisor*}
% \begin{syntax}
% \optx{info/supervisor}=\argx{导师姓名}
+% \optx{info/supervisor*}=\argx{导师姓名拼音}
% \end{syntax}
-% 设置导师姓名。非校外毕业设计填写。
+% 设置导师姓名。
% \end{function}
% \begin{function}[added=2022-04-01]{info/supervisor-department}
% \begin{syntax}
% \optx{info/supervisor-department}=\argx{院内导师姓名}
% \end{syntax}
-% 设置院内导师姓名。非校外毕业设计填写,如无院内导师,则无需填写。
+% 设置院内导师姓名。
% \end{function}
-% \begin{function}[added=2022-04-01]{info/supervisor-enterprise}
+% \begin{function}[added=2022-04-01,updated=2022-05-03]{info/supervisor-enterprise,info/supervisor-enterprise*}
% \begin{syntax}
% \optx{info/supervisor-enterprise}=\argx{校外导师姓名}
+% \optx{info/supervisor-enterprise*}=\argx{校外导师姓名拼音}
% \end{syntax}
-% 设置校外导师姓名。校外毕业设计填写。
+% 设置校外导师姓名。
% \end{function}
% \begin{function}[added=2022-04-01]{info/supervisor-school}
% \begin{syntax}
% \optx{info/supervisor-school}=\argx{校内导师姓名}
% \end{syntax}
-% 设置校内导师姓名。校外毕业设计填写。
+% 设置校内导师姓名。
+% \end{function}
+% \begin{function}[added=2022-05-03]{info/supervisor-title,info/supervisor-title*}
+% \begin{syntax}
+% \optx{info/supervisor-title}=\argx{导师职称}
+% \optx{info/supervisor-title*}=\argx{导师职称英文名称}
+% \end{syntax}
+% 设置导师职称。
+% \end{function}
+% \begin{function}[added=2022-05-03]{info/supervisor-enterprise-title,info/supervisor-enterprise-title*}
+% \begin{syntax}
+% \optx{info/supervisor-enterprise-title}=\argx{校外导师职称}
+% \optx{info/supervisor-enterprise-title*}=\argx{校外导师职称英文名称}
+% \end{syntax}
+% 设置校外导师职称。
% \end{function}
% \begin{function}[added=2022-04-01]{info/class-id}
% \begin{syntax}
@@ -754,6 +888,24 @@
% \end{syntax}
% 设置作者学号。
% \end{function}
+% \begin{function}[added=2022-05-03]{info/clc}
+% \begin{syntax}
+% \optx{info/clc}=\argx{中图分类号}
+% \end{syntax}
+% 设置中图分类号。
+% \end{function}
+% \begin{function}[added=2022-05-03]{info/secret-level}
+% \begin{syntax}
+% \optx{info/secret-level}=\metax{秘密|(公开)}
+% \end{syntax}
+% 设置密级。
+% \end{function}
+% \begin{function}[added=2022-05-03]{info/submit-date}
+% \begin{syntax}
+% \optx{info/submit-date}=\argx{提交日期}
+% \end{syntax}
+% 设置提交日期。
+% \end{function}
% \begin{function}[added=2022-04-02]{info/abstract,info/abstract*}
% \begin{syntax}
% \optx{info/abstract}=\argx{中文摘要文件路径}
@@ -814,16 +966,20 @@
%<*class>
% \end{macrocode}
% \begin{macro}{\PassOptionsToClass,\LoadClass}
-% 加载\clsx{ctexbook}文档类。
% \changes{v0.3.2.0}{2022/04/04}{修正行间距为1.5倍}
% \changes{v1.8.1.0}{2022/05/03}{修正页面尺寸}
+% \changes{v1.9.2.0}{2022/05/04}{修正行间距为1.625倍}
+% 加载\clsx{ctexbook}文档类。
+% \\
+% \LaTeX{}中基本行距是字号大小的1.2倍,Microsoft Word中基本行距是字号大小的1.3倍,
+% Microsoft Word中1.5倍行距,相当于LaTeX中$1.5\times\frac{1.3}{1.2}=1.625$倍行距。
% \begin{macrocode}
\PassOptionsToClass
{
a4paper,
zihao=-4,
sub4section,
- linespread = 1.5,
+%<xduugthesis> linespread = 1.625,
fontset = none
}
{ ctexbook }
@@ -925,7 +1081,7 @@
% \end{macrocode}
% 英文字体配置。
% \begin{macrocode}
- latin-font .choices:nn = { tacn, thcs, gyre, none }
+ latin-font .choices:nn = { tac, tacn, thcs, gyre, none }
{ \tl_set_eq:NN \l_@@_latin_font_tl \l_keys_choice_tl },
% \end{macrocode}
% 数学字体配置。
@@ -1475,6 +1631,21 @@
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\@@_load_latin_font_tac:}
+% \changes{v1.12.0.0}{2022/05/06}{新增Arial和Consolas英文字体配置}
+% 英文字体配置\valuex{tac}。
+% \begin{macrocode}
+\cs_new:Npn \@@_load_latin_font_tac:
+ {
+ \@@_set_latin_main_font:nnnnn
+ { Times~New~Roman } { times.ttf } { timesbd.ttf } { timesi.ttf } { timesbi.ttf }
+ \@@_set_latin_sans_font:nnnnn
+ { Arial } { arial.ttf } { arialbd.ttf } { ariali.ttf } { arialbi.ttf }
+ \@@_set_latin_mono_font:nnnnn
+ { Consolas } { consola.ttf } { consolab.ttf } { consolai.ttf } { consolaz.ttf }
+ }
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\@@_load_latin_font_tacn:}
% 英文字体配置\valuex{tacn}。
% \begin{macrocode}
@@ -1860,14 +2031,91 @@
%<*xdupgthesis>
% \end{macrocode}
% \subsubsection{研究生}
+% \changes{v1.9.0.0}{2022/05/03}{增加研究生信息录入选项}
% \begin{variable}
% {
-% \l_@@_gr_type_tl
+% \l_@@_gr_type_tl,
+% \l_@@_degree_type_tl,
+% \l_@@_degree_str,
+% \l_@@_degree_en_str,
+% \l_@@_author_en_str,
+% \l_@@_supv_en_str,
+% \l_@@_supv_ent_en_str,
+% \l_@@_supv_t_str,
+% \l_@@_supv_t_en_str,
+% \l_@@_supv_ent_t_str,
+% \l_@@_supv_ent_t_en_str,
+% \l_@@_title_en_str,
+% \l_@@_major_en_str,
+% \l_@@_sub_major_str,
+% \l_@@_domain_str,
+% \l_@@_clc_str,
+% \l_@@_secret_lv_str,
+% \l_@@_submit_date_str
% }
% 研究生类型。
% \begin{macrocode}
\tl_new:N \l_@@_gr_type_tl
% \end{macrocode}
+% 学位类型。
+% \begin{macrocode}
+\tl_new:N \l_@@_degree_type_tl
+% \end{macrocode}
+% 学位类别。
+% \begin{macrocode}
+\str_new:N \l_@@_degree_str
+\str_new:N \l_@@_degree_en_str
+% \end{macrocode}
+% 作者姓名拼音。
+% \begin{macrocode}
+\str_new:N \l_@@_author_en_str
+% \end{macrocode}
+% 导师姓名拼音。
+% \begin{macrocode}
+\str_new:N \l_@@_supv_en_str
+% \end{macrocode}
+% 校外导师姓名拼音。
+% \begin{macrocode}
+\str_new:N \l_@@_supv_ent_en_str
+% \end{macrocode}
+% 导师职称。
+% \begin{macrocode}
+\str_new:N \l_@@_supv_t_str
+\str_new:N \l_@@_supv_t_en_str
+% \end{macrocode}
+% 校外导师职称。
+% \begin{macrocode}
+\str_new:N \l_@@_supv_ent_t_str
+\str_new:N \l_@@_supv_ent_t_en_str
+% \end{macrocode}
+% 论文标题英文。
+% \begin{macrocode}
+\str_new:N \l_@@_title_en_str
+% \end{macrocode}
+% 一级学科英文名称。
+% \begin{macrocode}
+\str_new:N \l_@@_major_en_str
+% \end{macrocode}
+% 二级学科。
+% \begin{macrocode}
+\str_new:N \l_@@_sub_major_str
+% \end{macrocode}
+% 领域。
+% \begin{macrocode}
+\str_new:N \l_@@_domain_str
+% \end{macrocode}
+% 中图分类号。
+% \begin{macrocode}
+\str_new:N \l_@@_clc_str
+% \end{macrocode}
+% 密级。
+% \begin{macrocode}
+\str_new:N \l_@@_secret_lv_str
+% \end{macrocode}
+% 提交日期。
+% \begin{macrocode}
+\str_new:N \l_@@_submit_date_str
+% \end{macrocode}
% \end{variable}
% \begin{macro}{\keys_define:nn}
% 定义信息键值。
@@ -1877,8 +2125,69 @@
% \end{macrocode}
% 研究生类型。
% \begin{macrocode}
- graduate-type .choices:nn = { master, doctor }
- { \tl_set_eq:NN \l_@@_gr_type_tl \l_keys_choice_tl }
+ graduate-type .choices:nn = { 硕士, 博士 }
+ { \tl_set_eq:NN \l_@@_gr_type_tl \l_keys_choice_tl },
+% \end{macrocode}
+% 学位类型。
+% \begin{macrocode}
+ degree-type .choices:nn = { 学术, 专业 }
+ { \tl_set_eq:NN \l_@@_degree_type_tl \l_keys_choice_tl },
+% \end{macrocode}
+% 学位类别。
+% \begin{macrocode}
+ degree .tl_set:N = \l_@@_degree_str,
+ degree* .tl_set:N = \l_@@_degree_en_str,
+% \end{macrocode}
+% 作者姓名拼音。
+% \begin{macrocode}
+ author* .tl_set:N = \l_@@_author_en_str,
+% \end{macrocode}
+% 导师姓名拼音。
+% \begin{macrocode}
+ supervisor* .tl_set:N = \l_@@_supv_en_str,
+% \end{macrocode}
+% 校外导师姓名拼音。
+% \begin{macrocode}
+ supervisor-enterprise* .tl_set:N = \l_@@_supv_ent_en_str,
+% \end{macrocode}
+% 导师职称。
+% \begin{macrocode}
+ supervisor-title .tl_set:N = \l_@@_supv_t_str,
+ supervisor-title* .tl_set:N = \l_@@_supv_t_en_str,
+% \end{macrocode}
+% 校外导师职称。
+% \begin{macrocode}
+ supervisor-enterprise-title .tl_set:N = \l_@@_supv_ent_t_str,
+ supervisor-enterprise-title* .tl_set:N = \l_@@_supv_ent_t_en_str,
+% \end{macrocode}
+% 论文标题英文。
+% \begin{macrocode}
+ title* .tl_set:N = \l_@@_title_en_str,
+% \end{macrocode}
+% 一级学科英文名称。
+% \begin{macrocode}
+ major* .tl_set:N = \l_@@_major_en_str,
+% \end{macrocode}
+% 二级学科。
+% \begin{macrocode}
+ sub-major .tl_set:N = \l_@@_sub_major_str,
+% \end{macrocode}
+% 领域。
+% \begin{macrocode}
+ domain .tl_set:N = \l_@@_domain_str,
+% \end{macrocode}
+% 中图分类号。
+% \begin{macrocode}
+ clc .tl_set:N = \l_@@_clc_str,
+% \end{macrocode}
+% 密级。
+% \begin{macrocode}
+ secret-level .choices:nn = { 秘密, 公开 }
+ { \tl_set_eq:NN \l_@@_secret_lv_str \l_keys_choice_tl },
+% \end{macrocode}
+% 提交日期。
+% \begin{macrocode}
+ submit-date .tl_set:N = \l_@@_submit_date_str
}
% \end{macrocode}
% \end{macro}
@@ -1889,7 +2198,24 @@
% \begin{macrocode}
\keys_set:nn { xdu }
{
- info / graduate-type = { master },
+ info / graduate-type = { 硕士 },
+ info / degree-type = { 学术 },
+ info / degree = { },
+ info / degree* = { },
+ info / author* = { },
+ info / supervisor* = { },
+ info / supervisor-enterprise* = { },
+ info / supervisor-title = { },
+ info / supervisor-title* = { },
+ info / supervisor-enterprise-title = { },
+ info / supervisor-enterprise-title* = { },
+ info / title* = { },
+ info / major* = { },
+ info / sub-major = { },
+ info / domain = { },
+ info / clc = { },
+ info / secret-level = { 公开 },
+ info / submit-date = { }
}
% \end{macrocode}
% \end{macro}
@@ -1914,7 +2240,8 @@
% \l_@@_subsubsec_tl,
% \l_@@_para_tl,
% \l_@@_subpara_tl,
-% \l_@@_sym_mgn_bool
+% \l_@@_sym_mgn_bool,
+% \l_@@_page_v_align_tl
% }
% 英文是否使用中文字体。
% \begin{macrocode}
@@ -1966,6 +2293,10 @@
% \begin{macrocode}
\bool_new:N \l_@@_sym_mgn_bool
% \end{macrocode}
+% 设置页面垂直方向的对齐方式。
+% \begin{macrocode}
+\tl_new:N \l_@@_page_v_align_tl
+% \end{macrocode}
% \end{variable}
% \begin{macro}{\keys_define:nn}
% 定义样式键值。
@@ -2026,7 +2357,11 @@
% \end{macrocode}
% 设置页边距是否对称。
% \begin{macrocode}
- symmetric-margin .bool_set:N = \l_@@_sym_mgn_bool
+ symmetric-margin .bool_set:N = \l_@@_sym_mgn_bool,
+% \end{macrocode}
+% 设置页面垂直方向的对齐方式。
+% \begin{macrocode}
+ page-vertical-align .tl_set:N = \l_@@_page_v_align_tl
}
% \end{macrocode}
% \end{macro}
@@ -2045,7 +2380,8 @@
style / algorithm-small-font = true,
style / before-skip = { 24pt, 18pt, 12pt, 12pt, 12pt, 12pt },
style / after-skip = { 18pt, 12pt, 6pt, 6pt, 6pt, 6pt },
- style / symmetric-margin = false
+ style / symmetric-margin = false,
+ style / page-vertical-align = {顶部对齐}
}
% \end{macrocode}
% \end{macro}
@@ -2093,12 +2429,12 @@
{
\@@_lang_switch:nn
{
- \tl_if_eq:NnTF \l_@@_gr_type_tl { master }
+ \tl_if_eq:NnTF \l_@@_gr_type_tl { 硕士 }
{ \str_set:Nn \l_@@_header_str { 西安电子科技大学硕士学位论文 } }
{ \str_set:Nn \l_@@_header_str { 西安电子科技大学博士学位论文 } }
}
{
- \tl_if_eq:NnTF \l_@@_gr_type_tl { master }
+ \tl_if_eq:NnTF \l_@@_gr_type_tl { 硕士 }
{
\str_set:Nn \l_@@_header_str
{ Master~Thesis~of~XIDIAN~UNIVERSITY }
@@ -2514,6 +2850,18 @@
%</xdupgthesis>
% \end{macrocode}
% \end{macro}
+% \subsubsection{对齐方式}
+% \begin{macro}{\raggedbottom,\flushbottom}
+% \changes{v1.13.0.0}{2022/05/08}{设置页面垂直方向的对齐方式}
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \tl_if_eq:NnTF \l_@@_page_v_align_tl { 顶部对齐 }
+ { \raggedbottom }
+ { \flushbottom }
+ }
+% \end{macrocode}
+% \end{macro}
% \begin{macrocode}
%</thesis>
%<*xduugthesis>
@@ -2689,49 +3037,60 @@
% \end{macrocode}
% \end{macro}
% \subsection{目录}
+% \begin{macro}{\RequirePackage}
+% \changes{v0.4.1.0}{2022/04/05}{设置目录样式}
+% 设置目录样式。
+% \begin{macrocode}
+\RequirePackage [ titles ] { tocloft }
+% \end{macrocode}
+% \end{macro}
+% \begin{variable}{\cftchapleader}
+% 修改目录中一级标题引导点。
+% \begin{macrocode}
+\cs_set:Npn \cftchapleader { \bfseries \cftdotfill { \cftdotsep } }
+% \end{macrocode}
+% \end{variable}
% \begin{variable}
% {
-% \cftchapleader,
% \cftbeforechapskip,
-% \cftbeforesecskip,
-% \cftbeforesubsecskip,
-% \cftbeforesubsubsecskip,
-% \cftbeforeparaskip,
-% \cftbeforesubparaskip,
+% \cftbeforesecskip
+% }
+% \changes{v1.10.1.0}{2022/05/04}{修正目录条目间距}
+% 设置一级标题与其余各级标题条目前垂直间距一致。
+% \begin{macrocode}
+\dim_set_eq:NN \cftbeforechapskip \cftbeforesecskip
+% \end{macrocode}
+% \end{variable}
+% \begin{variable}
+% {
% \cftchapfont,
-% \cftchappagefont,
-% \cftsecfont,
-% \cftsubsecfont,
-% \cftsubsubsecfont,
-% \cftparafont,
-% \cftsubparafont,
-% \cftsecpagefont,
-% \cftsubsecpagefont,
-% \cftsubsubsecpagefont,
-% \cftparapagefont,
-% \cftsubparapagefont
+% \cftchappagefont
% }
-% 设置目录样式。
-% \changes{v0.4.1.0}{2022/04/05}{设置目录样式}
+% 设置一级标题及相应页码字体字号。
% \begin{macrocode}
-\RequirePackage [ titles ] { tocloft }
-\renewcommand { \cftchapleader } { \bfseries \cftdotfill { \cftdotsep } }
\clist_map_inline:nn
{
- \cftbeforechapskip,
- \cftbeforesecskip,
- \cftbeforesubsecskip,
- \cftbeforesubsubsecskip,
- \cftbeforeparaskip,
- \cftbeforesubparaskip
+ \cftchapfont,
+ \cftchappagefont
}
- { \dim_set:Nn { #1 } { 5pt } }
- \clist_map_inline:nn
- {
- \cftchapfont,
- \cftchappagefont
- }
- { \renewcommand { #1 } { \@@_rm_family: \zihao { -4 } \bfseries } }
+ { \renewcommand { #1 } { \@@_rm_family: \zihao { -4 } \bfseries } }
+% \end{macrocode}
+% \end{variable}
+% \begin{variable}
+% {
+% \cftsecfont,,
+% \cftsubsecfont,,
+% \cftsubsubsecfont,,
+% \cftparafont,,
+% \cftsubparafont,,
+% \cftsecpagefont,,
+% \cftsubsecpagefont,,
+% \cftsubsubsecpagefont,,
+% \cftparapagefont,,
+% \cftsubparapagefont
+% }
+% 设置二三四五六级标题及相应页码字体字号。
+% \begin{macrocode}
\clist_map_inline:nn
{
\cftsecfont,
@@ -2748,6 +3107,10 @@
{ \renewcommand { #1 } { \@@_rm_family: \zihao { -4 } } }
% \end{macrocode}
% \end{variable}
+% \begin{macrocode}
+%</xduugthesis>
+%<*thesis>
+% \end{macrocode}
% \subsection{公式}
% \begin{macro}{\theequation}
% 重定义公式编号样式。
@@ -2859,7 +3222,7 @@
% \begin{macro}{\DeclareCaptionLabelSeparator,\DeclareCaptionFont,\captionsetup}
% \changes{v0.1.2.0}{2022/04/03}{设置图片标签与后面标题之间的间距}
% \changes{v0.1.3.0}{2022/04/03}{设置图片标签与标题字体字号}
-% 设置图表标签与后面标题之间的间距。
+% 设置图表标签与后面标题之间的间距及caption字体字号。
% \begin{macrocode}
\RequirePackage { caption }
\DeclareCaptionLabelSeparator { customskip } { \hskip \l_@@_cap_label_sep_tl }
@@ -2901,6 +3264,22 @@
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\SetTblrStyle,\DefTblrTemplate}
+% \changes{v1.11.0.0}{2022/05/06}{适配\pkgx{tabularray}宏包caption样式}
+% 设置\pkgx{tabularray}宏包中表格标签与后面标题之间的间距及caption字体字号。
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \@ifpackageloaded { tabularray }
+ {
+ \SetTblrStyle { head } { font = \@@_rm_family: \zihao { 5 } }
+ \DefTblrTemplate { caption-sep } { default }
+ { \hskip \l_@@_cap_label_sep_tl }
+ }
+ { }
+ }
+% \end{macrocode}
+% \end{macro}
% \subsection{图片}
% \begin{macro}{\PassOptionsToPackage,\captionsetup}
% \changes{v0.4.2.0}{2022/04/05}{设置子图标签与标题字体字号}
@@ -2929,7 +3308,7 @@
% \end{macro}
% \begin{macro}{longtable}
% \changes{v1.3.0.0}{2022/04/20}{设置\envx{longtable}环境字号是否为五号}
-% 设置\envx{longtable}环境字号是否为五号。
+% 设置\pkgx{longtable}宏包中\envx{longtable}环境字号是否为五号。
% \begin{macrocode}
\ctex_at_end_preamble:n
{
@@ -2946,12 +3325,35 @@
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{tblr,longtblr}
+% \changes{v1.11.0.0}{2022/05/06}{适配\pkgx{tabularray}宏包中\envx{tblr}和\envx{longtblr}环境字号}
+% 设置\pkgx{tabularray}宏包中\envx{tblr}和\envx{longtblr}环境字号是否为五号。
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \@ifpackageloaded { tabularray }
+ {
+ \bool_if:NT \l_@@_tab_small_bool
+ {
+ \ctex_gadd_ltxhook:nn
+ { env/tblr/begin }
+ { \small }
+ \ctex_gadd_ltxhook:nn
+ { env/longtblr/begin }
+ { \small }
+ }
+ }
+ { }
+ }
+% \end{macrocode}
+% \end{macro}
% \subsection{超链接和PDF元数据}
% \begin{macro}{\hyperref}
-% 配置超链接和PDF元数据。
% \changes{v0.5.0.0}{2022/04/05}{添加PDF主题元数据}
+% \changes{v1.10.0.0}{2022/05/04}{添加PDF应用程序元数据}
+% 配置超链接和PDF元数据。
% \begin{macrocode}
-\RequirePackage{hyperref}
+\RequirePackage{ hyperref }
\hypersetup
{
bookmarksnumbered,
@@ -2962,7 +3364,10 @@
\hypersetup
{
pdftitle = \l_@@_pure_title_str,
-%<xduugthesis> pdfsubject = {西安电子科技大学本科毕业设计论文},
+%<xduugthesis> pdfsubject = { 西安电子科技大学本科毕业设计论文 },
+%<xduugthesis> pdfcreator = { XeLaTeX~with~xduugthesis~class~in~XDUTS },
+%<xdupgthesis> pdfsubject = \l_@@_header_str,
+%<xdupgthesis> pdfcreator = { XeLaTeX~with~xdupgthesis~class~in~XDUTS },
pdfauthor = \l_@@_author_str
}
}
@@ -3005,7 +3410,7 @@
{ \ctex_gadd_ltxhook:nn { env/document/begin } { #1 } }
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\addbibresource}
+% \begin{macro}{\RequirePackage,\bibliographystyle,\addbibresource}
% 参考文献。
% \begin{macrocode}
\@@_begin_document:n
@@ -3023,6 +3428,10 @@
}
% \end{macrocode}
% \end{macro}
+% \begin{macrocode}
+%</thesis>
+%<*xduugthesis>
+% \end{macrocode}
% \subsection{附录}
% \begin{macro}{appendixes}
% 附录环境。
@@ -3060,14 +3469,14 @@
% \begin{macrocode}
\cs_new:Npn \@@_cover_i:nn #1#2
{
- \vbox_to_ht:nn {12pt}
+ \vbox_to_ht:nn { 12pt }
{
\mode_leave_vertical:
\hfill
\hbox:n
{
\@@_rm_family: \zihao { -4 } \bfseries
- \hbox_to_wd:nn { 3em } { #1 }
+ \hbox_to_wd:nn { 3em } { #1 }
\skip_horizontal:n { 1em }
\@@_uline:n { \hbox_to_wd:nn { 15ex } { \hfil #2 \hfil } }
\skip_horizontal:n { 1.5cm }
@@ -3078,21 +3487,26 @@
% \end{macro}
% \begin{macro}{\@@_cover_ii:nnn}
% \changes{v0.6.1.0}{2022/04/11}{修复logo不存在导致的无法编译}
+% \changes{v1.13.1.0}{2022/05/08}{使用融合logo文件}
% 绘制西电logo。
% \begin{arguments}
% \item 盒子高度。
% \item logo高度。
-% \item logo文件名称。
+% \item logo类型。
% \end{arguments}
% \begin{macrocode}
\cs_new:Npn \@@_cover_ii:nnn #1#2#3
{
- \vbox_to_ht:nn {#1}
+ \vbox_to_ht:nn { #1 }
{
\mode_leave_vertical:
\hfil
- \file_if_exist:nT { #3 }
- { \includegraphics [ height = #2, keepaspectratio ] { #3 } }
+ \file_if_exist:nT { xdulogo.pdf }
+ {
+ \str_if_eq:nnTF { #3 } { text }
+ { \includegraphics [ page = 1, height = #2 ] { xdulogo.pdf } }
+ { \includegraphics [ page = 2, height = #2 ] { xdulogo.pdf } }
+ }
\hfil
}
}
@@ -3110,7 +3524,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_cover_iii:nnnnn #1#2#3#4#5
{
- \vbox_to_ht:nn {40pt}
+ \vbox_to_ht:nn { 42.5pt }
{
\vfill
\mode_leave_vertical:
@@ -3193,6 +3607,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\frontmatter}
+% \changes{v1.9.1.0}{2022/05/04}{修正封面元素位置及尺寸}
% 排版正文前部分。
% \begin{macrocode}
\renewcommand { \frontmatter }
@@ -3210,16 +3625,22 @@
% \end{macrocode}
% 排版西电文字logo。
% \begin{macrocode}
- \@@_cover_ii:nnn { 65pt } { 35pt } { xidian-text.pdf }
+ \@@_cover_ii:nnn { 65pt } { 35pt } { text }
% \end{macrocode}
+% \changes{v1.13.2.0}{2022/05/08}{修正封面标题偏移}
% 排版封面标题。
% \begin{macrocode}
- \vbox_to_ht:nn { 75pt }
- { \@@_sf_family: \zihao { 0 } \centering { 本科毕业设计论文 } }
+ \vbox_to_ht:nn { 90pt }
+ {
+ \mode_leave_vertical:
+ \hfil
+ \hbox_to_wd:nn { 375pt } { \sffamily \zihao { 0 } 本科毕业设计论文 }
+ \hfil
+ }
% \end{macrocode}
% 排版西电logo。
% \begin{macrocode}
- \@@_cover_ii:nnn { 130pt } { 120pt } { xidian-logo.pdf }
+ \@@_cover_ii:nnn { 140pt } { 120pt } { icon }
% \end{macrocode}
% 拆分论文标题并排版。
% \begin{macrocode}
@@ -3266,11 +3687,12 @@
\cleardoublepage
% \end{macrocode}
% \changes{v0.8.0.0}{2022/04/12}{支持对称页边距}
+% \changes{v1.10.2.0}{2022/05/04}{修正正文前页码样式}
% 更换页面尺寸、页面样式和页码样式。
% \begin{macrocode}
\@@_load_main_geometry:
\pagestyle { plain }
- \pagenumbering { Roman }
+ \pagenumbering { roman }
% \end{macrocode}
% \changes{v1.2.1.0}{2022/04/19}{修正英文论文下中文摘要标题样式}
% 中文摘要,宋体小四号。
@@ -3289,18 +3711,25 @@
\file_if_exist_input:n { \l_@@_abstract_zh_tl }
}
% \end{macrocode}
+% \changes{v1.10.3.0}{2022/05/04}{使用弹性长度分隔关键词}
+% 关键词弹性分隔间距。
+% \begin{macrocode}
+ \cs_new:Npn \@@_keywords_space: { \hspace{ 2em plus 1em minus 1em } }
+% \end{macrocode}
% 中文关键词,黑体小四号。
% \begin{macrocode}
{
\sffamily \zihao { -4 } \par
- \@@_typeout_keywords:nNn { 关键词: } { \l_@@_keywords_zh_clist } { \qquad }
+ \@@_typeout_keywords:nNn
+ { 关键词: } { \l_@@_keywords_zh_clist } { \@@_keywords_space: }
}
\cleardoublepage
% \end{macrocode}
% 英文摘要,Times New Roman字体,小四号。
% \changes{v0.4.3.0}{2022/04/05}{修正英文摘要标题字体}
% \begin{macrocode}
- \@@_n_chapter_head_ii:nn {ABSTRACT} { \rmfamily \zihao { 3 } \bfseries \centering }
+ \@@_n_chapter_head_ii:nn
+ { ABSTRACT } { \rmfamily \zihao { 3 } \bfseries \centering }
{
\dim_set:Nn \parindent { 2 \ccwd }
\rmfamily \zihao { -4 }
@@ -3311,7 +3740,8 @@
% \begin{macrocode}
{
\rmfamily \zihao { -4 } \bfseries \par
- \@@_typeout_keywords:nNn { Keywords: } { \l_@@_keywords_en_clist } { \qquad }
+ \@@_typeout_keywords:nNn
+ { Keywords: } { \l_@@_keywords_en_clist } { \@@_keywords_space: }
}
\cleardoublepage
% \end{macrocode}