diff options
Diffstat (limited to 'macros/xetex/latex/xduts')
-rw-r--r-- | macros/xetex/latex/xduts/README.md | 46 | ||||
-rw-r--r-- | macros/xetex/latex/xduts/xduts.dtx | 154 | ||||
-rw-r--r-- | macros/xetex/latex/xduts/xduts.pdf | bin | 316944 -> 324220 bytes |
3 files changed, 156 insertions, 44 deletions
diff --git a/macros/xetex/latex/xduts/README.md b/macros/xetex/latex/xduts/README.md index 2915333371..f4e54ed187 100644 --- a/macros/xetex/latex/xduts/README.md +++ b/macros/xetex/latex/xduts/README.md @@ -2,18 +2,40 @@ [![](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 @@ -24,6 +46,10 @@ xelatex xduts.dtx xelatex xduts.dtx ``` -## 许可 +## Note + +`xidian-text.pdf` and `xidian-logo.pdf` should be placed in the same directory as `xduugthesis.cls`. + +## License -This material is subject to [the LaTeX Project Public License 1.3c](https://ctan.org/license/lppl1.3). +XDUTS is subject to [the LaTeX Project Public License 1.3c](https://ctan.org/license/lppl1.3). diff --git a/macros/xetex/latex/xduts/xduts.dtx b/macros/xetex/latex/xduts/xduts.dtx index 691a2a6e20..4c7e798e76 100644 --- a/macros/xetex/latex/xduts/xduts.dtx +++ b/macros/xetex/latex/xduts/xduts.dtx @@ -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,42 +2026,55 @@ % \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 { \@@_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} diff --git a/macros/xetex/latex/xduts/xduts.pdf b/macros/xetex/latex/xduts/xduts.pdf Binary files differindex 6145412d94..e802bb7ff2 100644 --- a/macros/xetex/latex/xduts/xduts.pdf +++ b/macros/xetex/latex/xduts/xduts.pdf |