diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/fduthesis-code.pdf | bin | 977630 -> 977509 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.pdf | bin | 151111 -> 151400 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.tex | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/fduthesis.pdf | bin | 445548 -> 444802 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/fduthesis/fduthesis-code.dtx | 354 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/fduthesis/fduthesis-doc.dtx | 5 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/fduthesis/fduthesis.dtx | 354 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fduthesis/fdudoc.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fduthesis/fdulogo.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls | 146 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fduthesis/fduthesis.cls | 149 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fduthesis/fduthesis.def | 26 |
13 files changed, 525 insertions, 528 deletions
diff --git a/Master/texmf-dist/doc/latex/fduthesis/README.md b/Master/texmf-dist/doc/latex/fduthesis/README.md index 4f36d2bb815..e9373209b34 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/README.md +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/fduthesis/fduthesis-code.pdf b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-code.pdf Binary files differindex 91dd190d1c5..777ded2d9c7 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-code.pdf +++ b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-code.pdf diff --git a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.pdf b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.pdf Binary files differindex 8a627853092..2633bce1270 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.pdf +++ b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.pdf diff --git a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.tex b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.tex index cdd63ab927e..b265d5418be 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.tex +++ b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.tex @@ -58,7 +58,7 @@ \textbf{The \textsf{fduthesis} Class \\ \LaTeX{} Thesis Template for Fudan University}}} \author{Xiangdong Zeng} -\date{2023/02/26\quad v0.9% +\date{2023/05/27\quad v0.9a% \thanks{\url{https://github.com/stone-zeng/fduthesis}.}} \begin{document} @@ -607,14 +607,15 @@ will be helpful: \end{threeparttable} \end{table} -\begin{function}[added=2018-01-25]{style/bib-backend} +\begin{function}[added=2018-01-25,updated=2023-05-11]{style/bib-backend} \begin{fdusyntax}[gobble=4,emph={[1]bib-backend}] bib-backend = (*<bibtex|biblatex>*) \end{fdusyntax} Specify the backend or driver of bibliography processing. \BibTeX{} and \pkg{natbib} package will be used if you choose \opt{bibtex}, while \biber{} and \pkg{biblatex} will be used - if you choose \opt{biblatex}. + if you choose \opt{biblatex}. If not specified, the citations + and references will not be processed. \end{function} \begin{function}[added=2017-10-28,updated=2018-01-25]{style/bib-style} @@ -986,7 +987,7 @@ environments (e.g.\ \env{table} and \env{figure}). Knuth\textsuperscript{[\C1]} states & \verbcite[citet]{texbook} & \verbcite[authornumcite]{texbook} \\ - With page and author & + With page \& author & Knuth\textsuperscript{[\C1]42} states & \verbcite[citet][42]{texbook} & \verbcite[authornumcite][42]{texbook} \\ @@ -1015,7 +1016,7 @@ environments (e.g.\ \env{table} and \env{figure}). \verbcite[citep]{texbook} & \verbcite{texbook} \\ Multiple & - (\C{Knuth}, \C{1986}; \C{Mittelbach et al.}, \C{2004}) & + (\C{Knuth}, \C{1986}; \C{Mittelbach et~al.}, \C{2004}) & \verbcite[citep]{texbook,companion} & \verbcite{texbook,companion} \\ With page & @@ -1026,7 +1027,7 @@ environments (e.g.\ \env{table} and \env{figure}). \C{Knuth} (\C{1986}) & \verbcite[citet]{texbook} & Same as left \\ - With page and author & + With page \& author & \C{Knuth} (\C{1986})\textsuperscript{42} & \verbcite[citet][42]{texbook} & Same as left \\ diff --git a/Master/texmf-dist/doc/latex/fduthesis/fduthesis.pdf b/Master/texmf-dist/doc/latex/fduthesis/fduthesis.pdf Binary files differindex f3489a1812e..8dd2ab240c1 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/fduthesis.pdf +++ b/Master/texmf-dist/doc/latex/fduthesis/fduthesis.pdf diff --git a/Master/texmf-dist/source/latex/fduthesis/fduthesis-code.dtx b/Master/texmf-dist/source/latex/fduthesis/fduthesis-code.dtx index 786bbfa049d..28d4904f66f 100644 --- a/Master/texmf-dist/source/latex/fduthesis/fduthesis-code.dtx +++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/fduthesis/fduthesis-doc.dtx b/Master/texmf-dist/source/latex/fduthesis/fduthesis-doc.dtx index c39e192e7a2..e09af2a7ca8 100644 --- a/Master/texmf-dist/source/latex/fduthesis/fduthesis-doc.dtx +++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/fduthesis/fduthesis.dtx b/Master/texmf-dist/source/latex/fduthesis/fduthesis.dtx index 2b001b151ce..ff1a276d6aa 100644 --- a/Master/texmf-dist/source/latex/fduthesis/fduthesis.dtx +++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/tex/latex/fduthesis/fdudoc.cls b/Master/texmf-dist/tex/latex/fduthesis/fdudoc.cls index ebf33741df3..81dfe6ff132 100644 --- a/Master/texmf-dist/tex/latex/fduthesis/fdudoc.cls +++ b/Master/texmf-dist/tex/latex/fduthesis/fdudoc.cls @@ -44,7 +44,7 @@ %% and README.md. %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\GetIdInfo $Id: fduthesis.dtx 0.9 2023-02-26 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +\GetIdInfo $Id: fduthesis.dtx 0.9a 2023-05-27 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ {Documentation class for fduthesis} \ProvidesExplClass{fdudoc} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/fduthesis/fdulogo.sty b/Master/texmf-dist/tex/latex/fduthesis/fdulogo.sty index 2ebf035c7ec..6735298c812 100644 --- a/Master/texmf-dist/tex/latex/fduthesis/fdulogo.sty +++ b/Master/texmf-dist/tex/latex/fduthesis/fdulogo.sty @@ -44,7 +44,7 @@ %% and README.md. %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\GetIdInfo $Id: fduthesis.dtx 0.9 2023-02-26 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +\GetIdInfo $Id: fduthesis.dtx 0.9a 2023-05-27 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ {Fudan University's Visual Identity} \ProvidesExplPackage{fdulogo} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls b/Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls index a3b8092b31e..df233682e82 100644 --- a/Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls +++ b/Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls @@ -43,7 +43,7 @@ %% and README.md. %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\GetIdInfo $Id: fduthesis.dtx 0.9 2023-02-26 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +\GetIdInfo $Id: fduthesis.dtx 0.9a 2023-05-27 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ {Thesis template for Fudan University (English version)} \ProvidesExplClass{\ExplFileName-en} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -80,7 +80,7 @@ \skip_new:N \l__fdu_tmpa_skip \tl_new:N \l__fdu_tmpa_tl \tl_new:N \l__fdu_tmpb_tl -\int_new:N \g__fdu_thesis_type_int +\tl_new:N \g__fdu_thesis_type_tl \clist_new:N \g__fdu_to_ctexbook_clist \clist_new:N \g__fdu_to_hyperref_clist \bool_new:N \g__fdu_twoside_bool @@ -90,6 +90,7 @@ \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 } \cs_new:Npn \__fdu_quad: { \skip_horizontal:n { 1 em } } @@ -148,11 +149,10 @@ \cs_new:Npn \__fdu_info:nx { \msg_info:nnx { fduthesis } } \keys_define:nn { fdu / option } { - type .choice:, - type .value_required:n = true, type .choices:nn = { doctor, master, bachelor } - { \int_set_eq:NN \g__fdu_thesis_type_int \l_keys_choice_int }, + { \tl_set_eq:NN \g__fdu_thesis_type_tl \l_keys_choice_tl }, + type .value_required:n = true, type .initial:n = bachelor, oneside .value_forbidden:n = true, twoside .value_forbidden:n = true, @@ -255,7 +255,8 @@ { font .choices:nn = { garamond, libertinus, lm, palatino, times, times*, none } - { \tl_set_eq:NN \g__fdu_fontset_tl \l_keys_choice_tl } + { \tl_set_eq:NN \g__fdu_fontset_tl \l_keys_choice_tl }, + font .value_required:n = true, } \cs_new_protected:Npn \__fdu_setmainfont:nn #1#2 { \__fontspec_main_setmainfont:nn {#2} {#1} } @@ -820,16 +821,8 @@ \cs_generate_variant:Nn \fdu_thm_set_qed:n { V } \cs_generate_variant:Nn \fdu_thm_set_header_font:n { V } \cs_generate_variant:Nn \fdu_thm_set_body_font:n { V } -\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 } \cs_set:Npn \thefigure { \thechapter - \__fdu_arabic:n { figure } } \cs_set:Npn \thetable @@ -846,7 +839,7 @@ { title, author, supervisor, department, major } { \tl_new:c { l__fdu_info_ #1 _en_tl } } \clist_new:N \l__fdu_info_keywords_en_clist -\int_new:N \l__fdu_info_degree_type_int +\tl_new:N \l__fdu_info_degree_type_tl \tl_new:N \l__fdu_info_title_sanitized_tl \tl_new:N \l__fdu_info_title_en_sanitized_tl \cs_new_protected:Npn \__fdu_set_title:nn #1#2 @@ -865,7 +858,8 @@ { degree .choices:nn = { academic, professional } - { \int_set_eq:NN \l__fdu_info_degree_type_int \l_keys_choice_int }, + { \tl_set_eq:NN \l__fdu_info_degree_type_tl \l_keys_choice_tl }, + degree .value_required:n = true, title .code:n = { \__fdu_set_title:nn { title } {#1} }, title* .code:n = { \__fdu_set_title:nn { title_en } {#1} }, date .tl_set:N = \l__fdu_info_date_tl, @@ -889,24 +883,12 @@ logo .tl_set:N = \l__fdu_cover_logo_tl, logo-size .clist_set:N = \l__fdu_cover_logo_size_clist } -\bool_new:N \l__fdu_secret_bool \tl_new:N \l__fdu_info_secret_level_tl \keys_define:nn { fdu / info } { secret-level .choices:nn = { none, i, ii, iii } - { - \int_compare:nTF { \l_keys_choice_int >= 2 } - { - \bool_set_true:N \l__fdu_secret_bool - \tl_set:Nn \l__fdu_info_secret_level_tl - { - \clist_item:Nn \c__fdu_secret_clist - { \l_keys_choice_int - 1 } - } - } - { \bool_set_false:N \l__fdu_secret_bool } - }, + { \tl_set_eq:NN \l__fdu_info_secret_level_tl \l_keys_choice_tl }, secret-level .value_required:n = true, secret-year .tl_set:N = \l__fdu_info_secret_year_tl } @@ -940,29 +922,38 @@ { \linespread {#1} \selectfont } \cs_new_protected:Npn \__fdu_cover_id: { - \__fdu_fixed_width_box:nn { 120 pt } - { - \bool_if:NT \l__fdu_secret_bool - { - \group_begin: - \sffamily - \__fdu_cover_id_aux:n { secret_level } - \c__fdu_name_secret_star_tl - \l__fdu_info_secret_year_tl - \group_end: - \par - } - \__fdu_cover_id_aux:n { school_id } \par - \__fdu_cover_id_aux:n { student_id } - } - \hbox_to_wd:nn { -24 pt } { } + \tl_if_eq:NnTF \l__fdu_info_secret_level_tl { none } + { \__fdu_cover_id_tabular:n { } } + { \__fdu_cover_id_tabular:n { \__fdu_cover_secret: \\ } } + } +\cs_new_protected:Npn \__fdu_cover_id_tabular:n #1 + { + \exp_args:Nnx \begin{tabular} { \c__fdu_cover_id_align_tl } + #1 + \__fdu_cover_id_aux:n { school_id } \\ + \__fdu_cover_id_aux:n { student_id } + \end{tabular} } \cs_new:Npn \__fdu_cover_id_aux:n #1 { - \tl_use:c { c__fdu_name_ #1 _tl } - \c__fdu_fwid_colon_tl + \tl_use:c { c__fdu_name_ #1 _tl } & \tl_use:c { l__fdu_info_ #1 _tl } } +\tl_const:Nn \c__fdu_cover_id_align_tl + { l @ { \c__fdu_fwid_colon_tl } l @ { } } +\cs_new:Npn \__fdu_cover_secret: + { + \multicolumn { 2 } { l } + { + \sffamily + \c__fdu_name_secret_level_tl + \c__fdu_fwid_colon_tl + \prop_item:No \c__fdu_secret_prop + { \l__fdu_info_secret_level_tl } + \c__fdu_name_secret_star_tl + \l__fdu_info_secret_year_tl + } + } \cs_new_protected:Npn \__fdu_cover_logo: { \clist_pop:NN \l__fdu_cover_logo_size_clist \l__fdu_tmpa_tl @@ -980,38 +971,25 @@ } \cs_new_protected:Npn \__fdu_cover_type: { - \tl_set:Nx \l__fdu_tmpa_tl - { - \clist_item:Nn \c__fdu_thesis_type_clist - { \g__fdu_thesis_type_int } - } + \prop_get:NVN \c__fdu_thesis_type_prop + \g__fdu_thesis_type_tl \l__fdu_tmpa_tl \__fdu_spread_box:no { 0.45 \textwidth } { \l__fdu_tmpa_tl } } \cs_new_protected:Npn \__fdu_cover_degree: { - \int_compare:nT { \g__fdu_thesis_type_int != 3 } + \tl_if_eq:NnF \g__fdu_thesis_type_tl { bachelor } { \c__fdu_fwid_left_paren_tl - \clist_item:Nn \c__fdu_degree_type_clist - { \l__fdu_info_degree_type_int } + \prop_item:No \c__fdu_degree_type_prop + { \l__fdu_info_degree_type_tl } \c__fdu_fwid_right_paren_tl } } -\cs_new_protected:Npn \__fdu_cover_info_left:n #1 - { - \int_case:nn { \l__fdu_info_degree_type_int } - { - { 1 } { \__fdu_spread_box:nn { 6 em } {#1} } - { 2 } { \__fdu_spread_box:nn { 9 em } {#1} } - } - } -\tl_const:Nn \c__fdu_cover_info_align_tl - { c @ { \c__fdu_fwid_colon_tl } c } \cs_new_protected:Npn \__fdu_cover_info: { \group_begin: \zihao { 4 } - \int_compare:nNnT { \l__fdu_info_degree_type_int } = { 2 } + \tl_if_eq:NnT \l__fdu_info_degree_type_tl { professional } { \tl_set_eq:NN \c__fdu_name_major_tl \c__fdu_name_major_professional_tl @@ -1027,11 +1005,19 @@ \tl_use:c { l__fdu_info_ ##1 _tl } } } - \begin{tabular} { \c__fdu_cover_info_align_tl } + \exp_args:Nnx \begin{tabular} { \c__fdu_cover_info_align_tl } \clist_use:Nn \l__fdu_tmpa_clist { \\ [ 1 ex ] } \end{tabular} \group_end: } +\tl_const:Nn \c__fdu_cover_info_align_tl + { c @ { \c__fdu_fwid_colon_tl } c } +\cs_new_protected:Npn \__fdu_cover_info_left:n #1 + { + \tl_if_eq:NnTF \l__fdu_info_degree_type_tl { professional } + { \__fdu_spread_box:nn { 9 em } {#1} } + { \__fdu_spread_box:nn { 6 em } {#1} } + } \cs_new_protected:Npn \__fdu_cover_signature:N #1 { \clist_map_inline:Nn #1 @@ -1402,7 +1388,7 @@ { \__fdu_chapter:V \c__fdu_name_acknowledgements_en_tl } -\bool_new:N \l__fdu_bibtex_bool +\tl_new:N \l__fdu_bib_backend_tl \tl_new:N \l__fdu_bib_style_tl \tl_new:N \l__fdu_bib_gb_style_tl \tl_new:N \l__fdu_cite_style_tl @@ -1412,9 +1398,13 @@ bib-backend .choice:, bib-backend .value_required:n = true, bib-backend / bibtex .code:n = - { \bool_set_true:N \l__fdu_bibtex_bool }, + { \tl_set:Nn \l__fdu_bib_backend_tl { bibtex } }, bib-backend / biblatex .code:n = - { \bool_set_false:N \l__fdu_bibtex_bool }, + { + \tl_set:Nn \l__fdu_bib_backend_tl { biblatex } + \NewDocumentCommand \addbibresource { m } + { \clist_gput_right:Nn \l__fdu_bib_resource_clist {#1} } + }, bib-style .choice:, bib-style .value_required:n = true, bib-style / numerical .code:n = @@ -1437,7 +1427,7 @@ } \ctex_at_end_preamble:n { - \bool_if:NT \l__fdu_bibtex_bool + \tl_if_eq:NnT \l__fdu_bib_backend_tl { bibtex } { \tl_if_empty:NTF \l__fdu_bib_style_tl { @@ -1455,7 +1445,7 @@ } \__fdu_gadd_ltxhook:nn { env/document/begin } { - \bool_if:NF \l__fdu_bibtex_bool + \tl_if_eq:NnT \l__fdu_bib_backend_tl { biblatex } { \__fdu_biblatex_pre_setup: \RequirePackage { biblatex } @@ -1488,11 +1478,6 @@ } \__fdu_msg_new:nn { invalid-option-in-bibtex } { Option(s)~ "#1"~ are~ invalid~ in~ BibTeX. } -\bool_if:NF \l__fdu_bibtex_bool - { - \NewDocumentCommand \addbibresource { m } - { \clist_gput_right:Nn \l__fdu_bib_resource_clist {#1} } - } \cs_new_protected:Npn \__fdu_biblatex_pre_setup: { \cs_undefine:N \addbibresource @@ -1619,7 +1604,8 @@ } \exp_args:NV \hypersetup \g__fdu_to_hyperref_clist \fdu_allow_url_break: - \bool_if:NF \l__fdu_bibtex_bool { \BiblatexManualHyperrefOn } + \tl_if_eq:NnT \l__fdu_bib_backend_tl { biblatex } + { \BiblatexManualHyperrefOn } } \ctex_at_end_package:nn { hyperref } { diff --git a/Master/texmf-dist/tex/latex/fduthesis/fduthesis.cls b/Master/texmf-dist/tex/latex/fduthesis/fduthesis.cls index 9e293356e8a..d0fa94ab7f3 100644 --- a/Master/texmf-dist/tex/latex/fduthesis/fduthesis.cls +++ b/Master/texmf-dist/tex/latex/fduthesis/fduthesis.cls @@ -43,7 +43,7 @@ %% and README.md. %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\GetIdInfo $Id: fduthesis.dtx 0.9 2023-02-26 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +\GetIdInfo $Id: fduthesis.dtx 0.9a 2023-05-27 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ {Thesis template for Fudan University} \ProvidesExplClass{\ExplFileName} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -80,7 +80,7 @@ \skip_new:N \l__fdu_tmpa_skip \tl_new:N \l__fdu_tmpa_tl \tl_new:N \l__fdu_tmpb_tl -\int_new:N \g__fdu_thesis_type_int +\tl_new:N \g__fdu_thesis_type_tl \clist_new:N \g__fdu_to_ctexbook_clist \clist_new:N \g__fdu_to_hyperref_clist \bool_new:N \g__fdu_twoside_bool @@ -90,6 +90,7 @@ \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 } \cs_new:Npn \__fdu_quad: { \skip_horizontal:n { 1 em } } @@ -148,11 +149,10 @@ \cs_new:Npn \__fdu_info:nx { \msg_info:nnx { fduthesis } } \keys_define:nn { fdu / option } { - type .choice:, - type .value_required:n = true, type .choices:nn = { doctor, master, bachelor } - { \int_set_eq:NN \g__fdu_thesis_type_int \l_keys_choice_int }, + { \tl_set_eq:NN \g__fdu_thesis_type_tl \l_keys_choice_tl }, + type .value_required:n = true, type .initial:n = bachelor, oneside .value_forbidden:n = true, twoside .value_forbidden:n = true, @@ -256,13 +256,15 @@ { font .choices:nn = { garamond, libertinus, lm, palatino, times, times*, none } - { \tl_set_eq:NN \g__fdu_fontset_tl \l_keys_choice_tl } + { \tl_set_eq:NN \g__fdu_fontset_tl \l_keys_choice_tl }, + font .value_required:n = true, } \keys_define:nn { fdu / style } { cjk-font .choices:nn = { adobe, fandol, founder, mac, sinotype, sourcehan, windows, none } - { \tl_set_eq:NN \g__fdu_cjk_fontset_tl \l_keys_choice_tl } + { \tl_set_eq:NN \g__fdu_cjk_fontset_tl \l_keys_choice_tl }, + cjk-font .value_required:n = true, } \cs_new_protected:Npn \__fdu_setmainfont:nn #1#2 { \__fontspec_main_setmainfont:nn {#2} {#1} } @@ -895,16 +897,8 @@ \cs_generate_variant:Nn \fdu_thm_set_qed:n { V } \cs_generate_variant:Nn \fdu_thm_set_header_font:n { V } \cs_generate_variant:Nn \fdu_thm_set_body_font:n { V } -\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 } \cs_set:Npn \thefigure { \thechapter - \__fdu_arabic:n { figure } } \cs_set:Npn \thetable @@ -921,7 +915,7 @@ { title, author, supervisor, department, major } { \tl_new:c { l__fdu_info_ #1 _en_tl } } \clist_new:N \l__fdu_info_keywords_en_clist -\int_new:N \l__fdu_info_degree_type_int +\tl_new:N \l__fdu_info_degree_type_tl \tl_new:N \l__fdu_info_title_sanitized_tl \tl_new:N \l__fdu_info_title_en_sanitized_tl \cs_new_protected:Npn \__fdu_set_title:nn #1#2 @@ -940,7 +934,8 @@ { degree .choices:nn = { academic, professional } - { \int_set_eq:NN \l__fdu_info_degree_type_int \l_keys_choice_int }, + { \tl_set_eq:NN \l__fdu_info_degree_type_tl \l_keys_choice_tl }, + degree .value_required:n = true, title .code:n = { \__fdu_set_title:nn { title } {#1} }, title* .code:n = { \__fdu_set_title:nn { title_en } {#1} }, date .tl_set:N = \l__fdu_info_date_tl, @@ -964,24 +959,12 @@ logo .tl_set:N = \l__fdu_cover_logo_tl, logo-size .clist_set:N = \l__fdu_cover_logo_size_clist } -\bool_new:N \l__fdu_secret_bool \tl_new:N \l__fdu_info_secret_level_tl \keys_define:nn { fdu / info } { secret-level .choices:nn = { none, i, ii, iii } - { - \int_compare:nTF { \l_keys_choice_int >= 2 } - { - \bool_set_true:N \l__fdu_secret_bool - \tl_set:Nn \l__fdu_info_secret_level_tl - { - \clist_item:Nn \c__fdu_secret_clist - { \l_keys_choice_int - 1 } - } - } - { \bool_set_false:N \l__fdu_secret_bool } - }, + { \tl_set_eq:NN \l__fdu_info_secret_level_tl \l_keys_choice_tl }, secret-level .value_required:n = true, secret-year .tl_set:N = \l__fdu_info_secret_year_tl } @@ -1015,29 +998,38 @@ { \linespread {#1} \selectfont } \cs_new_protected:Npn \__fdu_cover_id: { - \__fdu_fixed_width_box:nn { 120 pt } - { - \bool_if:NT \l__fdu_secret_bool - { - \group_begin: - \sffamily - \__fdu_cover_id_aux:n { secret_level } - \c__fdu_name_secret_star_tl - \l__fdu_info_secret_year_tl - \group_end: - \par - } - \__fdu_cover_id_aux:n { school_id } \par - \__fdu_cover_id_aux:n { student_id } - } - \hbox_to_wd:nn { -24 pt } { } + \tl_if_eq:NnTF \l__fdu_info_secret_level_tl { none } + { \__fdu_cover_id_tabular:n { } } + { \__fdu_cover_id_tabular:n { \__fdu_cover_secret: \\ } } + } +\cs_new_protected:Npn \__fdu_cover_id_tabular:n #1 + { + \exp_args:Nnx \begin{tabular} { \c__fdu_cover_id_align_tl } + #1 + \__fdu_cover_id_aux:n { school_id } \\ + \__fdu_cover_id_aux:n { student_id } + \end{tabular} } \cs_new:Npn \__fdu_cover_id_aux:n #1 { - \tl_use:c { c__fdu_name_ #1 _tl } - \c__fdu_fwid_colon_tl + \tl_use:c { c__fdu_name_ #1 _tl } & \tl_use:c { l__fdu_info_ #1 _tl } } +\tl_const:Nn \c__fdu_cover_id_align_tl + { l @ { \c__fdu_fwid_colon_tl } l @ { } } +\cs_new:Npn \__fdu_cover_secret: + { + \multicolumn { 2 } { l } + { + \sffamily + \c__fdu_name_secret_level_tl + \c__fdu_fwid_colon_tl + \prop_item:No \c__fdu_secret_prop + { \l__fdu_info_secret_level_tl } + \c__fdu_name_secret_star_tl + \l__fdu_info_secret_year_tl + } + } \cs_new_protected:Npn \__fdu_cover_logo: { \clist_pop:NN \l__fdu_cover_logo_size_clist \l__fdu_tmpa_tl @@ -1055,38 +1047,25 @@ } \cs_new_protected:Npn \__fdu_cover_type: { - \tl_set:Nx \l__fdu_tmpa_tl - { - \clist_item:Nn \c__fdu_thesis_type_clist - { \g__fdu_thesis_type_int } - } + \prop_get:NVN \c__fdu_thesis_type_prop + \g__fdu_thesis_type_tl \l__fdu_tmpa_tl \__fdu_spread_box:no { 0.45 \textwidth } { \l__fdu_tmpa_tl } } \cs_new_protected:Npn \__fdu_cover_degree: { - \int_compare:nT { \g__fdu_thesis_type_int != 3 } + \tl_if_eq:NnF \g__fdu_thesis_type_tl { bachelor } { \c__fdu_fwid_left_paren_tl - \clist_item:Nn \c__fdu_degree_type_clist - { \l__fdu_info_degree_type_int } + \prop_item:No \c__fdu_degree_type_prop + { \l__fdu_info_degree_type_tl } \c__fdu_fwid_right_paren_tl } } -\cs_new_protected:Npn \__fdu_cover_info_left:n #1 - { - \int_case:nn { \l__fdu_info_degree_type_int } - { - { 1 } { \__fdu_spread_box:nn { 6 em } {#1} } - { 2 } { \__fdu_spread_box:nn { 9 em } {#1} } - } - } -\tl_const:Nn \c__fdu_cover_info_align_tl - { c @ { \c__fdu_fwid_colon_tl } c } \cs_new_protected:Npn \__fdu_cover_info: { \group_begin: \zihao { 4 } - \int_compare:nNnT { \l__fdu_info_degree_type_int } = { 2 } + \tl_if_eq:NnT \l__fdu_info_degree_type_tl { professional } { \tl_set_eq:NN \c__fdu_name_major_tl \c__fdu_name_major_professional_tl @@ -1102,11 +1081,19 @@ \tl_use:c { l__fdu_info_ ##1 _tl } } } - \begin{tabular} { \c__fdu_cover_info_align_tl } + \exp_args:Nnx \begin{tabular} { \c__fdu_cover_info_align_tl } \clist_use:Nn \l__fdu_tmpa_clist { \\ [ 1 ex ] } \end{tabular} \group_end: } +\tl_const:Nn \c__fdu_cover_info_align_tl + { c @ { \c__fdu_fwid_colon_tl } c } +\cs_new_protected:Npn \__fdu_cover_info_left:n #1 + { + \tl_if_eq:NnTF \l__fdu_info_degree_type_tl { professional } + { \__fdu_spread_box:nn { 9 em } {#1} } + { \__fdu_spread_box:nn { 6 em } {#1} } + } \cs_new_protected:Npn \__fdu_cover_signature:N #1 { \clist_map_inline:Nn #1 @@ -1487,7 +1474,7 @@ { \__fdu_chapter:V \c__fdu_name_acknowledgements_tl } -\bool_new:N \l__fdu_bibtex_bool +\tl_new:N \l__fdu_bib_backend_tl \tl_new:N \l__fdu_bib_style_tl \tl_new:N \l__fdu_bib_gb_style_tl \tl_new:N \l__fdu_cite_style_tl @@ -1497,9 +1484,13 @@ bib-backend .choice:, bib-backend .value_required:n = true, bib-backend / bibtex .code:n = - { \bool_set_true:N \l__fdu_bibtex_bool }, + { \tl_set:Nn \l__fdu_bib_backend_tl { bibtex } }, bib-backend / biblatex .code:n = - { \bool_set_false:N \l__fdu_bibtex_bool }, + { + \tl_set:Nn \l__fdu_bib_backend_tl { biblatex } + \NewDocumentCommand \addbibresource { m } + { \clist_gput_right:Nn \l__fdu_bib_resource_clist {#1} } + }, bib-style .choice:, bib-style .value_required:n = true, bib-style / numerical .code:n = @@ -1522,7 +1513,7 @@ } \ctex_at_end_preamble:n { - \bool_if:NT \l__fdu_bibtex_bool + \tl_if_eq:NnT \l__fdu_bib_backend_tl { bibtex } { \tl_if_empty:NTF \l__fdu_bib_style_tl { @@ -1540,7 +1531,7 @@ } \__fdu_gadd_ltxhook:nn { env/document/begin } { - \bool_if:NF \l__fdu_bibtex_bool + \tl_if_eq:NnT \l__fdu_bib_backend_tl { biblatex } { \__fdu_biblatex_pre_setup: \RequirePackage { biblatex } @@ -1573,11 +1564,6 @@ } \__fdu_msg_new:nn { invalid-option-in-bibtex } { Option(s)~ "#1"~ are~ invalid~ in~ BibTeX. } -\bool_if:NF \l__fdu_bibtex_bool - { - \NewDocumentCommand \addbibresource { m } - { \clist_gput_right:Nn \l__fdu_bib_resource_clist {#1} } - } \cs_new_protected:Npn \__fdu_biblatex_pre_setup: { \cs_undefine:N \addbibresource @@ -1702,7 +1688,8 @@ } \exp_args:NV \hypersetup \g__fdu_to_hyperref_clist \fdu_allow_url_break: - \bool_if:NF \l__fdu_bibtex_bool { \BiblatexManualHyperrefOn } + \tl_if_eq:NnT \l__fdu_bib_backend_tl { biblatex } + { \BiblatexManualHyperrefOn } } \ctex_at_end_package:nn { hyperref } { diff --git a/Master/texmf-dist/tex/latex/fduthesis/fduthesis.def b/Master/texmf-dist/tex/latex/fduthesis/fduthesis.def index 3597243f906..4661a51f60b 100644 --- a/Master/texmf-dist/tex/latex/fduthesis/fduthesis.def +++ b/Master/texmf-dist/tex/latex/fduthesis/fduthesis.def @@ -42,7 +42,7 @@ %% fduthesis-code.pdf, %% and README.md. %% -\GetIdInfo $Id: fduthesis.dtx 0.9 2023-02-26 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +\GetIdInfo $Id: fduthesis.dtx 0.9a 2023-05-27 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ {Definition file for fduthesis} \ProvidesExplFile{\ExplFileName.def} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -81,11 +81,23 @@ { 作者签名, 日期 } \clist_const:Nn \c__fdu_auth_decl_sign_clist { 作者签名, 导师签名, 日期 } -\clist_const:Nn \c__fdu_thesis_type_clist - { 博士学位论文, 硕士学位论文, 本科毕业论文 } -\clist_const:Nn \c__fdu_degree_type_clist - { 学术学位, 专业学位 } -\clist_const:Nn \c__fdu_secret_clist { 秘密, 机密, 绝密 } +\prop_const_from_keyval:Nn \c__fdu_thesis_type_prop + { + doctor = 博士学位论文, + master = 硕士学位论文, + bachelor = 本科毕业论文, + } +\prop_const_from_keyval:Nn \c__fdu_degree_type_prop + { + academic = 学术学位, + professional = 专业学位, + } +\prop_const_from_keyval:Nn \c__fdu_secret_prop + { + i = 秘密, + ii = 机密, + iii = 绝密, + } \clist_map_inline:nn { { secret_level } { 密 \qquad 级 }, @@ -116,7 +128,7 @@ \clist_map_inline:nn { { abstract } { 摘 \quad 要 } { Abstract }, - { keywords } { 关键字 } { Keywords: }, + { keywords } { 关键词 } { Keywords: }, { clc } { 中图分类号 } { CLC~ code: }, { jel } { JEL 分类号 } { JEL~ code: }, { notation } { 符号表 } { List~ of~ Symbols }, |