summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-04-21 20:16:17 +0000
committerKarl Berry <karl@freefriends.org>2024-04-21 20:16:17 +0000
commit4bb9faccbbb2265f9fc4e0ea3a7f00c11c8c9ed8 (patch)
tree02943e3d0d7fbe7a2a71e8796607a78df833388a /Master/texmf-dist
parent7f500dc20e0f8799274c9eda0cc7d2cf317f94ec (diff)
njuthesis (21apr24)
git-svn-id: svn://tug.org/texlive/trunk@71034 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdfbin1261076 -> 1272240 bytes
-rw-r--r--Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx297
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls2
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def9
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def7
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def7
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls144
7 files changed, 341 insertions, 125 deletions
diff --git a/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf b/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf
index f7bec4075fc..d6a658a1d7b 100644
--- a/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf
+++ b/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx b/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx
index 5a0f1720405..90b0e949b17 100644
--- a/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx
+++ b/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx
@@ -112,7 +112,7 @@ To produce the documentation run the original source files ending with
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<*!(driver|install)>
-%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.4.1 2024-04-22 00:30:00
%<+!driver> +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
%<class> {Thesis template for Nanjing University}
%<class>\ProvidesExplClass{njuthesis}
@@ -148,7 +148,7 @@ To produce the documentation run the original source files ending with
% \thanks{E-mail: \href{mailto:git+nju-lug-email-3104-issue-@yaoge123.cn}
% {git+nju-lug-email-3104-issue-@yaoge123.cn}}}
%
-% \date{v1.4.0 \quad 2024-03-19}
+% \date{v1.4.1 \quad 2024-04-22}
%
% \changes{v0.1}{2021/09/04}{开始开发。}
% \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。}
@@ -823,21 +823,31 @@ To produce the documentation run the original source files ending with
% 宏包的代码环境不会显示内容,具体效果需要参照各个宏包的说明文档。
% 如需抵消草稿模式的影响,请使用 \opt{final} 选项载入相关宏包。
%
-% \begin{function}[added=2022-04-19,updated=2022-09-26]{anonymous}
+% \begin{function}[added=2022-04-19,updated=2024-04-19]{anonymous}
% \begin{syntax}
-% \OPT{anonymous} = <\TFF>
+% <\OPT{anonymous}>
% \end{syntax}
% 是否开启盲审模式。
% \end{function}
%
% 盲审模式会抹除论文中的学校和个人信息,效果包括:
% \begin{itemize}
-% \item 不显示校名校徽图片
-% \item 不显示“南京大学”字样
-% \item 不显示作者、导师等基本信息
-% \item 不显示声明页、致谢页
+% \item 作者、导师姓名用 $\times\times\times$ 代替
+% \item 不显示学号,但保留年级
+% \item 不显示声明页
+% \item 致谢页仅显示书签
+% \item 成果列表仅显示刊名和年份
% \end{itemize}
%
+% 如果你想使用更严格的模式,可以参考 \ref{subsec:njusetup}~节的语法填写下面的选项。
+%
+% \begin{function}[added=2024-04-19]{anonymous-mode/no-nju}
+% \begin{syntax}
+% \OPT{no-nju} = <\TFF>
+% \end{syntax}
+% 是否隐藏学校信息。默认关闭。开启后会隐藏校名、校徽和学校代码。
+% \end{function}
+%
%
% \subsubsection{可选宏包}
% \label{subsubsec:optional-pkg}
@@ -1082,6 +1092,7 @@ To produce the documentation run the original source files ending with
%
%
% \subsection{设置接口}
+% \label{subsec:njusetup}
%
% \begin{function}[added=2021-09-10,updated=2022-08-01]{\njusetup}
% \begin{syntax}
@@ -2825,7 +2836,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\clist_const:Nn \c_@@_name_anon_clist
{
- author, chairman, email, grade, student-id, reviewer,
+ author, chairman, email, student-id, reviewer,
supervisor-contact, supervisor, supervisor-ii
}
\clist_const:Nn \c_@@_name_anon_en_clist
@@ -3928,9 +3939,11 @@ To produce the documentation run the original source files ending with
% \begin{macro}{anonymous}
% \changes{v0.18}{2022/04/19}{新增盲审模式选项。}
% \changes{v1.0}{2022/07/05}{重命名盲审模式选项。}
+% \changes{v1.4}{2024/04/19}{盲审模式选项不接受传入值。}
% \begin{macro}{\g_@@_opt_anon_bool}
% 盲审模式。
% \begin{macrocode}
+ anonymous .value_forbidden:n = true,
anonymous .bool_gset:N = \g_@@_opt_anon_bool,
anonymous .initial:n = false,
% \end{macrocode}
@@ -4112,25 +4125,18 @@ To produce the documentation run the original source files ending with
\ProcessKeysOptions { nju }
% \end{macrocode}
%
-% \changes{v1.1}{2022/09/26}{盲审模式下不显示声明页。}
-% 盲审模式下不显示声明页。
-% \begin{macrocode}
-\bool_if:NT \g_@@_opt_anon_bool
- { \bool_gset_false:N \g_@@_opt_decl_bool }
-% \end{macrocode}
-%
%
% \subsection{用户接口}
%
-% \begin{macro}{abstract, bib, image, footer, footnote, header,
-% info, label-sep, listoffigures, listoftables,
+% \begin{macro}{abstract, anonymous-mode, bib, image, footer,
+% footnote, header, info, label-sep, listoffigures, listoftables,
% math, style, theorem, tableofcontents}
% 定义模块名的元(meta)键值对。
% \begin{macrocode}
\clist_map_inline:nn
{
- abstract, bib, image, footer, footnote, header,
- info, label-sep, listoffigures, listoftables,
+ abstract, anonymous-mode, bib, image, footer, footnote,
+ header, info, label-sep, listoffigures, listoftables,
math, style, theorem, tableofcontents
}
{ \keys_define:nn { nju } { #1 .meta:nn = { nju / #1 } {##1} } }
@@ -4138,15 +4144,18 @@ To produce the documentation run the original source files ending with
% \end{macro}
%
% \begin{macro}{\@@_keys_set:nn}
+%
+% \begin{macrocode}
+\cs_new_eq:NN \@@_keys_set:nn \keys_set:nn
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_keys_set_anon:nn}
% \changes{v1.1}{2022/09/26}{使用 \cs{keys_set_filter:nnn} 重构盲审模式。}
% 在开启盲审模式时,屏蔽被编入 \opt{anonymous} 分组的键值对输入。
% \begin{macrocode}
-\bool_if:NTF \g_@@_opt_anon_bool
- {
- \cs_new:Npn \@@_keys_set:nn #1#2
- { \keys_set_filter:nnn {#1} { anonymous } {#2} }
- }
- { \cs_new_eq:NN \@@_keys_set:nn \keys_set:nn }
+\cs_new:Npn \@@_keys_set_anon:nn #1#2
+ { \keys_set_filter:nnn {#1} { anonymous } {#2} }
% \end{macrocode}
% \end{macro}
%
@@ -4357,7 +4366,7 @@ To produce the documentation run the original source files ending with
\sys_if_engine_xetex:T
{
\RequirePackage { xeCJKfntef }
- \NewDocumentCommand \njuline { m } { \CJKunderline{#1} }
+ \cs_new_eq:NN \njuline \CJKunderline
}
% \end{macrocode}
% \pkg{lua-ul} 中需要在结尾使用 \tn{null} 保护尾部空白。
@@ -4365,7 +4374,7 @@ To produce the documentation run the original source files ending with
\sys_if_engine_luatex:T
{
\RequirePackage { lua-ul }
- \NewDocumentCommand \njuline { m } { \underLine{#1} \@@_null: }
+ \NewDocumentCommand \njuline { m } { \underLine {#1} \@@_null: }
}
%</class>
% \end{macrocode}
@@ -4731,16 +4740,6 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
-% 盲审模式下抹去学校名称。
-% \begin{macrocode}
-%<*class>
-\bool_if:NT \g_@@_opt_anon_bool
- {
- \tl_clear:N \l_@@_name_nju_tl
- \tl_clear:N \l_@@_name_nju_en_tl
- }
-% \end{macrocode}
-%
%
% \subsection{字体设置}
%
@@ -4751,6 +4750,7 @@ To produce the documentation run the original source files ending with
% \begin{variable}{\c_@@_path_macoffice_tl}
% mac Office 字体路径。
% \begin{macrocode}
+%<*class>
\tl_const:Nn \c_@@_path_macoffice_tl
{ /Applications/Microsoft~ Word.app/Contents/Resources/DFonts/ }
% \end{macrocode}
@@ -4910,7 +4910,7 @@ To produce the documentation run the original source files ending with
\setCJKfamilyfont { zhhei } { SimHei } [#1]
\setCJKfamilyfont { zhfs } { FangSong } [#1]
\setCJKfamilyfont { zhkai } { KaiTi } [#1]
- \@@_stzhongs:n {#1}
+ \@@_define_stzhongs:nn { STZhongsong } {#1}
}
\cs_new:Npn \@@_loadfont_cjk_win:
{ \@@_loadfont_cjk_win:N \c_@@_name_fakebold_tl }
@@ -4953,7 +4953,7 @@ To produce the documentation run the original source files ending with
\setCJKfamilyfont { zhhei } { SimHei.ttf } [#1]
\setCJKfamilyfont { zhfs } { Fangsong.ttf } [#1]
\setCJKfamilyfont { zhkai } { Kaiti.ttf } [#1]
- \@@_stzhongs:nn { STZHONGS.ttf } {#1}
+ \@@_define_stzhongs:nn { STZHONGS.ttf } {#1}
}
\cs_new:Npn \@@_loadfont_cjk_macoffice:
{
@@ -5091,25 +5091,48 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_loadfont_stzhongs:,\@@_stzhongs:nn,\@@_stzhongs:n,\@@_stzhongs:}
+% \begin{variable}{\l_@@_name_stzhongsopts_tl}
+% 华文中宋的字体特性列表,默认为仅使用伪粗体。
+% \begin{macrocode}
+\tl_new:N \l_@@_name_stzhongsopts_tl
+\tl_set_eq:NN \l_@@_name_stzhongsopts_tl \c_@@_name_fakebold_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_define_stzhongs:nn}
% \changes{v1.2}{2023/04/30}{在研究生模板载入华文中宋。}
% \changes{v1.3}{2023/10/09}{可以手动指定华文中宋文件位置。}
% 研究生封面额外需要的华文中宋。
% \begin{macrocode}
-\cs_new:Npn \@@_stzhongs:nn #1#2
- { \newCJKfontfamily \@@_stzhongs: {#1} [#2] }
-\cs_new:Npn \@@_stzhongs:n { \@@_stzhongs:nn { 华文中宋 } }
-\cs_new_protected:Npn \@@_loadfont_stzhongs:
+\cs_new:Npn \@@_define_stzhongs:nn #1#2
{
- \cs_if_exist_use:NF \@@_stzhongs:
+ \tl_set:Nn \l_@@_name_stzhongsfile_tl {#1}
+ \tl_set:Nn \l_@@_name_stzhongsopts_tl {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_loadfont_stzhongs:n}
+% \changes{v1.2}{2023/04/30}{在研究生模板载入华文中宋。}
+% \changes{v1.3}{2023/10/09}{可以手动指定华文中宋文件位置。}
+% \changes{v1.4}{2024/04/03}{调整载入华文中宋文件的逻辑。}
+% \begin{macro}{\@@_loadfont_stzhongs:V,\@@_loadfont_stzhongs:,\@@_stzhongs:}
+% 研究生封面额外需要的华文中宋。
+% \begin{macrocode}
+\cs_new:Npn \@@_loadfont_stzhongs:
+ { \@@_loadfont_stzhongs:V \l_@@_name_stzhongsfile_tl }
+\cs_new_protected:Npn \@@_loadfont_stzhongs:n #1
+ {
+ \fontspec_font_if_exist:nTF {#1}
{
- \fontspec_font_if_exist:nTF { 华文中宋 }
- { \@@_stzhongs:n { \c_@@_name_fakebold_tl } }
+ \newCJKfontfamily \@@_stzhongs: {#1}
+ [ \l_@@_name_stzhongsopts_tl ]
+ }
{
\bool_if:NTF \g_@@_font_path_bool
{
- \@@_stzhongs:nn { \l_@@_name_stzhongsfile_tl }
- { Path = \g_@@_font_path_tl, \c_@@_name_fakebold_tl }
+ \newCJKfontfamily \@@_stzhongs: {#1}
+ [ Path = \g_@@_font_path_tl, \c_@@_name_fakebold_tl ]
}
{
\cs_set_eq:NN \@@_stzhongs: \rmfamily
@@ -5117,9 +5140,10 @@ To produce the documentation run the original source files ending with
}
}
}
- }
+\cs_generate_variant:Nn \@@_loadfont_stzhongs:n { V }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
%
% \subsubsection{定义数学字库}
@@ -7728,11 +7752,6 @@ To produce the documentation run the original source files ending with
\msg_warning:nn { njuthesis } { missing-image }
\RequirePackage { njuvisual }
}
- \bool_if:NT \g_@@_opt_anon_bool
- {
- \RenewDocumentCommand \njuemblem { o m m } { }
- \RenewDocumentCommand \njuname { o m m } { }
- }
}
% \end{macrocode}
%
@@ -8168,44 +8187,92 @@ To produce the documentation run the original source files ending with
%
% \begin{environment}{preface}
% \begin{environment}{acknowledgement}
-% 单独制作的前言致谢页。
+% 单独制作的前言、致谢页。
% \begin{macrocode}
\NewDocumentEnvironment { preface } { +b }
{ \@@_chapter:V \l_@@_name_preface_tl #1 }
{ \cleardoublepage }
\NewDocumentEnvironment { acknowledgement } { +b }
- {
- \bool_if:NTF \g_@@_opt_anon_bool
- { \@@_bookmark_toc:V \l_@@_name_acknowledgementa_tl }
- { \@@_chapter:V \l_@@_name_acknowledgement_tl #1 }
- }
+ { \@@_acknowledgement:n {#1} }
{ \cleardoublepage }
% \end{macrocode}
% \end{environment}
% \end{environment}
%
+% \begin{macro}{\@@_acknowledgement:n}
+% 正常模式的致谢标题。
+% \begin{macrocode}
+\cs_new:Npn \@@_acknowledgement:n
+ { \@@_chapter:V \l_@@_name_acknowledgement_tl \use:n }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_acknowledgement_anon:n}
+% 盲审模式下仅显示致谢书签。
+% \begin{macrocode}
+\cs_new:Npn \@@_acknowledgement_anon:n
+ { \@@_bookmark_toc:V \l_@@_name_acknowledgementa_tl \use_none:n }
+% \end{macrocode}
+% \end{macro}
+%
%
% \subsection{成果列表}
%
-% \begin{macro}{\njupaperlist}
-% \changes{v0.10}{2021/09/29}{新增了成果列表页面。}
-% \changes{v0.14}{2021/12/20}{成果列表中可突出指定作者姓名及年份。}
-% \changes{v1.2}{2023/04/07}{修复成果列表与章末参考文献表的冲突。}
-% 成果列表。
+% \begin{macro}{\@@_anon_paperlist_setup:}
+% 创建一个仅包含刊名和年份的文献列表格式。
% \begin{macrocode}
-\NewDocumentCommand \njupaperlist
- { O { \l_@@_name_paperlist_tl } m }
+\cs_new:Npn \@@_anon_paperlist_setup:
+ {
+ \ctex_at_end_package:nn { biblatex }
+ {
+ \DeclareBibliographyDriver { anonymous }
+ {
+ \usebibmacro { begentry }
+ \usebibmacro { journal },~
+ \usebibmacro { date }
+ \usebibmacro { finentry }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_paperlist_anon:nn}
+% 生成盲审模式下的成果列表。
+% \begin{macrocode}
+\cs_new:Npn \@@_paperlist_anon:nn #1#2
+ {
+ \group_begin:
+ \newrefsection
+ \nocite {#2}
+ \printbiblist
+ [ title = #1, driver = anonymous, env = bibliography,
+ heading = subbibliography ] { anonymous }
+ \endrefsection
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\@@_paperlist:nn}
+% 生成普通模式下的成果列表。
+% \begin{macrocode}
+\cs_new:Npn \@@_paperlist:nn #1#2
{
\group_begin:
% \end{macrocode}
% 修改姓名的显示方式,使被注解的姓名可被加粗下划线表示。
+% 由于 \pkg{biblatex} 提供的 \tn{MakeCapital} 是一个 robust 命令,
+% 在绘制下划线过程中无法被完全展开,我们将其替换为
+% 可被展开的 \cs{str_uppercase:f} 以避免造成错误。
% \begin{macrocode}
+ \cs_set_eq:NN \MakeCapital \str_uppercase:f
\RenewDocumentCommand \mkbibnamegiven { m }
{ \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } {##1} }
+ { \bfseries \njuline {##1} } {##1} }
\RenewDocumentCommand \mkbibnamefamily { m }
{ \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } {##1} }
+ { \bfseries \njuline {##1} } {##1} }
% \end{macrocode}
% 修改年份的显示方式,默认进行加粗。
% \begin{macrocode}
@@ -8225,6 +8292,83 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\njupaperlist}
+% \changes{v0.10}{2021/09/29}{新增了成果列表页面。}
+% \changes{v0.14}{2021/12/20}{成果列表中可突出指定作者姓名及年份。}
+% \changes{v1.2}{2023/04/07}{修复成果列表与章末参考文献表的冲突。}
+% \changes{v1.4}{2024/03/21}{修复成果列表中文姓名加粗的问题。}
+% \changes{v1.4}{2024/04/15}{盲审模式下成果列表只显示期刊和年份。}
+% 成果列表。
+% \begin{macrocode}
+\NewDocumentCommand \njupaperlist
+ { O { \l_@@_name_paperlist_tl } m } { \@@_paperlist:nn {#1} {#2} }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{盲审模式}
+% \changes{v1.4}{2024/04/19}{合并盲审模式设置。}
+%
+% \begin{macro}{anonymous-mode/no-nju}
+% \changes{v1.4}{2024/04/19}{盲审模式下可选择是否隐藏学校信息。}
+% \begin{macrocode}
+\keys_define:nn { nju / anonymous-mode }
+ {
+ no-nju .bool_gset:N = \g_@@_opt_nonju_bool,
+ no-nju .initial:n = false
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\bool_if:NT \g_@@_opt_anon_bool
+ {
+% \end{macrocode}
+% \changes{v1.1}{2022/09/26}{盲审模式下不显示声明页。}
+% 盲审模式下不显示声明页。
+% \begin{macrocode}
+ \bool_gset_false:N \g_@@_opt_decl_bool
+% \end{macrocode}
+% \changes{v1.4}{2024/04/15}{盲审模式下姓名使用占位符。}
+% 盲审模式下作者和导师姓名用 $\times\times\times$ 代替。
+% \begin{macrocode}
+ \keys_set:nn { nju / info }
+ {
+ author = \@@_name:n { anonymous a },
+ author* = \@@_name:n { anonymous a },
+ supervisor =
+ { \@@_name:n { anonymous a }, \@@_name:n { anonymous b } },
+ supervisor* =
+ { \@@_name:n { anonymous c } \@@_quad: \@@_name:n { anonymous a } },
+ supervisor-ii = ,
+ supervisor-ii* =
+ }
+% \end{macrocode}
+% 替换为匿名版本的命令。
+% \begin{macrocode}
+ \@@_anon_paperlist_setup:
+ \cs_gset_eq:NN \@@_paperlist:nn \@@_paperlist_anon:nn
+ \cs_gset_eq:NN \@@_keys_set:nn \@@_keys_set_anon:nn
+ \cs_gset_eq:NN \@@_acknowledgement:n \@@_acknowledgement_anon:n
+ }
+% \end{macrocode}
+%
+% 开启 \opt{no-nju} 模式时,清除校名、校徽以及学校代码。
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \bool_lazy_and:nnT
+ { \g_@@_opt_anon_bool } { \g_@@_opt_nonju_bool }
+ {
+ \tl_clear:N \l_@@_name_nju_tl
+ \tl_clear:N \l_@@_name_nju_en_tl
+ \tl_gclear:N \g_@@_info_code_tl
+ \RenewDocumentCommand \njuemblem { o m m } { }
+ \RenewDocumentCommand \njuname { o m m } { }
+ }
+ }
+% \end{macrocode}
+%
%
% \subsection{符号表}
%
@@ -8323,6 +8467,9 @@ To produce the documentation run the original source files ending with
{
{ acknowledgement } { 致 \qquad{} 谢 },
{ acknowledgement a } { 致谢(盲审阶段,暂时隐去) },
+ { anonymous a } { \ensuremath { \times\times\times } },
+ { anonymous b } { \ensuremath { \times\times\times } },
+ { anonymous c } { \ensuremath { \times\times\times } },
%<def-g> { auth decl } { 学位论文出版授权书 },
%<def-p> { auth decl } { 研究报告使用授权书 },
%<def-p> { author } { 作者 },
@@ -8397,7 +8544,7 @@ To produce the documentation run the original source files ending with
%<def-g> { sign } { (签字) },
%<def-g> { sign a } { 研究生签名 },
%<def-g> { sign b } { 导师签名 },
-%<def-g> { stzhongs file } { STZHONGS.TTF },
+%<def-g> { stzhongs file } { STZhongsong },
%<def-u> { submit date } { 提交日期 },
%<def-g> { submit date } { 论文提交日期 },
%<def-p> { submit date } { 完成日期 },
@@ -8461,7 +8608,11 @@ To produce the documentation run the original source files ending with
{ blankdate } { \qquad{}年 \quad{}月 \quad{}日 } { },
{ blankdate a } { \njuline{\qquad\qquad} 年
\njuline{\qquad} 月 \njuline{\qquad} 日 } { },
- { colon } { : } { : \c_space_tl },
+% \end{macrocode}
+% \changes{v1.4}{2024/04/03}{修复 \hologo{LuaLaTeX} 下的摘要页多余换行。}
+% 这里加入伸缩量,是因为 \hologo{LuaLaTeX} 下全角冒号的宽度并不能被正确识别。
+% \begin{macrocode}
+ { colon } { :\hskip 0pt minus .4em } { : \c_space_tl },
%<def-u|def-g> { dept } { 院系 } { DEPARTMENT },
{ figure } { 图 } { figure },
{ keywords } { 关键词 } { KEYWORDS },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls
index 6ab2fac855c..57c75e288e6 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.4.1 2024-04-22 00:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Documentation style for njuthesis}
\ProvidesExplFile{njuthesis-doc.cls}
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
index 2e4bbbaf95d..eb3bebc6731 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.4.1 2024-04-22 00:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Graduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-graduate.def}
@@ -548,6 +548,9 @@
{
{ acknowledgement } { 致 \qquad{} 谢 },
{ acknowledgement a } { 致谢(盲审阶段,暂时隐去) },
+ { anonymous a } { \ensuremath { \times\times\times } },
+ { anonymous b } { \ensuremath { \times\times\times } },
+ { anonymous c } { \ensuremath { \times\times\times } },
{ auth decl } { 学位论文出版授权书 },
{ author a } { \g__nju_info_type_tl 生姓名 },
{ auth sign } { 作者签名:\njuline{\hspace{6em}} },
@@ -586,7 +589,7 @@
{ sign } { (签字) },
{ sign a } { 研究生签名 },
{ sign b } { 导师签名 },
- { stzhongs file } { STZHONGS.TTF },
+ { stzhongs file } { STZhongsong },
{ submit date } { 论文提交日期 },
{ subtitle } { (题名和副题名) },
{ supv } { 导师 },
@@ -617,7 +620,7 @@
{ blankdate } { \qquad{}年 \quad{}月 \quad{}日 } { },
{ blankdate a } { \njuline{\qquad\qquad} 年
\njuline{\qquad} 月 \njuline{\qquad} 日 } { },
- { colon } { : } { : \c_space_tl },
+ { colon } { :\hskip 0pt minus .4em } { : \c_space_tl },
{ dept } { 院系 } { DEPARTMENT },
{ figure } { 图 } { figure },
{ keywords } { 关键词 } { KEYWORDS },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def
index 4fd12af3b1a..43aac200720 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.4.1 2024-04-22 00:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Postdoctoral definition file for njuthesis}
\ProvidesExplFile{njuthesis-postdoctoral.def}
@@ -183,6 +183,9 @@
{
{ acknowledgement } { 致 \qquad{} 谢 },
{ acknowledgement a } { 致谢(盲审阶段,暂时隐去) },
+ { anonymous a } { \ensuremath { \times\times\times } },
+ { anonymous b } { \ensuremath { \times\times\times } },
+ { anonymous c } { \ensuremath { \times\times\times } },
{ auth decl } { 研究报告使用授权书 },
{ author } { 作者 },
{ auth sign } { 本人签名 },
@@ -217,7 +220,7 @@
{ blankdate } { \qquad{}年 \quad{}月 \quad{}日 } { },
{ blankdate a } { \njuline{\qquad\qquad} 年
\njuline{\qquad} 月 \njuline{\qquad} 日 } { },
- { colon } { : } { : \c_space_tl },
+ { colon } { :\hskip 0pt minus .4em } { : \c_space_tl },
{ figure } { 图 } { figure },
{ keywords } { 关键词 } { KEYWORDS },
{ lang } { 中文 } { 英文 },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
index a2120d56bd0..9cfe467a300 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.4.1 2024-04-22 00:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Undergraduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-undergraduate.def}
@@ -177,6 +177,9 @@
{
{ acknowledgement } { 致 \qquad{} 谢 },
{ acknowledgement a } { 致谢(盲审阶段,暂时隐去) },
+ { anonymous a } { \ensuremath { \times\times\times } },
+ { anonymous b } { \ensuremath { \times\times\times } },
+ { anonymous c } { \ensuremath { \times\times\times } },
{ author a } { 本科生姓名 },
{ date } { 日期 },
{ grade } { 年级 },
@@ -210,7 +213,7 @@
{ blankdate } { \qquad{}年 \quad{}月 \quad{}日 } { },
{ blankdate a } { \njuline{\qquad\qquad} 年
\njuline{\qquad} 月 \njuline{\qquad} 日 } { },
- { colon } { : } { : \c_space_tl },
+ { colon } { :\hskip 0pt minus .4em } { : \c_space_tl },
{ dept } { 院系 } { DEPARTMENT },
{ figure } { 图 } { figure },
{ keywords } { 关键词 } { KEYWORDS },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
index 2560e613a2e..b0ba863f570 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
@@ -24,7 +24,7 @@
%% `.dtx' through XeTeX.
%%
\NeedsTeXFormat{LaTeX2e}
-\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.4.1 2024-04-22 00:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Thesis template for Nanjing University}
\ProvidesExplClass{njuthesis}
@@ -106,7 +106,7 @@
}
\clist_const:Nn \c__nju_name_anon_clist
{
- author, chairman, email, grade, student-id, reviewer,
+ author, chairman, email, student-id, reviewer,
supervisor-contact, supervisor, supervisor-ii
}
\clist_const:Nn \c__nju_name_anon_en_clist
@@ -598,6 +598,7 @@
\tl_gset:Nn \g__nju_name_pagemode_tl { twoside }
\__nju_pass_option:
},
+ anonymous .value_forbidden:n = true,
anonymous .bool_gset:N = \g__nju_opt_anon_bool,
anonymous .initial:n = false,
latin-font .choices:nn =
@@ -666,21 +667,16 @@
}
}
\ProcessKeysOptions { nju }
-\bool_if:NT \g__nju_opt_anon_bool
- { \bool_gset_false:N \g__nju_opt_decl_bool }
\clist_map_inline:nn
{
- abstract, bib, image, footer, footnote, header,
- info, label-sep, listoffigures, listoftables,
+ abstract, anonymous-mode, bib, image, footer, footnote,
+ header, info, label-sep, listoffigures, listoftables,
math, style, theorem, tableofcontents
}
{ \keys_define:nn { nju } { #1 .meta:nn = { nju / #1 } {##1} } }
-\bool_if:NTF \g__nju_opt_anon_bool
- {
- \cs_new:Npn \__nju_keys_set:nn #1#2
- { \keys_set_filter:nnn {#1} { anonymous } {#2} }
- }
- { \cs_new_eq:NN \__nju_keys_set:nn \keys_set:nn }
+\cs_new_eq:NN \__nju_keys_set:nn \keys_set:nn
+\cs_new:Npn \__nju_keys_set_anon:nn #1#2
+ { \keys_set_filter:nnn {#1} { anonymous } {#2} }
\NewDocumentCommand \njusetup { o m }
{
\tl_if_novalue:nTF {#1}
@@ -756,12 +752,12 @@
\sys_if_engine_xetex:T
{
\RequirePackage { xeCJKfntef }
- \NewDocumentCommand \njuline { m } { \CJKunderline{#1} }
+ \cs_new_eq:NN \njuline \CJKunderline
}
\sys_if_engine_luatex:T
{
\RequirePackage { lua-ul }
- \NewDocumentCommand \njuline { m } { \underLine{#1} \__nju_null: }
+ \NewDocumentCommand \njuline { m } { \underLine {#1} \__nju_null: }
}
\cs_new:Npn \__nju_check_pkg_version:nnn #1#2#3
{
@@ -878,11 +874,6 @@
{ \__nju_quad: \g__nju_info_supvii_en_tl }
}
}
-\bool_if:NT \g__nju_opt_anon_bool
- {
- \tl_clear:N \l__nju_name_nju_tl
- \tl_clear:N \l__nju_name_nju_en_tl
- }
\tl_const:Nn \c__nju_path_macoffice_tl
{ /Applications/Microsoft~ Word.app/Contents/Resources/DFonts/ }
\sys_if_platform_windows:TF
@@ -970,7 +961,7 @@
\setCJKfamilyfont { zhhei } { SimHei } [#1]
\setCJKfamilyfont { zhfs } { FangSong } [#1]
\setCJKfamilyfont { zhkai } { KaiTi } [#1]
- \__nju_stzhongs:n {#1}
+ \__nju_define_stzhongs:nn { STZhongsong } {#1}
}
\cs_new:Npn \__nju_loadfont_cjk_win:
{ \__nju_loadfont_cjk_win:N \c__nju_name_fakebold_tl }
@@ -999,7 +990,7 @@
\setCJKfamilyfont { zhhei } { SimHei.ttf } [#1]
\setCJKfamilyfont { zhfs } { Fangsong.ttf } [#1]
\setCJKfamilyfont { zhkai } { Kaiti.ttf } [#1]
- \__nju_stzhongs:nn { STZHONGS.ttf } {#1}
+ \__nju_define_stzhongs:nn { STZHONGS.ttf } {#1}
}
\cs_new:Npn \__nju_loadfont_cjk_macoffice:
{
@@ -1093,20 +1084,27 @@
ItalicFeatures = FakeSlant,
BoldItalicFeatures = FakeSlant
}
-\cs_new:Npn \__nju_stzhongs:nn #1#2
- { \newCJKfontfamily \__nju_stzhongs: {#1} [#2] }
-\cs_new:Npn \__nju_stzhongs:n { \__nju_stzhongs:nn { 华文中宋 } }
-\cs_new_protected:Npn \__nju_loadfont_stzhongs:
+\tl_new:N \l__nju_name_stzhongsopts_tl
+\tl_set_eq:NN \l__nju_name_stzhongsopts_tl \c__nju_name_fakebold_tl
+\cs_new:Npn \__nju_define_stzhongs:nn #1#2
{
- \cs_if_exist_use:NF \__nju_stzhongs:
+ \tl_set:Nn \l__nju_name_stzhongsfile_tl {#1}
+ \tl_set:Nn \l__nju_name_stzhongsopts_tl {#2}
+ }
+\cs_new:Npn \__nju_loadfont_stzhongs:
+ { \__nju_loadfont_stzhongs:V \l__nju_name_stzhongsfile_tl }
+\cs_new_protected:Npn \__nju_loadfont_stzhongs:n #1
+ {
+ \fontspec_font_if_exist:nTF {#1}
{
- \fontspec_font_if_exist:nTF { 华文中宋 }
- { \__nju_stzhongs:n { \c__nju_name_fakebold_tl } }
+ \newCJKfontfamily \__nju_stzhongs: {#1}
+ [ \l__nju_name_stzhongsopts_tl ]
+ }
{
\bool_if:NTF \g__nju_font_path_bool
{
- \__nju_stzhongs:nn { \l__nju_name_stzhongsfile_tl }
- { Path = \g__nju_font_path_tl, \c__nju_name_fakebold_tl }
+ \newCJKfontfamily \__nju_stzhongs: {#1}
+ [ Path = \g__nju_font_path_tl, \c__nju_name_fakebold_tl ]
}
{
\cs_set_eq:NN \__nju_stzhongs: \rmfamily
@@ -1114,7 +1112,7 @@
}
}
}
- }
+\cs_generate_variant:Nn \__nju_loadfont_stzhongs:n { V }
\cs_new:Npn \__nju_define_math_font:nn #1#2
{
\cs_new:cpn { __nju_loadfont_math_ #1 : }
@@ -1817,11 +1815,6 @@
\msg_warning:nn { njuthesis } { missing-image }
\RequirePackage { njuvisual }
}
- \bool_if:NT \g__nju_opt_anon_bool
- {
- \RenewDocumentCommand \njuemblem { o m m } { }
- \RenewDocumentCommand \njuname { o m m } { }
- }
}
\RenewDocumentCommand \maketitle { }
{
@@ -1909,22 +1902,47 @@
{ \__nju_chapter:V \l__nju_name_preface_tl #1 }
{ \cleardoublepage }
\NewDocumentEnvironment { acknowledgement } { +b }
+ { \__nju_acknowledgement:n {#1} }
+ { \cleardoublepage }
+\cs_new:Npn \__nju_acknowledgement:n
+ { \__nju_chapter:V \l__nju_name_acknowledgement_tl \use:n }
+\cs_new:Npn \__nju_acknowledgement_anon:n
+ { \__nju_bookmark_toc:V \l__nju_name_acknowledgementa_tl \use_none:n }
+\cs_new:Npn \__nju_anon_paperlist_setup:
{
- \bool_if:NTF \g__nju_opt_anon_bool
- { \__nju_bookmark_toc:V \l__nju_name_acknowledgementa_tl }
- { \__nju_chapter:V \l__nju_name_acknowledgement_tl #1 }
+ \ctex_at_end_package:nn { biblatex }
+ {
+ \DeclareBibliographyDriver { anonymous }
+ {
+ \usebibmacro { begentry }
+ \usebibmacro { journal },~
+ \usebibmacro { date }
+ \usebibmacro { finentry }
+ }
+ }
}
- { \cleardoublepage }
-\NewDocumentCommand \njupaperlist
- { O { \l__nju_name_paperlist_tl } m }
+\cs_new:Npn \__nju_paperlist_anon:nn #1#2
+ {
+ \group_begin:
+ \newrefsection
+ \nocite {#2}
+ \printbiblist
+ [ title = #1, driver = anonymous, env = bibliography,
+ heading = subbibliography ] { anonymous }
+ \endrefsection
+ \group_end:
+ }
+
+\cs_new:Npn \__nju_paperlist:nn #1#2
{
\group_begin:
+ \cs_set_eq:NN \MakeCapital \str_uppercase:f
\RenewDocumentCommand \mkbibnamegiven { m }
{ \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } {##1} }
+ { \bfseries \njuline {##1} } {##1} }
\RenewDocumentCommand \mkbibnamefamily { m }
{ \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } {##1} }
+ { \bfseries \njuline {##1} } {##1} }
\RenewDocumentCommand \mkbibdateshort { m m m }
{ \textbf { \thefield {##1} } }
\newrefsection
@@ -1933,6 +1951,44 @@
\endrefsection
\group_end:
}
+\NewDocumentCommand \njupaperlist
+ { O { \l__nju_name_paperlist_tl } m } { \__nju_paperlist:nn {#1} {#2} }
+\keys_define:nn { nju / anonymous-mode }
+ {
+ no-nju .bool_gset:N = \g__nju_opt_nonju_bool,
+ no-nju .initial:n = false
+ }
+\bool_if:NT \g__nju_opt_anon_bool
+ {
+ \bool_gset_false:N \g__nju_opt_decl_bool
+ \keys_set:nn { nju / info }
+ {
+ author = \__nju_name:n { anonymous a },
+ author* = \__nju_name:n { anonymous a },
+ supervisor =
+ { \__nju_name:n { anonymous a }, \__nju_name:n { anonymous b } },
+ supervisor* =
+ { \__nju_name:n { anonymous c } \__nju_quad: \__nju_name:n { anonymous a } },
+ supervisor-ii = ,
+ supervisor-ii* =
+ }
+ \__nju_anon_paperlist_setup:
+ \cs_gset_eq:NN \__nju_paperlist:nn \__nju_paperlist_anon:nn
+ \cs_gset_eq:NN \__nju_keys_set:nn \__nju_keys_set_anon:nn
+ \cs_gset_eq:NN \__nju_acknowledgement:n \__nju_acknowledgement_anon:n
+ }
+\ctex_at_end_preamble:n
+ {
+ \bool_lazy_and:nnT
+ { \g__nju_opt_anon_bool } { \g__nju_opt_nonju_bool }
+ {
+ \tl_clear:N \l__nju_name_nju_tl
+ \tl_clear:N \l__nju_name_nju_en_tl
+ \tl_gclear:N \g__nju_info_code_tl
+ \RenewDocumentCommand \njuemblem { o m m } { }
+ \RenewDocumentCommand \njuname { o m m } { }
+ }
+ }
\cs_new_protected:Npn \__nju_notation_label:n #1 { #1 \tex_hfil:D }
\cs_new_protected:Npn \__nju_make_notation:nn #1#2
{