diff options
author | Norbert Preining <norbert@preining.info> | 2023-05-28 03:00:52 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-05-28 03:00:52 +0000 |
commit | bc0eaba222cdaf614bff3bd28701f8fd4267f725 (patch) | |
tree | 59c66f69ca97840b37c38861c258b4d44534fd40 /macros/latex | |
parent | ae89135e23ed84909287c5d84a2c38c044789b51 (diff) |
CTAN sync 202305280300
Diffstat (limited to 'macros/latex')
-rw-r--r-- | macros/latex/contrib/fduthesis/README.md | 2 | ||||
-rw-r--r-- | macros/latex/contrib/fduthesis/fduthesis-code.dtx | 354 | ||||
-rw-r--r-- | macros/latex/contrib/fduthesis/fduthesis-code.pdf | bin | 977630 -> 977509 bytes | |||
-rw-r--r-- | macros/latex/contrib/fduthesis/fduthesis-doc.dtx | 5 | ||||
-rw-r--r-- | macros/latex/contrib/fduthesis/fduthesis-en.pdf | bin | 151111 -> 151400 bytes | |||
-rw-r--r-- | macros/latex/contrib/fduthesis/fduthesis.dtx | 354 | ||||
-rw-r--r-- | macros/latex/contrib/fduthesis/fduthesis.pdf | bin | 445548 -> 444802 bytes | |||
-rw-r--r-- | macros/latex/contrib/footmisc/changes.txt | 7 | ||||
-rw-r--r-- | macros/latex/contrib/footmisc/footmisc-code.pdf | bin | 363788 -> 365983 bytes | |||
-rw-r--r-- | macros/latex/contrib/footmisc/footmisc-doc.pdf | bin | 249001 -> 250295 bytes | |||
-rw-r--r-- | macros/latex/contrib/footmisc/footmisc.dtx | 17 | ||||
-rw-r--r-- | macros/latex/contrib/naive-ebnf/naive-ebnf.dtx | 27 | ||||
-rw-r--r-- | macros/latex/contrib/naive-ebnf/naive-ebnf.pdf | bin | 588553 -> 591999 bytes |
13 files changed, 402 insertions, 364 deletions
diff --git a/macros/latex/contrib/fduthesis/README.md b/macros/latex/contrib/fduthesis/README.md index 4f36d2bb81..e9373209b3 100644 --- a/macros/latex/contrib/fduthesis/README.md +++ b/macros/latex/contrib/fduthesis/README.md @@ -1,7 +1,7 @@ The `fduthesis` Class ===================== -*LaTeX thesis template for Fudan University, v0.9* +*LaTeX thesis template for Fudan University, v0.9a* Overview -------- diff --git a/macros/latex/contrib/fduthesis/fduthesis-code.dtx b/macros/latex/contrib/fduthesis/fduthesis-code.dtx index 786bbfa049..28d4904f66 100644 --- a/macros/latex/contrib/fduthesis/fduthesis-code.dtx +++ b/macros/latex/contrib/fduthesis/fduthesis-code.dtx @@ -46,7 +46,7 @@ The `fduthesis` Class ===================== -*LaTeX thesis template for Fudan University, v0.9* +*LaTeX thesis template for Fudan University, v0.9a* Overview -------- @@ -231,7 +231,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % %<class|class-en|doc|logo>\NeedsTeXFormat{LaTeX2e}[2020/10/01] %<*!(driver|install|ex-logo|cover)> -%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.9 2023-02-26 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.9a 2023-05-27 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ %<class> {Thesis template for Fudan University} %<class>\ProvidesExplClass{\ExplFileName} %<class-en> {Thesis template for Fudan University (English version)} @@ -271,13 +271,13 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. \title{\textcolor{MaterialIndigo800}{\textbf{fduthesis: 复旦大学论文模板}}} \author{曾祥东} -\date{2023/02/26\quad v0.9% +\date{2023/05/27\quad v0.9a% \thanks{\url{https://github.com/stone-zeng/fduthesis}.}} %^^A! \title{\textcolor{MaterialIndigo800}{% %^^A! \textbf{The \textsf{fduthesis} Class \\ %^^A! \LaTeX{} Thesis Template for Fudan University}}} %^^A! \author{Xiangdong Zeng} -%^^A! \date{2023/02/26\quad v0.9% +%^^A! \date{2023/05/27\quad v0.9a% %^^A! \thanks{\url{https://github.com/stone-zeng/fduthesis}.}} %^^A! @@ -1309,7 +1309,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. %^^A! % %^^A+ -% \begin{function}[added=2018-01-25]{style/bib-backend} +% \begin{function}[added=2018-01-25,updated=2023-05-11]{style/bib-backend} % \begin{fdusyntax}[emph={[1]bib-backend}] % bib-backend = (*<bibtex|biblatex>*) % \end{fdusyntax} @@ -1317,11 +1317,13 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % 选择参考文献的支持方式。选择 \opt{bibtex} 后,将使用 \BibTeX{} % 处理文献,样式由 \pkg{natbib} 宏包负责;选择 \opt{biblatex} 后, % 将使用 \biber{} 处理文献,样式则由 \pkg{biblatex} 宏包负责。 +% 如果没有指定该选项,则不再处理引用和参考文献。 % \end{function} %^^A! Specify the backend or driver of bibliography processing. %^^A! \BibTeX{} and \pkg{natbib} package will be used if you choose %^^A! \opt{bibtex}, while \biber{} and \pkg{biblatex} will be used -%^^A! if you choose \opt{biblatex}. +%^^A! if you choose \opt{biblatex}. If not specified, the citations +%^^A! and references will not be processed. %^^A! \end{function} %^^A! % @@ -1687,10 +1689,10 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % % \begin{function}{info/keywords,info/keywords*} % \begin{fdusyntax}[emph={[1]keywords,keywords*}] -% keywords = (*\marg{中文关键字}*) -% keywords* = (*\marg{英文关键字}*) +% keywords = (*\marg{中文关键词}*) +% keywords* = (*\marg{英文关键词}*) % \end{fdusyntax} -% 关键字列表。各关键字之间需使用英文逗号隔开。为防止歧义, +% 关键词列表。各关键词之间需使用英文逗号隔开。为防止歧义, % 可以用分组括号“|{...}|”把各字段括起来。 % \end{function} %^^A! \begin{function}{info/keywords,info/keywords*} @@ -1823,7 +1825,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. %^^A! \end{function} %^^A! % -% 摘要的最后,会显示关键字列表以及中图分类号(CLC)或 JEL 分类号。这两项 +% 摘要的最后,会显示关键词列表以及中图分类号(CLC)或 JEL 分类号。这两项 % 可通过 \cs{fdusetup} 录入,具体请参阅 \ref{subsubsec:信息录入}~节。 %^^A! At the end of abstract (both Chinese and English, if available), %^^A! keywords list and CLC or JEL code will be shown. They can be @@ -2036,7 +2038,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. %^^A! Knuth\textsuperscript{[\C1]} states & %^^A! \verbcite[citet]{texbook} & %^^A! \verbcite[authornumcite]{texbook} \\ -%^^A! With page and author & +%^^A! With page \& author & %^^A! Knuth\textsuperscript{[\C1]42} states & %^^A! \verbcite[citet][42]{texbook} & %^^A! \verbcite[authornumcite][42]{texbook} \\ @@ -2103,7 +2105,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. %^^A! \verbcite[citep]{texbook} & %^^A! \verbcite{texbook} \\ %^^A! Multiple & -%^^A! (\C{Knuth}, \C{1986}; \C{Mittelbach et al.}, \C{2004}) & +%^^A! (\C{Knuth}, \C{1986}; \C{Mittelbach et~al.}, \C{2004}) & %^^A! \verbcite[citep]{texbook,companion} & %^^A! \verbcite{texbook,companion} \\ %^^A! With page & @@ -2114,7 +2116,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. %^^A! \C{Knuth} (\C{1986}) & %^^A! \verbcite[citet]{texbook} & %^^A! Same as left \\ -%^^A! With page and author & +%^^A! With page \& author & %^^A! \C{Knuth} (\C{1986})\textsuperscript{42} & %^^A! \verbcite[citet][42]{texbook} & %^^A! Same as left \\ @@ -2514,7 +2516,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % W3C. % \newblock \textit{中文排版需求(Requirements for Chinese Text Layout)} [EB/OL]. % \newblock W3C Editor's Draft. -% \newblock (2022-09-01) +% \newblock (2023-05-24) % \urlprefix\url{https://w3c.github.io/clreq/} % % \bibitem[()]{复旦大学论文规范} @@ -2527,9 +2529,9 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \subsection{宏包、模版} % % \bibitem[()]{source2e} -% \textsc{Braams J}, \textsc{Carlisle D}, \textsc{Jeffrey A}, et al. +% \textsc{Braams J}, \textsc{Carlisle D}, \textsc{Jeffrey A}, et~al. % \newblock \textit{The \LaTeXe{} Sources} [CP/OL]. -% \newblock (2022-06-01) +% \newblock (2022-11-01) % \urlprefix\url{https://ctan.org/pkg/latex} % \urlprefix\CTANurl[源代码:]{macros/latex/base/source2e.pdf} % @@ -2560,20 +2562,20 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \bibitem[()]{source3} % \textsc{The \LaTeX3 Project}. % \newblock \textit{The \LaTeX3 Sources} [CP/OL]. -% \newblock (2022-08-30) +% \newblock (2023-05-22) % \urlprefix\url{https://ctan.org/pkg/l3kernel} % \urlprefix\CTANurl[源代码:]{macros/latex/contrib/l3kernel/source3.pdf} % % \bibitem[()]{biblatex} % \textsc{Kime P}, \textsc{Wemheuer M}, \textsc{Lehman P}. % \newblock \textit{The \pkg{biblatex} Package} [EB/OL]. -% \newblock version 3.18b, -% \newblock (2022-07-12) +% \newblock version 3.19, +% \newblock (2023-03-05) % \urlprefix\url{https://ctan.org/pkg/biblatex} % \urlprefix\CTANurl[文档:]{macros/latex/contrib/biblatex/doc/biblatex.pdf} % % \bibitem[()]{lshort} -% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al. +% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et~al. % \newblock \textit{The Not So Short Introduction to \LaTeXe{}: Or \LaTeXe{} in 139 minutes} [EB/OL]. % \newblock version 6.4, % \newblock (2021-03-09) @@ -2581,27 +2583,27 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \urlprefix\CTANurl[文档:]{info/lshort/english/lshort.pdf} % % \bibitem[()]{lshort-zh-cn} -% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al. +% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et~al. % \newblock \textit{一份(不太)简短的 \LaTeXe{} 介绍: 或 111 分钟了解 \LaTeXe{}} [EB/OL]. % \newblock \CTeX{} 开发小组, 译. -% \newblock 原版版本 version 6.4, 中文版本 version 6.03, -% \newblock (2021-11-20) +% \newblock 原版版本 version 6.4, 中文版本 version 6.04, +% \newblock (2023-05-05) % \urlprefix\url{https://ctan.org/pkg/lshort-zh-cn} % \urlprefix\CTANurl[文档:]{info/lshort/chinese/lshort-zh-cn.pdf} % % \bibitem[()]{biblatex-gb7714-2015} % 胡振震. % \newblock \textit{符合 GB/T 7714-2015 标准的 biblatex 参考文献样式} [EB/OL]. -% \newblock version 1.1j, -% \newblock (2022-08-29) +% \newblock version 1.1n, +% \newblock (2023-05-25) % \urlprefix\url{https://ctan.org/pkg/biblatex-gb7714-2015} % \urlprefix\CTANurl[文档:]{biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf} % % \bibitem[()]{gbt7714} % 李泽平(\textsc{Zeping L}). % \newblock \textit{GB/T 7714-2015 \BibTeX{} Style} [EB/OL]. -% \newblock version 2.1.4, -% \newblock (2022-03-12) +% \newblock version 2.1.5, +% \newblock (2022-10-03) % \urlprefix\url{https://ctan.org/pkg/gbt7714} % \urlprefix\CTANurl[文档:]{biblio/bibtex/contrib/gbt7714/gbt7714.pdf} % @@ -2616,34 +2618,34 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \bibitem[()]{pkuthss} % Casper Ti. Vector. % \newblock \textit{北京大学学位论文模版:pkuthss} [EB/OL]. -% \newblock version 1.9.2, -% \newblock (2022-05-05) +% \newblock version 1.9.3, +% \newblock (2022-10-30) % \urlprefix\url{https://ctan.org/pkg/pkuthss} % \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/pkuthss/pkuthss.pdf} % % \bibitem[()]{thuthesis} % 清华大学 TUNA 协会. % \newblock \textit{\textsc{ThuThesis}:清华大学学位论文模板} [EB/OL]. -% \newblock version 7.3.0, -% \newblock (2022-05-17) +% \newblock version 7.4.0, +% \newblock (2023-05-15) % \urlprefix\url{https://ctan.org/pkg/thuthesis} % \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/thuthesis/thuthesis.pdf} % -% \emph{以下模版未收录至 CTAN,但仍然保持活跃更新。} +% \emph{以下模版未收录至 CTAN,但仍然保持更新。} % % \bibitem[()]{sjtuthesis} % \textsc{SJTUG}. % \newblock \textit{上海交通大学学位论文模板} [EB/OL]. -% \newblock version 1.1.1, -% \newblock (2022-08-04) +% \newblock version 2.0.2, +% \newblock (2023-04-01) % \urlprefix\url{https://github.com/sjtug/SJTUThesis} % \urlprefix\url[源代码仓库:]{https://github.com/sjtug/SJTUTeX} % % \bibitem[()]{ustcthesis} % \textsc{USTC \TeX{} User Group}. % \newblock \textit{中国科学技术大学学位论文 \LaTeX{} 模板} [EB/OL]. -% \newblock version 3.3.3, -% \newblock (2022-05-17) +% \newblock version 3.3.4, +% \newblock (2023-05-10) % \urlprefix\url{https://github.com/ustctug/ustcthesis} % % \bibitem[()]{ucasthesis} @@ -2787,11 +2789,10 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{variable} % -% \begin{variable}{\g_@@_thesis_type_int} -% 论文类型。取值 1、2、3 分别对应博士、硕士、本科(学士),这与学号 -% 第三位是一致的。 +% \begin{variable}{\g_@@_thesis_type_tl} +% 论文类型。 % \begin{macrocode} -\int_new:N \g_@@_thesis_type_int +\tl_new:N \g_@@_thesis_type_tl % \end{macrocode} % \end{variable} % @@ -2813,7 +2814,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{variable} % % \begin{variable}{\g_@@_draft_bool} -% 是否开启草稿模式。 +% 是否开启草稿模式(默认关闭)。 % \begin{macrocode} \bool_new:N \g_@@_draft_bool % \end{macrocode} @@ -2828,13 +2829,19 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % % \subsubsection{内部函数} % -% \begin{macro}{\file_input:V,\int_to_arabic:v,\keys_define:nx,\regex_replace_all:nnc} +% \begin{macro}{ +% \file_input:V, +% \int_to_arabic:v, +% \keys_define:nx, +% \prop_item:No, +% \regex_replace_all:nnc} % \begin{macro}[TF]{\tl_if_eq:Vn} % \LaTeX3{} 函数变体。 % \begin{macrocode} \cs_generate_variant:Nn \file_input:n { V } \cs_generate_variant:Nn \int_to_arabic:n { v } \cs_generate_variant:Nn \keys_define:nn { nx } +\cs_generate_variant:Nn \prop_item:Nn { No } \cs_generate_variant:Nn \regex_replace_all:nnN { nnc } \prg_generate_conditional_variant:Nnn \tl_if_eq:nn { Vn } { T, TF } % \end{macrocode} @@ -2966,11 +2973,10 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % 设置论文类型。设为模板选项主要是为了以后的兼容性。论文类型可能会 % 影响很多设置,只是暂时还不考虑。默认为本科毕业论文。 % \begin{macrocode} - type .choice:, - type .value_required:n = true, type .choices:nn = { doctor, master, bachelor } - { \int_set_eq:NN \g_@@_thesis_type_int \l_keys_choice_int }, + { \tl_set_eq:NN \g_@@_thesis_type_tl \l_keys_choice_tl }, + type .value_required:n = true, type .initial:n = bachelor, % \end{macrocode} % \end{macro} @@ -3179,7 +3185,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. { font .choices:nn = { garamond, libertinus, lm, palatino, times, times*, none } - { \tl_set_eq:NN \g_@@_fontset_tl \l_keys_choice_tl } + { \tl_set_eq:NN \g_@@_fontset_tl \l_keys_choice_tl }, + font .value_required:n = true, } % \end{macrocode} % \end{macro} @@ -3193,7 +3200,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. { cjk-font .choices:nn = { adobe, fandol, founder, mac, sinotype, sourcehan, windows, none } - { \tl_set_eq:NN \g_@@_cjk_fontset_tl \l_keys_choice_tl } + { \tl_set_eq:NN \g_@@_cjk_fontset_tl \l_keys_choice_tl }, + cjk-font .value_required:n = true, } % \end{macrocode} %</class> @@ -4410,16 +4418,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % % 分别设置浮动体 \env{figure} 和 \env{table} 的标题样式。 % \begin{macrocode} -\captionsetup [ figure ] - { - font = small, - labelsep = quad - } -\captionsetup [ table ] - { - font = { small, sf }, - labelsep = quad - } +\captionsetup [ figure ] { font = small, labelsep = quad } +\captionsetup [ table ] { font = { small, sf }, labelsep = quad } % \end{macrocode} % % \begin{macro}{\thefigure,\thetable} @@ -4478,17 +4478,16 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_info_degree_type_int} -% 学位类型。1 为学术学位,2 为专业学位。 +% \begin{variable}{\l_@@_info_degree_type_tl} +% 学位类型。 % \begin{macrocode} -\int_new:N \l_@@_info_degree_type_int +\tl_new:N \l_@@_info_degree_type_tl % \end{macrocode} % \end{variable} % % \changes{v0.9}{2023/02/12}{删除论文标题中的 \tn{\textbackslash} 和汉字间的空格。} % -% \begin{variable}{\l_@@_info_title_sanitized_tl, -% \l_@@_info_title_en_sanitized_tl} +% \begin{variable}{\l_@@_info_title_sanitized_tl,\l_@@_info_title_en_sanitized_tl} % 处理后的论文标题。 % \begin{macrocode} \tl_new:N \l_@@_info_title_sanitized_tl @@ -4527,7 +4526,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} degree .choices:nn = { academic, professional } - { \int_set_eq:NN \l_@@_info_degree_type_int \l_keys_choice_int }, + { \tl_set_eq:NN \l_@@_info_degree_type_tl \l_keys_choice_tl }, + degree .value_required:n = true, % \end{macrocode} % \end{macro} % @@ -4600,7 +4600,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macro} % % \begin{macro}{info/keywords,info/keywords*} -% 论文关键字。 +% 论文关键词。 % \begin{macrocode} keywords .clist_set:N = \l_@@_info_keywords_clist, keywords* .clist_set:N = \l_@@_info_keywords_en_clist, @@ -4644,13 +4644,6 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \changes{v0.3}{2017/07/04}{新增 \opt{info/secret-level} 与 % \opt{info/secret-year} 选项。} % -% \begin{variable}{\l_@@_secret_bool} -% 是否显示密级。 -% \begin{macrocode} -\bool_new:N \l_@@_secret_bool -% \end{macrocode} -% \end{variable} -% % \begin{variable}{\l_@@_info_secret_level_tl} % 保存当前的密级。 % \begin{macrocode} @@ -4670,18 +4663,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} secret-level .choices:nn = { none, i, ii, iii } - { - \int_compare:nTF { \l_keys_choice_int >= 2 } - { - \bool_set_true:N \l_@@_secret_bool - \tl_set:Nn \l_@@_info_secret_level_tl - { - \clist_item:Nn \c_@@_secret_clist - { \l_keys_choice_int - 1 } - } - } - { \bool_set_false:N \l_@@_secret_bool } - }, + { \tl_set_eq:NN \l_@@_info_secret_level_tl \l_keys_choice_tl }, secret-level .value_required:n = true, % \end{macrocode} % \end{macro} @@ -4783,40 +4765,59 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \changes{v0.5}{2017/09/19}{使用 \pkg{expl3} 以及内部函数改写 % 封面,减少对 \LaTeXe{} 的依赖。} % -% \begin{macro}{\@@_cover_id:,\@@_cover_id_aux:n} -% 右上角的学校代码和学号。 +% \begin{macro}{\@@_cover_id:,\@@_cover_id_tabular:n,\@@_cover_id_aux:n} +% 右上角的密级、学校代码和学号。 +% \changes{v0.9a}{2023/05/21}{封面密级、学校代码和学号改用表格实现。} % \begin{macrocode} \cs_new_protected:Npn \@@_cover_id: { - \@@_fixed_width_box:nn { 120 pt } - { - \bool_if:NT \l_@@_secret_bool - { - \group_begin: - \sffamily - \@@_cover_id_aux:n { secret_level } - \c_@@_name_secret_star_tl - \l_@@_info_secret_year_tl - \group_end: - \par - } - \@@_cover_id_aux:n { school_id } \par - \@@_cover_id_aux:n { student_id } - } -% \end{macrocode} -% 插入一个宽度为负的水平盒子以减少右侧边距。 -% \begin{macrocode} - \hbox_to_wd:nn { -24 pt } { } + \tl_if_eq:NnTF \l_@@_info_secret_level_tl { none } + { \@@_cover_id_tabular:n { } } + { \@@_cover_id_tabular:n { \@@_cover_secret: \\ } } + } +\cs_new_protected:Npn \@@_cover_id_tabular:n #1 + { + \exp_args:Nnx \begin{tabular} { \c_@@_cover_id_align_tl } + #1 + \@@_cover_id_aux:n { school_id } \\ + \@@_cover_id_aux:n { student_id } + \end{tabular} } \cs_new:Npn \@@_cover_id_aux:n #1 { - \tl_use:c { c_@@_name_ #1 _tl } - \c_@@_fwid_colon_tl + \tl_use:c { c_@@_name_ #1 _tl } & \tl_use:c { l_@@_info_ #1 _tl } } % \end{macrocode} % \end{macro} % +% \begin{variable}{\c_@@_cover_id_align_tl} +% 密级、学号栏对齐格式:左右两栏均左对齐,中间以冒号分隔,并且不加间距。 +% \begin{macrocode} +\tl_const:Nn \c_@@_cover_id_align_tl + { l @ { \c_@@_fwid_colon_tl } l @ { } } +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\@@_cover_secret:} +% 密级,使用无衬线字体。 +% \begin{macrocode} +\cs_new:Npn \@@_cover_secret: + { + \multicolumn { 2 } { l } + { + \sffamily + \c_@@_name_secret_level_tl + \c_@@_fwid_colon_tl + \prop_item:No \c_@@_secret_prop + { \l_@@_info_secret_level_tl } + \c_@@_name_secret_star_tl + \l_@@_info_secret_year_tl + } + } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\@@_cover_logo:} % 插入校名图片。根据参数 \opt{width} 和 \opt{height} 是否为空依次 % 判断。\cs{l_@@_cover_logo_size_clist} 中超过两个的参数将被忽略。 @@ -4844,11 +4845,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \cs_new_protected:Npn \@@_cover_type: { - \tl_set:Nx \l_@@_tmpa_tl - { - \clist_item:Nn \c_@@_thesis_type_clist - { \g_@@_thesis_type_int } - } + \prop_get:NVN \c_@@_thesis_type_prop + \g_@@_thesis_type_tl \l_@@_tmpa_tl \@@_spread_box:no { 0.45 \textwidth } { \l_@@_tmpa_tl } } % \end{macrocode} @@ -4860,39 +4858,17 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \cs_new_protected:Npn \@@_cover_degree: { - \int_compare:nT { \g_@@_thesis_type_int != 3 } + \tl_if_eq:NnF \g_@@_thesis_type_tl { bachelor } { \c_@@_fwid_left_paren_tl - \clist_item:Nn \c_@@_degree_type_clist - { \l_@@_info_degree_type_int } + \prop_item:No \c_@@_degree_type_prop + { \l_@@_info_degree_type_tl } \c_@@_fwid_right_paren_tl } } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_cover_info_left:n} -% 信息栏左侧字段。 -% \begin{macrocode} -\cs_new_protected:Npn \@@_cover_info_left:n #1 - { - \int_case:nn { \l_@@_info_degree_type_int } - { - { 1 } { \_@@_spread_box:nn { 6 em } {#1} } - { 2 } { \_@@_spread_box:nn { 9 em } {#1} } - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{variable}{\c_@@_cover_info_align_tl} -% 信息栏对齐格式:左右两栏均居中,中间以冒号分隔。 -% \begin{macrocode} -\tl_const:Nn \c_@@_cover_info_align_tl - { c @ { \c_@@_fwid_colon_tl } c } -% \end{macrocode} -% \end{variable} -% % \begin{macro}{\@@_cover_info:} % \changes{v0.8}{2021/09/21}{调整专业学位的封面信息栏。} % \changes{v0.9}{2023/02/05}{封面信息栏改用表格实现。} @@ -4905,7 +4881,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % 专业学位与学术学位对应的左侧字段有所不同,这里统一存入 \cs{c_@@_name_major_tl}。 % \begin{macrocode} - \int_compare:nNnT { \l_@@_info_degree_type_int } = { 2 } + \tl_if_eq:NnT \l_@@_info_degree_type_tl { professional } { \tl_set_eq:NN \c_@@_name_major_tl \c_@@_name_major_professional_tl @@ -4926,8 +4902,9 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. } % \end{macrocode} % 通过 \env{tabular} 环境输出。 +% \changes{v0.9a}{2023/05/07}{展开列格式参数以修复与 \pkg{array} 宏包的兼容性问题。} % \begin{macrocode} - \begin{tabular} { \c_@@_cover_info_align_tl } + \exp_args:Nnx \begin{tabular} { \c_@@_cover_info_align_tl } \clist_use:Nn \l_@@_tmpa_clist { \\ [ 1 ex ] } \end{tabular} \group_end: @@ -4935,6 +4912,26 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{macro} % +% \begin{variable}{\c_@@_cover_info_align_tl} +% 信息栏对齐格式:左右两栏均居中,中间以冒号分隔。 +% \begin{macrocode} +\tl_const:Nn \c_@@_cover_info_align_tl + { c @ { \c_@@_fwid_colon_tl } c } +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\@@_cover_info_left:n} +% 信息栏左侧字段。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_cover_info_left:n #1 + { + \tl_if_eq:NnTF \l_@@_info_degree_type_tl { professional } + { \@@_spread_box:nn { 9 em } {#1} } + { \@@_spread_box:nn { 6 em } {#1} } + } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\@@_cover_signature:N} % 签名行。 % \begin{macrocode} @@ -5423,11 +5420,11 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{macro} % -% \changes{v0.7d}{2019/03/28}{优化关键字列表的显示。} +% \changes{v0.7d}{2019/03/28}{优化关键词列表的显示。} % \changes{v0.8}{2021/12/22}{没有指定 CLC/JEL 分类号时不再显示。} % % \begin{macro}{\@@_abstract_end:} -% 摘要正文完成后,输出关键字列表和 CLC/JEL 分类号。 +% 摘要正文完成后,输出关键词列表和 CLC/JEL 分类号。 % \begin{macrocode} %<*class> \cs_new_protected:Npn \@@_abstract_end: @@ -5473,7 +5470,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macro} % % \begin{macro}{\@@_keywords:nNn,\@@_keywords_prevdepth:,\@@_clc_jel:nn} -% 关键字列表前要空一行,使用悬挂缩进;分类号不缩进。\tn{parbox} 之后的间距 +% 关键词列表前要空一行,使用悬挂缩进;分类号不缩进。\tn{parbox} 之后的间距 % 需要调整,见 \url{https://tex.stackexchange.com/a/34982}。 % \begin{macrocode} \cs_new_protected:Npn \@@_keywords:nNn #1#2#3 @@ -5569,17 +5566,17 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % % \changes{v0.6}{2017/10/27}{支持 \BibTeX{},以实现参考文献的著录与引用。} % \changes{v0.7}{2018/01/25}{支持 \biber{} 与 \pkg{biblatex}。} +% \changes{v0.9a}{2023/05/11}{允许同时不使用 \BibTeX{} 与 \pkg{biblatex}。} % -% \begin{variable}{\l_@@_bibtex_bool} -% 是否使用 \BibTeX{} 作为参考文献处理程序。若为否,则使用 +% \begin{variable}{\l_@@_bib_backend_tl} +% 保存参考文献处理程序(后端),默认为空,即同时不使用 \BibTeX{} 与 \pkg{biblatex}。 % \pkg{biblatex}/\biber{}。 % \begin{macrocode} -\bool_new:N \l_@@_bibtex_bool +\tl_new:N \l_@@_bib_backend_tl % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_bib_style_tl,\l_@@_bib_gb_style_tl, -% \l_@@_cite_style_tl} +% \begin{variable}{\l_@@_bib_style_tl,\l_@@_bib_gb_style_tl,\l_@@_cite_style_tl} % 保存参考文献及引用样式。 % \begin{macrocode} \tl_new:N \l_@@_bib_style_tl @@ -5612,9 +5609,18 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. bib-backend .choice:, bib-backend .value_required:n = true, bib-backend / bibtex .code:n = - { \bool_set_true:N \l_@@_bibtex_bool }, + { \tl_set:Nn \l_@@_bib_backend_tl { bibtex } }, +% \end{macrocode} +% \changes{v0.8}{2022/01/08}{补充定义 \tn{addbibresource} 命令以兼容 \pkg{biblatex} 的用法。} +% 由于 \pkg{biblatex} 在导言区后才载入,需要单独定义添加参考文献数据源的命令以实现兼容。 +% 该命令需要在载入宏包前取消定义。 +% \begin{macrocode} bib-backend / biblatex .code:n = - { \bool_set_false:N \l_@@_bibtex_bool }, + { + \tl_set:Nn \l_@@_bib_backend_tl { biblatex } + \NewDocumentCommand \addbibresource { m } + { \clist_gput_right:Nn \l_@@_bib_resource_clist {#1} } + }, % \end{macrocode} % \end{macro} % \begin{macro}{style/bib-style} @@ -5661,7 +5667,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \ctex_at_end_preamble:n { - \bool_if:NT \l_@@_bibtex_bool + \tl_if_eq:NnT \l_@@_bib_backend_tl { bibtex } { \tl_if_empty:NTF \l_@@_bib_style_tl { @@ -5684,7 +5690,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \@@_gadd_ltxhook:nn { env/document/begin } { - \bool_if:NF \l_@@_bibtex_bool + \tl_if_eq:NnT \l_@@_bib_backend_tl { biblatex } { \@@_biblatex_pre_setup: \RequirePackage { biblatex } @@ -5746,20 +5752,6 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{macro} % -% \changes{v0.8}{2022/01/08}{补充定义 \tn{addbibresource} 命令以兼容 \pkg{biblatex} 的用法。} -% -% \begin{macro}{\addbibresource} -% 由于 \pkg{biblatex} 在导言区后才载入,需要单独定义添加参考文献数据源的命令以实现兼容。 -% 该命令需要在载入宏包前取消定义。 -% \begin{macrocode} -\bool_if:NF \l_@@_bibtex_bool - { - \NewDocumentCommand \addbibresource { m } - { \clist_gput_right:Nn \l_@@_bib_resource_clist {#1} } - } -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\@@_biblatex_pre_setup:,\@@_biblatex_post_setup:} % \pkg{biblatex} 相关设置。 % \begin{macrocode} @@ -6011,7 +6003,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % 由于 \pkg{hyperref} 在 \pkg{biblatex} 之后调用,所以需要手动开启相关功能。 % \begin{macrocode} - \bool_if:NF \l_@@_bibtex_bool { \BiblatexManualHyperrefOn } + \tl_if_eq:NnT \l_@@_bib_backend_tl { biblatex } + { \BiblatexManualHyperrefOn } } % \end{macrocode} % @@ -6225,24 +6218,37 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % % \subsubsection{杂项} % -% \begin{variable}{\c_@@_thesis_type_clist, -% \c_@@_degree_type_clist} +% \begin{variable}{\c_@@_thesis_type_prop,\c_@@_degree_type_prop} % 论文类型与学位类型。 % \begin{macrocode} -\clist_const:Nn \c_@@_thesis_type_clist - { 博士学位论文, 硕士学位论文, 本科毕业论文 } -\clist_const:Nn \c_@@_degree_type_clist - { 学术学位, 专业学位 } +\prop_const_from_keyval:Nn \c_@@_thesis_type_prop + { + doctor = 博士学位论文, + master = 硕士学位论文, + bachelor = 本科毕业论文, + } +\prop_const_from_keyval:Nn \c_@@_degree_type_prop + { + academic = 学术学位, + professional = 专业学位, + } % \end{macrocode} % \end{variable} % -% \begin{variable}{\c_@@_secret_clist} +% \begin{variable}{\c_@@_secret_prop} % 三种密级。 % \begin{macrocode} -\clist_const:Nn \c_@@_secret_clist { 秘密, 机密, 绝密 } +\prop_const_from_keyval:Nn \c_@@_secret_prop + { + i = 秘密, + ii = 机密, + iii = 绝密, + } % \end{macrocode} % \end{variable} % +% \changes{v0.9a}{2023/03/23}{“关键字”更改为“关键词”。} +% % 默认名称。注意空格是忽略掉的。 % \begin{macrocode} \clist_map_inline:nn @@ -6275,7 +6281,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. \clist_map_inline:nn { { abstract } { 摘 \quad 要 } { Abstract }, - { keywords } { 关键字 } { Keywords: }, + { keywords } { 关键词 } { Keywords: }, { clc } { 中图分类号 } { CLC~ code: }, { jel } { JEL 分类号 } { JEL~ code: }, { notation } { 符号表 } { List~ of~ Symbols }, diff --git a/macros/latex/contrib/fduthesis/fduthesis-code.pdf b/macros/latex/contrib/fduthesis/fduthesis-code.pdf Binary files differindex 91dd190d1c..777ded2d9c 100644 --- a/macros/latex/contrib/fduthesis/fduthesis-code.pdf +++ b/macros/latex/contrib/fduthesis/fduthesis-code.pdf diff --git a/macros/latex/contrib/fduthesis/fduthesis-doc.dtx b/macros/latex/contrib/fduthesis/fduthesis-doc.dtx index c39e192e7a..e09af2a7ca 100644 --- a/macros/latex/contrib/fduthesis/fduthesis-doc.dtx +++ b/macros/latex/contrib/fduthesis/fduthesis-doc.dtx @@ -1671,8 +1671,7 @@ % \changes{v0.7c}{2019/02/08}{[\pkg{fdudoc}] 修改宏包手册主要字体。} % \changes{v0.9}{2023/02/18}{[\pkg{fdudoc}] 更新宏包手册字体。} % -% 西文字体。为兼容 macOS,系统字体需使用字体名,而 \TeXLive{} -% 中的字体需使用文件名。 +% 西文字体。 % \begin{macrocode} \setmainfont{LibertinusSerif}[ Extension = .otf, @@ -1985,7 +1984,7 @@ \@empty\z@\@empty % \end{macrocode} % -% \changes{v0.5}{2017/09/05}{[\pkg{fdudoc}] 移除 \pkg{listings} 关键字定义文件。} +% \changes{v0.5}{2017/09/05}{[\pkg{fdudoc}] 移除 \pkg{listings} 关键词定义文件。} % % 定义几种代码样式。 % \begin{macro}[int]{style@base} diff --git a/macros/latex/contrib/fduthesis/fduthesis-en.pdf b/macros/latex/contrib/fduthesis/fduthesis-en.pdf Binary files differindex 8a62785309..2633bce127 100644 --- a/macros/latex/contrib/fduthesis/fduthesis-en.pdf +++ b/macros/latex/contrib/fduthesis/fduthesis-en.pdf diff --git a/macros/latex/contrib/fduthesis/fduthesis.dtx b/macros/latex/contrib/fduthesis/fduthesis.dtx index 2b001b151c..ff1a276d6a 100644 --- a/macros/latex/contrib/fduthesis/fduthesis.dtx +++ b/macros/latex/contrib/fduthesis/fduthesis.dtx @@ -46,7 +46,7 @@ The `fduthesis` Class ===================== -*LaTeX thesis template for Fudan University, v0.9* +*LaTeX thesis template for Fudan University, v0.9a* Overview -------- @@ -231,7 +231,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % %<class|class-en|doc|logo>\NeedsTeXFormat{LaTeX2e}[2020/10/01] %<*!(driver|install|ex-logo|cover)> -%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.9 2023-02-26 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.9a 2023-05-27 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ %<class> {Thesis template for Fudan University} %<class>\ProvidesExplClass{\ExplFileName} %<class-en> {Thesis template for Fudan University (English version)} @@ -271,13 +271,13 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. \title{\textcolor{MaterialIndigo800}{\textbf{fduthesis: 复旦大学论文模板}}} \author{曾祥东} -\date{2023/02/26\quad v0.9% +\date{2023/05/27\quad v0.9a% \thanks{\url{https://github.com/stone-zeng/fduthesis}.}} %^^A! \title{\textcolor{MaterialIndigo800}{% %^^A! \textbf{The \textsf{fduthesis} Class \\ %^^A! \LaTeX{} Thesis Template for Fudan University}}} %^^A! \author{Xiangdong Zeng} -%^^A! \date{2023/02/26\quad v0.9% +%^^A! \date{2023/05/27\quad v0.9a% %^^A! \thanks{\url{https://github.com/stone-zeng/fduthesis}.}} %^^A! @@ -1309,7 +1309,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. %^^A! % %^^A+ -% \begin{function}[added=2018-01-25]{style/bib-backend} +% \begin{function}[added=2018-01-25,updated=2023-05-11]{style/bib-backend} % \begin{fdusyntax}[emph={[1]bib-backend}] % bib-backend = (*<bibtex|biblatex>*) % \end{fdusyntax} @@ -1317,11 +1317,13 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % 选择参考文献的支持方式。选择 \opt{bibtex} 后,将使用 \BibTeX{} % 处理文献,样式由 \pkg{natbib} 宏包负责;选择 \opt{biblatex} 后, % 将使用 \biber{} 处理文献,样式则由 \pkg{biblatex} 宏包负责。 +% 如果没有指定该选项,则不再处理引用和参考文献。 % \end{function} %^^A! Specify the backend or driver of bibliography processing. %^^A! \BibTeX{} and \pkg{natbib} package will be used if you choose %^^A! \opt{bibtex}, while \biber{} and \pkg{biblatex} will be used -%^^A! if you choose \opt{biblatex}. +%^^A! if you choose \opt{biblatex}. If not specified, the citations +%^^A! and references will not be processed. %^^A! \end{function} %^^A! % @@ -1687,10 +1689,10 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % % \begin{function}{info/keywords,info/keywords*} % \begin{fdusyntax}[emph={[1]keywords,keywords*}] -% keywords = (*\marg{中文关键字}*) -% keywords* = (*\marg{英文关键字}*) +% keywords = (*\marg{中文关键词}*) +% keywords* = (*\marg{英文关键词}*) % \end{fdusyntax} -% 关键字列表。各关键字之间需使用英文逗号隔开。为防止歧义, +% 关键词列表。各关键词之间需使用英文逗号隔开。为防止歧义, % 可以用分组括号“|{...}|”把各字段括起来。 % \end{function} %^^A! \begin{function}{info/keywords,info/keywords*} @@ -1823,7 +1825,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. %^^A! \end{function} %^^A! % -% 摘要的最后,会显示关键字列表以及中图分类号(CLC)或 JEL 分类号。这两项 +% 摘要的最后,会显示关键词列表以及中图分类号(CLC)或 JEL 分类号。这两项 % 可通过 \cs{fdusetup} 录入,具体请参阅 \ref{subsubsec:信息录入}~节。 %^^A! At the end of abstract (both Chinese and English, if available), %^^A! keywords list and CLC or JEL code will be shown. They can be @@ -2036,7 +2038,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. %^^A! Knuth\textsuperscript{[\C1]} states & %^^A! \verbcite[citet]{texbook} & %^^A! \verbcite[authornumcite]{texbook} \\ -%^^A! With page and author & +%^^A! With page \& author & %^^A! Knuth\textsuperscript{[\C1]42} states & %^^A! \verbcite[citet][42]{texbook} & %^^A! \verbcite[authornumcite][42]{texbook} \\ @@ -2103,7 +2105,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. %^^A! \verbcite[citep]{texbook} & %^^A! \verbcite{texbook} \\ %^^A! Multiple & -%^^A! (\C{Knuth}, \C{1986}; \C{Mittelbach et al.}, \C{2004}) & +%^^A! (\C{Knuth}, \C{1986}; \C{Mittelbach et~al.}, \C{2004}) & %^^A! \verbcite[citep]{texbook,companion} & %^^A! \verbcite{texbook,companion} \\ %^^A! With page & @@ -2114,7 +2116,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. %^^A! \C{Knuth} (\C{1986}) & %^^A! \verbcite[citet]{texbook} & %^^A! Same as left \\ -%^^A! With page and author & +%^^A! With page \& author & %^^A! \C{Knuth} (\C{1986})\textsuperscript{42} & %^^A! \verbcite[citet][42]{texbook} & %^^A! Same as left \\ @@ -2514,7 +2516,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % W3C. % \newblock \textit{中文排版需求(Requirements for Chinese Text Layout)} [EB/OL]. % \newblock W3C Editor's Draft. -% \newblock (2022-09-01) +% \newblock (2023-05-24) % \urlprefix\url{https://w3c.github.io/clreq/} % % \bibitem[()]{复旦大学论文规范} @@ -2527,9 +2529,9 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \subsection{宏包、模版} % % \bibitem[()]{source2e} -% \textsc{Braams J}, \textsc{Carlisle D}, \textsc{Jeffrey A}, et al. +% \textsc{Braams J}, \textsc{Carlisle D}, \textsc{Jeffrey A}, et~al. % \newblock \textit{The \LaTeXe{} Sources} [CP/OL]. -% \newblock (2022-06-01) +% \newblock (2022-11-01) % \urlprefix\url{https://ctan.org/pkg/latex} % \urlprefix\CTANurl[源代码:]{macros/latex/base/source2e.pdf} % @@ -2560,20 +2562,20 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \bibitem[()]{source3} % \textsc{The \LaTeX3 Project}. % \newblock \textit{The \LaTeX3 Sources} [CP/OL]. -% \newblock (2022-08-30) +% \newblock (2023-05-22) % \urlprefix\url{https://ctan.org/pkg/l3kernel} % \urlprefix\CTANurl[源代码:]{macros/latex/contrib/l3kernel/source3.pdf} % % \bibitem[()]{biblatex} % \textsc{Kime P}, \textsc{Wemheuer M}, \textsc{Lehman P}. % \newblock \textit{The \pkg{biblatex} Package} [EB/OL]. -% \newblock version 3.18b, -% \newblock (2022-07-12) +% \newblock version 3.19, +% \newblock (2023-03-05) % \urlprefix\url{https://ctan.org/pkg/biblatex} % \urlprefix\CTANurl[文档:]{macros/latex/contrib/biblatex/doc/biblatex.pdf} % % \bibitem[()]{lshort} -% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al. +% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et~al. % \newblock \textit{The Not So Short Introduction to \LaTeXe{}: Or \LaTeXe{} in 139 minutes} [EB/OL]. % \newblock version 6.4, % \newblock (2021-03-09) @@ -2581,27 +2583,27 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \urlprefix\CTANurl[文档:]{info/lshort/english/lshort.pdf} % % \bibitem[()]{lshort-zh-cn} -% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al. +% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et~al. % \newblock \textit{一份(不太)简短的 \LaTeXe{} 介绍: 或 111 分钟了解 \LaTeXe{}} [EB/OL]. % \newblock \CTeX{} 开发小组, 译. -% \newblock 原版版本 version 6.4, 中文版本 version 6.03, -% \newblock (2021-11-20) +% \newblock 原版版本 version 6.4, 中文版本 version 6.04, +% \newblock (2023-05-05) % \urlprefix\url{https://ctan.org/pkg/lshort-zh-cn} % \urlprefix\CTANurl[文档:]{info/lshort/chinese/lshort-zh-cn.pdf} % % \bibitem[()]{biblatex-gb7714-2015} % 胡振震. % \newblock \textit{符合 GB/T 7714-2015 标准的 biblatex 参考文献样式} [EB/OL]. -% \newblock version 1.1j, -% \newblock (2022-08-29) +% \newblock version 1.1n, +% \newblock (2023-05-25) % \urlprefix\url{https://ctan.org/pkg/biblatex-gb7714-2015} % \urlprefix\CTANurl[文档:]{biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf} % % \bibitem[()]{gbt7714} % 李泽平(\textsc{Zeping L}). % \newblock \textit{GB/T 7714-2015 \BibTeX{} Style} [EB/OL]. -% \newblock version 2.1.4, -% \newblock (2022-03-12) +% \newblock version 2.1.5, +% \newblock (2022-10-03) % \urlprefix\url{https://ctan.org/pkg/gbt7714} % \urlprefix\CTANurl[文档:]{biblio/bibtex/contrib/gbt7714/gbt7714.pdf} % @@ -2616,34 +2618,34 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \bibitem[()]{pkuthss} % Casper Ti. Vector. % \newblock \textit{北京大学学位论文模版:pkuthss} [EB/OL]. -% \newblock version 1.9.2, -% \newblock (2022-05-05) +% \newblock version 1.9.3, +% \newblock (2022-10-30) % \urlprefix\url{https://ctan.org/pkg/pkuthss} % \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/pkuthss/pkuthss.pdf} % % \bibitem[()]{thuthesis} % 清华大学 TUNA 协会. % \newblock \textit{\textsc{ThuThesis}:清华大学学位论文模板} [EB/OL]. -% \newblock version 7.3.0, -% \newblock (2022-05-17) +% \newblock version 7.4.0, +% \newblock (2023-05-15) % \urlprefix\url{https://ctan.org/pkg/thuthesis} % \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/thuthesis/thuthesis.pdf} % -% \emph{以下模版未收录至 CTAN,但仍然保持活跃更新。} +% \emph{以下模版未收录至 CTAN,但仍然保持更新。} % % \bibitem[()]{sjtuthesis} % \textsc{SJTUG}. % \newblock \textit{上海交通大学学位论文模板} [EB/OL]. -% \newblock version 1.1.1, -% \newblock (2022-08-04) +% \newblock version 2.0.2, +% \newblock (2023-04-01) % \urlprefix\url{https://github.com/sjtug/SJTUThesis} % \urlprefix\url[源代码仓库:]{https://github.com/sjtug/SJTUTeX} % % \bibitem[()]{ustcthesis} % \textsc{USTC \TeX{} User Group}. % \newblock \textit{中国科学技术大学学位论文 \LaTeX{} 模板} [EB/OL]. -% \newblock version 3.3.3, -% \newblock (2022-05-17) +% \newblock version 3.3.4, +% \newblock (2023-05-10) % \urlprefix\url{https://github.com/ustctug/ustcthesis} % % \bibitem[()]{ucasthesis} @@ -2787,11 +2789,10 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{variable} % -% \begin{variable}{\g_@@_thesis_type_int} -% 论文类型。取值 1、2、3 分别对应博士、硕士、本科(学士),这与学号 -% 第三位是一致的。 +% \begin{variable}{\g_@@_thesis_type_tl} +% 论文类型。 % \begin{macrocode} -\int_new:N \g_@@_thesis_type_int +\tl_new:N \g_@@_thesis_type_tl % \end{macrocode} % \end{variable} % @@ -2813,7 +2814,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{variable} % % \begin{variable}{\g_@@_draft_bool} -% 是否开启草稿模式。 +% 是否开启草稿模式(默认关闭)。 % \begin{macrocode} \bool_new:N \g_@@_draft_bool % \end{macrocode} @@ -2828,13 +2829,19 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % % \subsubsection{内部函数} % -% \begin{macro}{\file_input:V,\int_to_arabic:v,\keys_define:nx,\regex_replace_all:nnc} +% \begin{macro}{ +% \file_input:V, +% \int_to_arabic:v, +% \keys_define:nx, +% \prop_item:No, +% \regex_replace_all:nnc} % \begin{macro}[TF]{\tl_if_eq:Vn} % \LaTeX3{} 函数变体。 % \begin{macrocode} \cs_generate_variant:Nn \file_input:n { V } \cs_generate_variant:Nn \int_to_arabic:n { v } \cs_generate_variant:Nn \keys_define:nn { nx } +\cs_generate_variant:Nn \prop_item:Nn { No } \cs_generate_variant:Nn \regex_replace_all:nnN { nnc } \prg_generate_conditional_variant:Nnn \tl_if_eq:nn { Vn } { T, TF } % \end{macrocode} @@ -2966,11 +2973,10 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % 设置论文类型。设为模板选项主要是为了以后的兼容性。论文类型可能会 % 影响很多设置,只是暂时还不考虑。默认为本科毕业论文。 % \begin{macrocode} - type .choice:, - type .value_required:n = true, type .choices:nn = { doctor, master, bachelor } - { \int_set_eq:NN \g_@@_thesis_type_int \l_keys_choice_int }, + { \tl_set_eq:NN \g_@@_thesis_type_tl \l_keys_choice_tl }, + type .value_required:n = true, type .initial:n = bachelor, % \end{macrocode} % \end{macro} @@ -3179,7 +3185,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. { font .choices:nn = { garamond, libertinus, lm, palatino, times, times*, none } - { \tl_set_eq:NN \g_@@_fontset_tl \l_keys_choice_tl } + { \tl_set_eq:NN \g_@@_fontset_tl \l_keys_choice_tl }, + font .value_required:n = true, } % \end{macrocode} % \end{macro} @@ -3193,7 +3200,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. { cjk-font .choices:nn = { adobe, fandol, founder, mac, sinotype, sourcehan, windows, none } - { \tl_set_eq:NN \g_@@_cjk_fontset_tl \l_keys_choice_tl } + { \tl_set_eq:NN \g_@@_cjk_fontset_tl \l_keys_choice_tl }, + cjk-font .value_required:n = true, } % \end{macrocode} %</class> @@ -4410,16 +4418,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % % 分别设置浮动体 \env{figure} 和 \env{table} 的标题样式。 % \begin{macrocode} -\captionsetup [ figure ] - { - font = small, - labelsep = quad - } -\captionsetup [ table ] - { - font = { small, sf }, - labelsep = quad - } +\captionsetup [ figure ] { font = small, labelsep = quad } +\captionsetup [ table ] { font = { small, sf }, labelsep = quad } % \end{macrocode} % % \begin{macro}{\thefigure,\thetable} @@ -4478,17 +4478,16 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_info_degree_type_int} -% 学位类型。1 为学术学位,2 为专业学位。 +% \begin{variable}{\l_@@_info_degree_type_tl} +% 学位类型。 % \begin{macrocode} -\int_new:N \l_@@_info_degree_type_int +\tl_new:N \l_@@_info_degree_type_tl % \end{macrocode} % \end{variable} % % \changes{v0.9}{2023/02/12}{删除论文标题中的 \tn{\textbackslash} 和汉字间的空格。} % -% \begin{variable}{\l_@@_info_title_sanitized_tl, -% \l_@@_info_title_en_sanitized_tl} +% \begin{variable}{\l_@@_info_title_sanitized_tl,\l_@@_info_title_en_sanitized_tl} % 处理后的论文标题。 % \begin{macrocode} \tl_new:N \l_@@_info_title_sanitized_tl @@ -4527,7 +4526,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} degree .choices:nn = { academic, professional } - { \int_set_eq:NN \l_@@_info_degree_type_int \l_keys_choice_int }, + { \tl_set_eq:NN \l_@@_info_degree_type_tl \l_keys_choice_tl }, + degree .value_required:n = true, % \end{macrocode} % \end{macro} % @@ -4600,7 +4600,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macro} % % \begin{macro}{info/keywords,info/keywords*} -% 论文关键字。 +% 论文关键词。 % \begin{macrocode} keywords .clist_set:N = \l_@@_info_keywords_clist, keywords* .clist_set:N = \l_@@_info_keywords_en_clist, @@ -4644,13 +4644,6 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \changes{v0.3}{2017/07/04}{新增 \opt{info/secret-level} 与 % \opt{info/secret-year} 选项。} % -% \begin{variable}{\l_@@_secret_bool} -% 是否显示密级。 -% \begin{macrocode} -\bool_new:N \l_@@_secret_bool -% \end{macrocode} -% \end{variable} -% % \begin{variable}{\l_@@_info_secret_level_tl} % 保存当前的密级。 % \begin{macrocode} @@ -4670,18 +4663,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} secret-level .choices:nn = { none, i, ii, iii } - { - \int_compare:nTF { \l_keys_choice_int >= 2 } - { - \bool_set_true:N \l_@@_secret_bool - \tl_set:Nn \l_@@_info_secret_level_tl - { - \clist_item:Nn \c_@@_secret_clist - { \l_keys_choice_int - 1 } - } - } - { \bool_set_false:N \l_@@_secret_bool } - }, + { \tl_set_eq:NN \l_@@_info_secret_level_tl \l_keys_choice_tl }, secret-level .value_required:n = true, % \end{macrocode} % \end{macro} @@ -4783,40 +4765,59 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \changes{v0.5}{2017/09/19}{使用 \pkg{expl3} 以及内部函数改写 % 封面,减少对 \LaTeXe{} 的依赖。} % -% \begin{macro}{\@@_cover_id:,\@@_cover_id_aux:n} -% 右上角的学校代码和学号。 +% \begin{macro}{\@@_cover_id:,\@@_cover_id_tabular:n,\@@_cover_id_aux:n} +% 右上角的密级、学校代码和学号。 +% \changes{v0.9a}{2023/05/21}{封面密级、学校代码和学号改用表格实现。} % \begin{macrocode} \cs_new_protected:Npn \@@_cover_id: { - \@@_fixed_width_box:nn { 120 pt } - { - \bool_if:NT \l_@@_secret_bool - { - \group_begin: - \sffamily - \@@_cover_id_aux:n { secret_level } - \c_@@_name_secret_star_tl - \l_@@_info_secret_year_tl - \group_end: - \par - } - \@@_cover_id_aux:n { school_id } \par - \@@_cover_id_aux:n { student_id } - } -% \end{macrocode} -% 插入一个宽度为负的水平盒子以减少右侧边距。 -% \begin{macrocode} - \hbox_to_wd:nn { -24 pt } { } + \tl_if_eq:NnTF \l_@@_info_secret_level_tl { none } + { \@@_cover_id_tabular:n { } } + { \@@_cover_id_tabular:n { \@@_cover_secret: \\ } } + } +\cs_new_protected:Npn \@@_cover_id_tabular:n #1 + { + \exp_args:Nnx \begin{tabular} { \c_@@_cover_id_align_tl } + #1 + \@@_cover_id_aux:n { school_id } \\ + \@@_cover_id_aux:n { student_id } + \end{tabular} } \cs_new:Npn \@@_cover_id_aux:n #1 { - \tl_use:c { c_@@_name_ #1 _tl } - \c_@@_fwid_colon_tl + \tl_use:c { c_@@_name_ #1 _tl } & \tl_use:c { l_@@_info_ #1 _tl } } % \end{macrocode} % \end{macro} % +% \begin{variable}{\c_@@_cover_id_align_tl} +% 密级、学号栏对齐格式:左右两栏均左对齐,中间以冒号分隔,并且不加间距。 +% \begin{macrocode} +\tl_const:Nn \c_@@_cover_id_align_tl + { l @ { \c_@@_fwid_colon_tl } l @ { } } +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\@@_cover_secret:} +% 密级,使用无衬线字体。 +% \begin{macrocode} +\cs_new:Npn \@@_cover_secret: + { + \multicolumn { 2 } { l } + { + \sffamily + \c_@@_name_secret_level_tl + \c_@@_fwid_colon_tl + \prop_item:No \c_@@_secret_prop + { \l_@@_info_secret_level_tl } + \c_@@_name_secret_star_tl + \l_@@_info_secret_year_tl + } + } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\@@_cover_logo:} % 插入校名图片。根据参数 \opt{width} 和 \opt{height} 是否为空依次 % 判断。\cs{l_@@_cover_logo_size_clist} 中超过两个的参数将被忽略。 @@ -4844,11 +4845,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \cs_new_protected:Npn \@@_cover_type: { - \tl_set:Nx \l_@@_tmpa_tl - { - \clist_item:Nn \c_@@_thesis_type_clist - { \g_@@_thesis_type_int } - } + \prop_get:NVN \c_@@_thesis_type_prop + \g_@@_thesis_type_tl \l_@@_tmpa_tl \@@_spread_box:no { 0.45 \textwidth } { \l_@@_tmpa_tl } } % \end{macrocode} @@ -4860,39 +4858,17 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \cs_new_protected:Npn \@@_cover_degree: { - \int_compare:nT { \g_@@_thesis_type_int != 3 } + \tl_if_eq:NnF \g_@@_thesis_type_tl { bachelor } { \c_@@_fwid_left_paren_tl - \clist_item:Nn \c_@@_degree_type_clist - { \l_@@_info_degree_type_int } + \prop_item:No \c_@@_degree_type_prop + { \l_@@_info_degree_type_tl } \c_@@_fwid_right_paren_tl } } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_cover_info_left:n} -% 信息栏左侧字段。 -% \begin{macrocode} -\cs_new_protected:Npn \@@_cover_info_left:n #1 - { - \int_case:nn { \l_@@_info_degree_type_int } - { - { 1 } { \_@@_spread_box:nn { 6 em } {#1} } - { 2 } { \_@@_spread_box:nn { 9 em } {#1} } - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{variable}{\c_@@_cover_info_align_tl} -% 信息栏对齐格式:左右两栏均居中,中间以冒号分隔。 -% \begin{macrocode} -\tl_const:Nn \c_@@_cover_info_align_tl - { c @ { \c_@@_fwid_colon_tl } c } -% \end{macrocode} -% \end{variable} -% % \begin{macro}{\@@_cover_info:} % \changes{v0.8}{2021/09/21}{调整专业学位的封面信息栏。} % \changes{v0.9}{2023/02/05}{封面信息栏改用表格实现。} @@ -4905,7 +4881,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % 专业学位与学术学位对应的左侧字段有所不同,这里统一存入 \cs{c_@@_name_major_tl}。 % \begin{macrocode} - \int_compare:nNnT { \l_@@_info_degree_type_int } = { 2 } + \tl_if_eq:NnT \l_@@_info_degree_type_tl { professional } { \tl_set_eq:NN \c_@@_name_major_tl \c_@@_name_major_professional_tl @@ -4926,8 +4902,9 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. } % \end{macrocode} % 通过 \env{tabular} 环境输出。 +% \changes{v0.9a}{2023/05/07}{展开列格式参数以修复与 \pkg{array} 宏包的兼容性问题。} % \begin{macrocode} - \begin{tabular} { \c_@@_cover_info_align_tl } + \exp_args:Nnx \begin{tabular} { \c_@@_cover_info_align_tl } \clist_use:Nn \l_@@_tmpa_clist { \\ [ 1 ex ] } \end{tabular} \group_end: @@ -4935,6 +4912,26 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{macro} % +% \begin{variable}{\c_@@_cover_info_align_tl} +% 信息栏对齐格式:左右两栏均居中,中间以冒号分隔。 +% \begin{macrocode} +\tl_const:Nn \c_@@_cover_info_align_tl + { c @ { \c_@@_fwid_colon_tl } c } +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\@@_cover_info_left:n} +% 信息栏左侧字段。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_cover_info_left:n #1 + { + \tl_if_eq:NnTF \l_@@_info_degree_type_tl { professional } + { \@@_spread_box:nn { 9 em } {#1} } + { \@@_spread_box:nn { 6 em } {#1} } + } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\@@_cover_signature:N} % 签名行。 % \begin{macrocode} @@ -5423,11 +5420,11 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{macro} % -% \changes{v0.7d}{2019/03/28}{优化关键字列表的显示。} +% \changes{v0.7d}{2019/03/28}{优化关键词列表的显示。} % \changes{v0.8}{2021/12/22}{没有指定 CLC/JEL 分类号时不再显示。} % % \begin{macro}{\@@_abstract_end:} -% 摘要正文完成后,输出关键字列表和 CLC/JEL 分类号。 +% 摘要正文完成后,输出关键词列表和 CLC/JEL 分类号。 % \begin{macrocode} %<*class> \cs_new_protected:Npn \@@_abstract_end: @@ -5473,7 +5470,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macro} % % \begin{macro}{\@@_keywords:nNn,\@@_keywords_prevdepth:,\@@_clc_jel:nn} -% 关键字列表前要空一行,使用悬挂缩进;分类号不缩进。\tn{parbox} 之后的间距 +% 关键词列表前要空一行,使用悬挂缩进;分类号不缩进。\tn{parbox} 之后的间距 % 需要调整,见 \url{https://tex.stackexchange.com/a/34982}。 % \begin{macrocode} \cs_new_protected:Npn \@@_keywords:nNn #1#2#3 @@ -5569,17 +5566,17 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % % \changes{v0.6}{2017/10/27}{支持 \BibTeX{},以实现参考文献的著录与引用。} % \changes{v0.7}{2018/01/25}{支持 \biber{} 与 \pkg{biblatex}。} +% \changes{v0.9a}{2023/05/11}{允许同时不使用 \BibTeX{} 与 \pkg{biblatex}。} % -% \begin{variable}{\l_@@_bibtex_bool} -% 是否使用 \BibTeX{} 作为参考文献处理程序。若为否,则使用 +% \begin{variable}{\l_@@_bib_backend_tl} +% 保存参考文献处理程序(后端),默认为空,即同时不使用 \BibTeX{} 与 \pkg{biblatex}。 % \pkg{biblatex}/\biber{}。 % \begin{macrocode} -\bool_new:N \l_@@_bibtex_bool +\tl_new:N \l_@@_bib_backend_tl % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_bib_style_tl,\l_@@_bib_gb_style_tl, -% \l_@@_cite_style_tl} +% \begin{variable}{\l_@@_bib_style_tl,\l_@@_bib_gb_style_tl,\l_@@_cite_style_tl} % 保存参考文献及引用样式。 % \begin{macrocode} \tl_new:N \l_@@_bib_style_tl @@ -5612,9 +5609,18 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. bib-backend .choice:, bib-backend .value_required:n = true, bib-backend / bibtex .code:n = - { \bool_set_true:N \l_@@_bibtex_bool }, + { \tl_set:Nn \l_@@_bib_backend_tl { bibtex } }, +% \end{macrocode} +% \changes{v0.8}{2022/01/08}{补充定义 \tn{addbibresource} 命令以兼容 \pkg{biblatex} 的用法。} +% 由于 \pkg{biblatex} 在导言区后才载入,需要单独定义添加参考文献数据源的命令以实现兼容。 +% 该命令需要在载入宏包前取消定义。 +% \begin{macrocode} bib-backend / biblatex .code:n = - { \bool_set_false:N \l_@@_bibtex_bool }, + { + \tl_set:Nn \l_@@_bib_backend_tl { biblatex } + \NewDocumentCommand \addbibresource { m } + { \clist_gput_right:Nn \l_@@_bib_resource_clist {#1} } + }, % \end{macrocode} % \end{macro} % \begin{macro}{style/bib-style} @@ -5661,7 +5667,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \ctex_at_end_preamble:n { - \bool_if:NT \l_@@_bibtex_bool + \tl_if_eq:NnT \l_@@_bib_backend_tl { bibtex } { \tl_if_empty:NTF \l_@@_bib_style_tl { @@ -5684,7 +5690,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \@@_gadd_ltxhook:nn { env/document/begin } { - \bool_if:NF \l_@@_bibtex_bool + \tl_if_eq:NnT \l_@@_bib_backend_tl { biblatex } { \@@_biblatex_pre_setup: \RequirePackage { biblatex } @@ -5746,20 +5752,6 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{macro} % -% \changes{v0.8}{2022/01/08}{补充定义 \tn{addbibresource} 命令以兼容 \pkg{biblatex} 的用法。} -% -% \begin{macro}{\addbibresource} -% 由于 \pkg{biblatex} 在导言区后才载入,需要单独定义添加参考文献数据源的命令以实现兼容。 -% 该命令需要在载入宏包前取消定义。 -% \begin{macrocode} -\bool_if:NF \l_@@_bibtex_bool - { - \NewDocumentCommand \addbibresource { m } - { \clist_gput_right:Nn \l_@@_bib_resource_clist {#1} } - } -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\@@_biblatex_pre_setup:,\@@_biblatex_post_setup:} % \pkg{biblatex} 相关设置。 % \begin{macrocode} @@ -6011,7 +6003,8 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % 由于 \pkg{hyperref} 在 \pkg{biblatex} 之后调用,所以需要手动开启相关功能。 % \begin{macrocode} - \bool_if:NF \l_@@_bibtex_bool { \BiblatexManualHyperrefOn } + \tl_if_eq:NnT \l_@@_bib_backend_tl { biblatex } + { \BiblatexManualHyperrefOn } } % \end{macrocode} % @@ -6225,24 +6218,37 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. % % \subsubsection{杂项} % -% \begin{variable}{\c_@@_thesis_type_clist, -% \c_@@_degree_type_clist} +% \begin{variable}{\c_@@_thesis_type_prop,\c_@@_degree_type_prop} % 论文类型与学位类型。 % \begin{macrocode} -\clist_const:Nn \c_@@_thesis_type_clist - { 博士学位论文, 硕士学位论文, 本科毕业论文 } -\clist_const:Nn \c_@@_degree_type_clist - { 学术学位, 专业学位 } +\prop_const_from_keyval:Nn \c_@@_thesis_type_prop + { + doctor = 博士学位论文, + master = 硕士学位论文, + bachelor = 本科毕业论文, + } +\prop_const_from_keyval:Nn \c_@@_degree_type_prop + { + academic = 学术学位, + professional = 专业学位, + } % \end{macrocode} % \end{variable} % -% \begin{variable}{\c_@@_secret_clist} +% \begin{variable}{\c_@@_secret_prop} % 三种密级。 % \begin{macrocode} -\clist_const:Nn \c_@@_secret_clist { 秘密, 机密, 绝密 } +\prop_const_from_keyval:Nn \c_@@_secret_prop + { + i = 秘密, + ii = 机密, + iii = 绝密, + } % \end{macrocode} % \end{variable} % +% \changes{v0.9a}{2023/03/23}{“关键字”更改为“关键词”。} +% % 默认名称。注意空格是忽略掉的。 % \begin{macrocode} \clist_map_inline:nn @@ -6275,7 +6281,7 @@ Copyright (C) 2017–2023 by Xiangdong Zeng <xdzeng96@gmail.com>. \clist_map_inline:nn { { abstract } { 摘 \quad 要 } { Abstract }, - { keywords } { 关键字 } { Keywords: }, + { keywords } { 关键词 } { Keywords: }, { clc } { 中图分类号 } { CLC~ code: }, { jel } { JEL 分类号 } { JEL~ code: }, { notation } { 符号表 } { List~ of~ Symbols }, diff --git a/macros/latex/contrib/fduthesis/fduthesis.pdf b/macros/latex/contrib/fduthesis/fduthesis.pdf Binary files differindex f3489a1812..8dd2ab240c 100644 --- a/macros/latex/contrib/fduthesis/fduthesis.pdf +++ b/macros/latex/contrib/fduthesis/fduthesis.pdf diff --git a/macros/latex/contrib/footmisc/changes.txt b/macros/latex/contrib/footmisc/changes.txt index dc51273e12..6e75e6a932 100644 --- a/macros/latex/contrib/footmisc/changes.txt +++ b/macros/latex/contrib/footmisc/changes.txt @@ -1,8 +1,13 @@ +2023-05-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * footmisc.dtx (subsection{The output routine configuration components}): + Fix an incompatibility with marginfix package (gh/10) + 2022-03-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org> * footmisc.dtx (subsection{The other footnote commands}): Also support optional arg of \cs{MakePerPage} (gh/03) - + 2022-03-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org> * footmisc.dtx (subsection{The other footnote commands}): diff --git a/macros/latex/contrib/footmisc/footmisc-code.pdf b/macros/latex/contrib/footmisc/footmisc-code.pdf Binary files differindex affa9e8a4d..e92f075688 100644 --- a/macros/latex/contrib/footmisc/footmisc-code.pdf +++ b/macros/latex/contrib/footmisc/footmisc-code.pdf diff --git a/macros/latex/contrib/footmisc/footmisc-doc.pdf b/macros/latex/contrib/footmisc/footmisc-doc.pdf Binary files differindex d738cb5e0d..ac9b567fb4 100644 --- a/macros/latex/contrib/footmisc/footmisc-doc.pdf +++ b/macros/latex/contrib/footmisc/footmisc-doc.pdf diff --git a/macros/latex/contrib/footmisc/footmisc.dtx b/macros/latex/contrib/footmisc/footmisc.dtx index bafdb76df3..4df11e32c4 100644 --- a/macros/latex/contrib/footmisc/footmisc.dtx +++ b/macros/latex/contrib/footmisc/footmisc.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % %% File: footmisc.dtx (C) Copyright 1995-2011 Robin Fairbairns -%% (C) Copyright 2018-2022 Frank Mittelbach +%% (C) Copyright 2018-2023 Frank Mittelbach % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -38,7 +38,7 @@ %<+package>\DeclareCurrentRelease{}{2022-02-14} %<package>\ProvidesPackage{footmisc}% %<*!debugins> - [2022/03/08 v6.0d + [2023/05/26 v6.0e %</!debugins> %<package> a miscellany of footnote facilities% %<*dtx> @@ -145,7 +145,7 @@ % In 2022 a few new options (\texttt{abovefloats}, % \texttt{belowfloats}, and \texttt{bottomfloats} % got introduced and the package now works -% with \textsf{hyperref} regardless of loading order. There arem +% with \textsf{hyperref} regardless of loading order. There are % however, still a few restrictions when using both packages together, % in particular the \texttt{multiple} option does not fully work. % @@ -294,7 +294,7 @@ % \end{center} % Defined this way, the symbol set produces a ``counter too large'' % error; a robust version of the set (cf.~the \texttt{symbol*} option -% (see \ref{doc-symbol*}) using the \cs{DefineFNsymbols} command +% (see \ref{doc-symbol*})) is established by using the \cs{DefineFNsymbols} command % without the optional |*|. % You may select a set of symbols by use of the \cs{setfnsymbol} % command; so to restore use of the default set, you would type: @@ -303,7 +303,7 @@ % \end{center} % % This package defines a small selection of alternative sets of -% symbols, using \cs{DefineFNsymbol}: +% symbols, using \cs{DefineFNsymbols}: % \begin{center} % \begin{tabular}{ll} % \texttt{bringhurst} & $*\,\dagger\,\ddagger\,\S\,\|\,\P$ \\ @@ -1240,7 +1240,7 @@ % \cs{@makecol@appendblocks}. % % -% \begin{macro}{@outputbox@append} +% \begin{macro}{\@outputbox@append} % % This general purpose command alters the \cs{@outputbox} box by % appending material to it. As this is a box typesetting operation @@ -1308,8 +1308,11 @@ % Attaching top and bottom floats can usually be done in one go, % but for special layouts we might want more control so we provide % also separate commands. +% There are packages out there that patch \cs{@combinefloats} so we +% are careful to call it rather than give it a new name. +% \changes{v6.0e}{2023/05/26}{Fix an incompatibility with marginfix package (gh/10)} % \begin{macrocode} -\let \@outputbox@attachfloats \@combinefloats +\def \@outputbox@attachfloats {\@combinefloats} % \end{macrocode} % % \begin{macrocode} diff --git a/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx b/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx index bbdbde0339..8f7768f156 100644 --- a/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx +++ b/macros/latex/contrib/naive-ebnf/naive-ebnf.dtx @@ -50,7 +50,7 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{naive-ebnf} %<*package> -[2023-02-21 0.0.5 EBNF in Plain Text] +[2023-05-27 0.0.6 EBNF in Plain Text] %</package> %<*driver> \documentclass{ltxdoc} @@ -104,6 +104,7 @@ % \item |:=| separates the left-hand side from the right-hand side of the production rule; % \item |<...>| denotes a non-terminal (variable); % \item |"..."| denotes a terminal symbol; +% \item |'...'| denotes a special non-printable terminal symbol, like |'EOL'|; % \item \texttt{(...\char`\|...)} denotes a series of options to choose from; % \item |[...]| denotes an optional substitution; % \item |{...}| denotes a zero or more times repetition; @@ -131,7 +132,7 @@ % the left hand side than usual: \par % \begin{ebnf}[1.5in] % <VeryLongVariable> := <X> | <Y> \\ -% <X> := "X" \\ +% <X> := "X" 'EOL' \\ % <Y> := "Y" % \end{ebnf} % \end{document} @@ -139,7 +140,8 @@ % \DescribeMacro{\terminal} % \DescribeMacro{\nonterminal} -% Inside the text, terminals and non-terminals may be formatted using two supplementary commands: +% \DescribeMacro{\sterminal} +% Inside the text, terminals, non-terminals, and special terminals may be formatted using three supplementary commands: % \docshotOptions{firstline=6,lastline=10} % \begin{docshot} % \documentclass{article} @@ -203,7 +205,7 @@ % \changes{0.0.1}{2023/01/28}{First draft.} % \changes{0.0.2}{2023/01/29}{Proper parsing of grouping.} % \changes{0.0.2}{2023/01/29}{Substitutions suggested for special symbols.} -% \changes{0.0.5}{2023/02/04}{New package option \texttt{trail} added, to enable saving generated \TeX{} content to a file, for debugging purposes.} +% \changes{0.0.5}{2023/02/04}{New package option \texttt{trail} added, to enable saving of the generated \TeX{} content to a file, for debugging purposes.} % First, we process package options: % \begin{macrocode} @@ -263,6 +265,16 @@ % \end{macrocode} % \end{macro} +% \begin{macro}{\sterminal} +% \changes{0.0.6}{2023/05/27}{New command \texttt{\char`\\sterminal} added, to enable rendering of special non-printable terminal symbols outside of the \texttt{ebnf} environment.} +% Then, we a command to render a single non-terminal: +% \begin{macrocode} +\makeatletter +\newcommand\sterminal[1]{\relax\ifmmode\else\ttfamily\fi#1}% +\makeatother +% \end{macrocode} +% \end{macro} + % Then, we define supplementary commands: % \begin{macrocode} \makeatletter @@ -278,6 +290,11 @@ \tl_set_rescan:Nno \l_ebnf_tl { } { #1 } \terminal{\l_ebnf_tl} } +\newcommand\ebnf@sterminal[1]{ + \tl_set:Nn \l_ebnf_tl { } + \tl_set_rescan:Nno \l_ebnf_tl { } { #1 } + \sterminal{\l_ebnf_tl} +} \newcommand\ebnf@nonterminal[1]{ \tl_set:Nn \l_ebnf_tl { } \tl_set_rescan:Nno \l_ebnf_tl { } { #1 } @@ -313,6 +330,8 @@ {\c{ebnf@nonterminal}{\1}} \l__ebnf_tmp_tl% \regex_replace_all:nnN { "(.+?)" }% {\c{ebnf@terminal}{\1}} \l__ebnf_tmp_tl% + \regex_replace_all:nnN { '(.+?)' }% + {\c{ebnf@sterminal}{\1}} \l__ebnf_tmp_tl% \regex_replace_all:nnN { \|(\|) }% {\c{makebox}[#1][r]{ \1 }} \l__ebnf_tmp_tl% \regex_replace_all:nnN { \| }% diff --git a/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf b/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf Binary files differindex 5d346ded12..96b2f8a7d3 100644 --- a/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf +++ b/macros/latex/contrib/naive-ebnf/naive-ebnf.pdf |