summaryrefslogtreecommitdiff
path: root/macros/xetex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-29 03:01:53 +0000
committerNorbert Preining <norbert@preining.info>2023-01-29 03:01:53 +0000
commitdab4e7c261c34234f9d9f1ac92923d6f903046ef (patch)
tree63b6eec067a9ff0bcd62088dd8b708ce880ece58 /macros/xetex
parent261f52e7813eade06f278eda62023fda3d266980 (diff)
CTAN sync 202301290301
Diffstat (limited to 'macros/xetex')
-rw-r--r--macros/xetex/latex/xduts/README.md41
-rw-r--r--macros/xetex/latex/xduts/xduts.dtx125
-rw-r--r--macros/xetex/latex/xduts/xduts.ins3
-rw-r--r--macros/xetex/latex/xduts/xduts.pdfbin331323 -> 332217 bytes
4 files changed, 107 insertions, 62 deletions
diff --git a/macros/xetex/latex/xduts/README.md b/macros/xetex/latex/xduts/README.md
index 0f07728ea3..4394ad1811 100644
--- a/macros/xetex/latex/xduts/README.md
+++ b/macros/xetex/latex/xduts/README.md
@@ -11,43 +11,37 @@ XDUTS currently includes:
- `xdupgthesis.cls`, Xidian University Postgraduate Thesis document class
- `xduugthesis.cls`, Xidian University Undergraduate Thesis document class
-In the future, we plan to add the following document classes, including
+In the future, we plan to add the following document class, including
- `xdupgtp.cls`, Xidian University Postgraduate Thesis Proposal document class
## Preparation
-If using TeX Live/MacTeX, TeX Live/MacTeX 2022+ is recommended, and update all packages to the latest version 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, it may be necessary to run the command with `sudo`.
+### TeX Live/MacTeX
+
+If using TeX Live/MacTeX, make sure that the latest version of TeX Live/MacTeX is installed. Then update all packages 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, it may be necessary to run the command with `sudo`.
```shell
-tlmgr option repository https://mirrors.cloud.tencent.com/CTAN/systems/texlive/tlnet/
tlmgr update --all --self
```
-## Installation
-
-You can install XDUTS from either CTAN or GitHub by following the instructions below.
-
-### CTAN
-
-#### TeX Live/MacTeX
+### MiKTeX
-After completing the preparation, XDUTS is already contained in TeX Live/MacTeX. Run command below to open the documentation.
+If using MiKTeX, update all installed packages by running command below.
```shell
-texdoc xduts
+miktex packages update
```
-#### MiKTeX
+## Installation
+
+You can install XDUTS from either CTAN or GitHub by following the instructions below. Generally speaking, CTAN updates XDUTS slowly. If you want to use the latest version of XDUTS, get XDUTS from GitHub.
-You can install/update XDUTS by running command below.
+### CTAN
-```shell
-miktex packages install xduts
-miktex packages update xduts
-```
+#### TeX Live/MacTeX/MiKTeX
-Run command below to open the documentation.
+After completing the preparation, run command below to open the documentation.
```shell
texdoc xduts
@@ -59,17 +53,16 @@ If you have installed LaTeX distribution locally, you can get the document class
### GitHub
-Generally speaking, CTAN updates XDUTS slowly. If you want to use the latest version of XDUTS, [download this repository](https://github.com/note286/xduts/archive/refs/heads/main.zip) and run the following command to get the document class/package files.
+After completing the preparation, download this [repository](https://github.com/note286/xduts/archive/refs/heads/main.zip) and run the following commands in the downloaded folder to get the document class/package files and the documentation.
```shell
xetex xduts.ins
+l3build doc
```
-Run command below to get the documentation.
+## Usage
-```shell
-l3build doc
-```
+Be sure to read the documentation (i.e., `xduts.pdf`) from the beginning in order to use XDUTS better.
## Note
diff --git a/macros/xetex/latex/xduts/xduts.dtx b/macros/xetex/latex/xduts/xduts.dtx
index 32ac11d84b..fb5170a008 100644
--- a/macros/xetex/latex/xduts/xduts.dtx
+++ b/macros/xetex/latex/xduts/xduts.dtx
@@ -1,7 +1,7 @@
% \iffalse
%<*driver>
\ProvidesFile{xduts.dtx}
-[2023/01/16 v4.1.1.0 Xidian University TeX Suite]
+[2023/01/28 v4.3.0.0 Xidian University TeX Suite]
%</driver>
%<class|sty>\NeedsTeXFormat{LaTeX2e}
%<class|sty>\RequirePackage{expl3}
@@ -9,7 +9,7 @@
%<xduugtp>\ProvidesExplClass{xduugtp}
%<xdupgthesis>\ProvidesExplClass{xdupgthesis}
%<xduugthesis>\ProvidesExplClass{xduugthesis}
-%<class|sty> {2023/01/16}{4.1.1.0}
+%<class|sty> {2023/01/28}{4.3.0.0}
%<xdufont> {Xidian University Font package}
%<xduugtp> {Xidian University Undergraduate Thesis Proposal class}
%<xdupgthesis> {Xidian University Postgraduate Thesis document class}
@@ -40,12 +40,9 @@
\setcounter{tocdepth}{5}
\ctexset{punct=quanjiao}
\usepackage{hologo}
-\usepackage{fetamont}
\usepackage{xurl}
\usepackage{xspace}
\xspaceaddexceptions{。?!,、;:“”‘’—….--~·《》<>_}
-\newcolumntype{Y}{>{\centering\arraybackslash}X}
-\usepackage{multirow}
\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}
\usepackage{subcaption}
@@ -94,7 +91,9 @@
\newcommand{\ctanurl}[1]{\href{https://mirrors.cloud.tencent.com/CTAN/#1}{\ttfamily CTAN://#1}}
\newcommand{\footctan}[1]{\footnote{\ctanurl{#1}}}
% logo
-\newcommand{\xduts}{{\bfseries\ffmfamily XDUTS}}
+\changes{v4.1.1.1}{2023/01/21}{修正LOGO字形高度}
+\newfontfamily{\ffmfamily}[Scale=MatchUppercase]{ffmb10.otf}
+\newcommand{\xduts}{{\ffmfamily XDUTS}}
\newcommand{\texlive}{\TeX{} Live}
\newcommand{\mactex}{Mac\TeX{}}
\newcommand{\miktex}{\xspace\hologo{MiKTeX}\xspace}
@@ -132,6 +131,8 @@ emph = [6]{document,tabular,edubg,resresult,appendixes},
literate = {\$}{{\textcolor{purple3}{\$}}}{1}
{\{}{{\textcolor{purple3}{\{}}}{1}
{\}}{{\textcolor{purple3}{\}}}}{1}
+ {[}{{\textcolor{purple3}{[}}}{1}
+ {]}{{\textcolor{purple3}{]}}}{1}
{=}{{\textcolor{purple3}{=}}}{1}
{\&}{{\textcolor{purple3}{\&}}}{1}
{\\\\}{{\textcolor{purple3}{\textbackslash{}\textbackslash{}}}}{2}
@@ -544,6 +545,18 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% |gyre| & TeX Gyre Termes & TeX Gyre Heros & TeX Gyre Cursor \\
% \end{tblr}
% \end{table}
+% \begin{function}[added=2023-01-28]{style/latin-sans-scale,style/latin-mono-scale}
+% \begin{syntax}
+% \optx{style/latin-sans-scale}=\metax{upper|lower|(off)}
+% \optx{style/latin-mono-scale}=\metax{upper|lower|(off)}
+% \end{syntax}
+% 匹配无衬线族和打字机族字符高度。
+% \end{function}
+% \begin{optdesc}
+% \item[upper] 按大写字母的高度缩放以匹配罗马族字体。
+% \item[lower] 按小写字母的高度缩放以匹配罗马族字体。
+% \item[off] 不缩放。
+% \end{optdesc}
% \begin{function}[added=2022-03-06,updated=2022-03-09]{style/math-font}
% \begin{syntax}
% \optx{style/math-font}=\metax{asana|cambria|(cm)|fira|garamond|lm|...|termes|xits|none}
@@ -1634,18 +1647,18 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \changes{v1.30.0.0}{2022/06/20}{英文研究生学位论文双语标题}
% \subsubsection{英文研究生学位论文双语标题}
% \label{英文研究生学位论文双语标题}
-% \begin{function}[added=2022-06-20]{\chapter,\section,\subsection}
+% \begin{function}[added=2022-06-20,updated=2023-01-28]{\chapter,\section,\subsection}
% \begin{syntax}
-% \tn{chapter}\marg{英文标题}\marg{中文标题}
-% \tn{section}\marg{英文标题}\marg{中文标题}
-% \tn{subsection}\marg{英文标题}\marg{中文标题}
+% \tn{chapter}\marg{英文标题}\oarg{中文标题}
+% \tn{section}\marg{英文标题}\oarg{中文标题}
+% \tn{subsection}\marg{英文标题}\oarg{中文标题}
% \end{syntax}
% 在英文研究生学位论文中一二三级标题为中英双语,其他级别标题为英文。
% 一个简单的例子如下所示:
% \begin{lstlisting}
-% \chapter{This Is Chapter}{这是一级标题}
-% \section{This Is Section}{这是二级标题}
-% \subsection{This Is Subsection}{这是三级标题}
+% \chapter{This Is Chapter}[这是一级标题]
+% \section{This Is Section}[这是二级标题]
+% \subsection{This Is Subsection}[这是三级标题]
% \subsubsection{This Is Subsubsection}
% \paragraph{This Is Paragraph}
% \subparagraph{This Is Subparagraph}
@@ -1846,6 +1859,8 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \l_@@_fake_bold_tl,
% \l_@@_fake_slant_tl,
% \l_@@_latin_font_tl,
+% \l_@@_latin_sans_scale_tl,
+% \l_@@_latin_mono_scale_tl,
% \l_@@_math_font_tl,
% \l_@@_unicode_math_tl,
% \l_@@_font_type_tl,
@@ -1868,6 +1883,11 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \begin{macrocode}
\tl_new:N \l_@@_latin_font_tl
% \end{macrocode}
+% 匹配无衬线族和打字机族字符高度。
+% \begin{macrocode}
+\tl_new:N \l_@@_latin_sans_scale_tl
+\tl_new:N \l_@@_latin_mono_scale_tl
+% \end{macrocode}
% 数学字体配置名称。
% \begin{macrocode}
\tl_new:N \l_@@_math_font_tl
@@ -1905,6 +1925,13 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \begin{macrocode}
cjk-fake-slant .tl_set:N = \l_@@_fake_slant_tl,
% \end{macrocode}
+% 匹配无衬线族和打字机族字符高度。
+% \begin{macrocode}
+ latin-sans-scale .choices:nn = { upper, lower, off }
+ { \tl_set_eq:NN \l_@@_latin_sans_scale_tl \l_keys_choice_tl },
+ latin-mono-scale .choices:nn = { upper, lower, off }
+ { \tl_set_eq:NN \l_@@_latin_mono_scale_tl \l_keys_choice_tl },
+% \end{macrocode}
% 英文字体配置。
% \begin{macrocode}
latin-font .choices:nn = { tac, tacn, thcs, gyre, none }
@@ -1938,14 +1965,16 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \begin{macrocode}
\keys_set:nn { xdu }
{
- style / cjk-font = fandol,
- style / cjk-fake-bold = 3,
- style / cjk-fake-slant = 0.2,
- style / latin-font = gyre,
- style / math-font = cm,
- style / unicode-math = { },
- style / font-type = font,
- style / font-path = fonts
+ style / cjk-font = fandol,
+ style / cjk-fake-bold = 3,
+ style / cjk-fake-slant = 0.2,
+ style / latin-font = gyre,
+ style / latin-sans-scale = off,
+ style / latin-mono-scale = off,
+ style / math-font = cm,
+ style / unicode-math = { },
+ style / font-type = font,
+ style / font-path = fonts
}
% \end{macrocode}
% \end{macro}
@@ -2283,12 +2312,28 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\@@_off_latin_ligatures:}
+% \begin{macro}{\@@_set_latin_sans_scale:,\@@_set_latin_mono_scale:}
+% \changes{v4.3.0.0}{2023/01/28}{匹配无衬线族和打字机族字符高度}
% \changes{v0.8.3.0}{2022/04/13}{匹配小写字母字符高度}
-% 匹配小写字母字符高度。
+% 匹配无衬线族和打字机族字符高度。
% \begin{macrocode}
-\cs_new:Npn \@@_set_latin_scale:
- { Scale = MatchLowercase , }
+\cs_new:Npn \@@_set_latin_sans_scale: { }
+\cs_new:Npn \@@_set_latin_mono_scale: { }
+\ctex_at_end_preamble:n
+ {
+ \tl_if_eq:NnTF \l_@@_latin_sans_scale_tl { upper }
+ { \cs_set:Npn \@@_set_latin_sans_scale: { Scale = MatchUppercase , } }
+ {
+ \tl_if_eq:NnT \l_@@_latin_sans_scale_tl { lower }
+ { \cs_set:Npn \@@_set_latin_sans_scale: { Scale = MatchLowercase , } }
+ }
+ \tl_if_eq:NnTF \l_@@_set_latin_mono_scale { upper }
+ { \cs_set:Npn \@@_set_latin_mono_scale: { Scale = MatchUppercase , } }
+ {
+ \tl_if_eq:NnT \l_@@_set_latin_mono_scale { lower }
+ { \cs_set:Npn \@@_set_latin_mono_scale: { Scale = MatchLowercase , } }
+ }
+ }
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_off_latin_ligatures:}
@@ -2337,12 +2382,12 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
\cs_new:Npn \@@_set_latin_sans_font:nnnnn #1#2#3#4#5
{
\str_if_eq:NNTF { \l_@@_font_type_tl } { font }
- { \setsansfont { #1 } [ \@@_set_latin_scale: ] }
+ { \setsansfont { #1 } [ \@@_set_latin_sans_scale: ] }
{
\setsansfont { #2 }
[
\@@_font_path:
- \@@_set_latin_scale:
+ \@@_set_latin_sans_scale:
\@@_set_latin_font:nnn { #3 } { #4 } { #5 }
]
}
@@ -2363,12 +2408,12 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
\cs_new:Npn \@@_set_latin_mono_font:nnnnn #1#2#3#4#5
{
\str_if_eq:NNTF { \l_@@_font_type_tl } { font }
- { \setmonofont { #1 } [ \@@_set_latin_scale: \@@_off_latin_ligatures: ] }
+ { \setmonofont { #1 } [ \@@_set_latin_mono_scale: \@@_off_latin_ligatures: ] }
{
\setmonofont { #2 }
[
\@@_font_path:
- \@@_set_latin_scale:
+ \@@_set_latin_mono_scale:
\@@_off_latin_ligatures:
\@@_set_latin_font:nnn { #3 } { #4 } { #5 }
]
@@ -2409,7 +2454,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
{
\setsansfont { #1 }
[
- \@@_set_latin_scale:
+ \@@_set_latin_sans_scale:
\@@_set_latin_font:nnn { #2 } { #3 } { #4 }
]
}
@@ -2429,7 +2474,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
{
\setmonofont { #1 }
[
- \@@_set_latin_scale:
+ \@@_set_latin_mono_scale:
\@@_off_latin_ligatures:
\@@_set_latin_font:nnn { #2 } { #3 } { #4 }
]
@@ -7152,29 +7197,35 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
\rmfamily \zihao { -4 }
\dim_set:Nn \baselineskip { 20pt }
% \end{macrocode}
+% \changes{v4.2.0.0}{2023/01/28}{修改英文研究生学位论文标题命令参数格式}
% \changes{v1.30.0.0}{2022/06/20}{英文研究生学位论文目录中正文一二三级中英双语标题}
% 英文研究生学位论文目录中正文一二三级中英双语标题。
% \begin{macrocode}
\@@_lang_switch:nn { }
{
\cs_new_eq:NN \@@_org_chapter:n \chapter
- \RenewDocumentCommand { \chapter } { m m }
+ \RenewDocumentCommand { \chapter } { m o }
{
\@@_org_chapter:n { ##1 }
\@@_add_zh_toc:nn { chapter }
- { \numberline { 第 \chinese { chapter } 章 \hspace { .3em } } ##2 }
+ {
+ \numberline { 第 \chinese { chapter } 章 \hspace { .3em } }
+ \IfNoValueTF { ##2 } { ##1 } { ##2 }
+ }
}
\cs_new_eq:NN \@@_org_section:n \section
- \RenewDocumentCommand { \section } { m m }
+ \RenewDocumentCommand { \section } { m o }
{
\@@_org_section:n { ##1 }
- \@@_add_zh_toc:nn { section } { \numberline { \thesection } ##2 }
+ \@@_add_zh_toc:nn { section }
+ { \numberline { \thesection } \IfNoValueTF { ##2 } { ##1 } { ##2 } }
}
\cs_new_eq:NN \@@_org_subsection:n \subsection
- \RenewDocumentCommand { \subsection } { m m }
+ \RenewDocumentCommand { \subsection } { m o }
{
\@@_org_subsection:n { ##1 }
- \@@_add_zh_toc:nn { subsection } { \numberline { \thesubsection } ##2 }
+ \@@_add_zh_toc:nn { subsection }
+ { \numberline { \thesubsection } \IfNoValueTF { ##2 } { ##1 } { ##2 } }
}
}
% \end{macrocode}
diff --git a/macros/xetex/latex/xduts/xduts.ins b/macros/xetex/latex/xduts/xduts.ins
index bf5f7f9499..8900b8d914 100644
--- a/macros/xetex/latex/xduts/xduts.ins
+++ b/macros/xetex/latex/xduts/xduts.ins
@@ -17,7 +17,8 @@ This work has the LPPL maintenance status `author-maintained'.
The Current Maintainer of this work is @note286 in GitHub and CTAN.
This work consists of the files README.md, xduts.dtx, and xduts.ins
-and the derived files xduts.pdf, xdufont.sty, xdupgthesis.cls, and xduugthesis.cls.
+and the derived files xduts.pdf, xdufont.sty,
+xduugtp.cls, xdupgthesis.cls, and xduugthesis.cls.
The copyright of xdulogo.pdf is Xidian University.
diff --git a/macros/xetex/latex/xduts/xduts.pdf b/macros/xetex/latex/xduts/xduts.pdf
index d8b24f1053..a280b00826 100644
--- a/macros/xetex/latex/xduts/xduts.pdf
+++ b/macros/xetex/latex/xduts/xduts.pdf
Binary files differ