diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-21 20:35:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-21 20:35:25 +0000 |
commit | 096b4351da025f1c63714aa2a004fdd74f09bc71 (patch) | |
tree | 99ac7e208893062f7537f3707c8ce5c0c9227dd1 /Master/texmf-dist/tex | |
parent | 02511af04413bc7f56b5351bdf2fff1e883b571f (diff) |
nwafuthesis (21mar22)
git-svn-id: svn://tug.org/texlive/trunk@62872 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/nwafuthesis/nwafu-bar.pdf | bin | 694569 -> 0 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls | 1339 |
2 files changed, 524 insertions, 815 deletions
diff --git a/Master/texmf-dist/tex/latex/nwafuthesis/nwafu-bar.pdf b/Master/texmf-dist/tex/latex/nwafuthesis/nwafu-bar.pdf Binary files differdeleted file mode 100644 index 13837d2d693..00000000000 --- a/Master/texmf-dist/tex/latex/nwafuthesis/nwafu-bar.pdf +++ /dev/null diff --git a/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls b/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls index 350ccff8aa8..cade365ee93 100644 --- a/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls +++ b/Master/texmf-dist/tex/latex/nwafuthesis/nwafuthesis.cls @@ -30,14 +30,14 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo $Id: nwafuthesis.dtx 1.01 2021-08-07 Nan Geng <nangeng@nwafu.edu.cn> $ +\GetIdInfo $Id: nwafuthesis.dtx 1.10 2022-03-17 Nan Geng <nangeng@nwafu.edu.cn> $ {Thesis template for Northwest A\&F University} \ProvidesExplClass{\ExplFileName} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} -\RequirePackage { xparse, xtemplate, l3keys2e } -\clist_map_inline:nn { expl3, xparse, xtemplate, l3keys2e } +\RequirePackage {xtemplate, l3keys2e } +\clist_map_inline:nn { xtemplate, l3keys2e } { - \@ifpackagelater {#1} { 2018/05/12 } + \@ifpackagelater {#1} { 2020/07/17 } { } { \msg_error:nnn { nwafuthesis } { l3-too-old } {#1} } } \msg_new:nnn { nwafuthesis } { l3-too-old } @@ -61,7 +61,6 @@ "#1"~ is~ not~ supported~ at~ present.~ You~ must~ change \\ your~ typesetting~ engine~ to~ "xelatex"~ or~ "lualatex". } -\hook_gset_rule:nnnn { begindocument/before } { nwafuthesis } { < } { xeCJK } \box_new:N \l__nwafu_tmpa_box \clist_new:N \l__nwafu_tmpa_clist \clist_new:N \l__nwafu_tmpb_clist @@ -82,11 +81,10 @@ \int_new:N \g__nwafu_thesis_type_int \clist_new:N \g__nwafu_to_ctexbook_clist \clist_new:N \g__nwafu_to_hyperref_clist -\bool_new:N \l__nwafu_withchap_bool \bool_new:N \g__nwafu_twoside_bool \bool_set_true:N \g__nwafu_twoside_bool \bool_new:N \g__nwafu_draft_bool -\cs_generate_variant:Nn \cs_generate_variant:Nn { cn } +\bool_new:N \l__nwafu_withchap_bool \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 } @@ -112,6 +110,9 @@ \cs_new:Npn \__nwafu_symbol:n #1 { \tex_char:D #1 \scan_stop: } \cs_new:Npn \__nwafu_arabic:n #1 { \int_to_arabic:v { c@ #1 } } +\cs_new_protected:Npn \__nwafu_gadd_ltxhook:nn #1#2 + { \hook_gput_code:nnn {#1} { . } {#2} } +\hook_gset_rule:nnnn { begindocument/before } { . } { < } { xeCJK } \cs_new_protected:Npn \__nwafu_patch_cmd:Nnn #1#2#3 { \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3} @@ -153,6 +154,7 @@ \cs_new:Npn \__nwafu_error:nn { \msg_error:nnn { nwafuthesis } } \cs_new:Npn \__nwafu_error:nx { \msg_error:nnx { nwafuthesis } } \cs_new:Npn \__nwafu_error:nnn { \msg_error:nnnn { nwafuthesis } } +\cs_new:Npn \__nwafu_error:nnnn { \msg_error:nnnnn { nwafuthesis } } \cs_new:Npn \__nwafu_warning:n { \msg_warning:nn { nwafuthesis } } \cs_new:Npn \__nwafu_warning:nn { \msg_warning:nnn { nwafuthesis } } \cs_new:Npn \__nwafu_warning:nxx { \msg_warning:nnxx { nwafuthesis } } @@ -195,7 +197,8 @@ \NewDocumentCommand \nwafuthesis { } {% \makebox{\rmfamily% - N\hspace{-0.2ex}\raisebox{-0.5ex}{W}\raisebox{0.5ex}{\hspace{-0.2ex}\textsc{AFU}}\hspace{0.3ex}% + N\hspace{-0.2ex}\raisebox{-0.5ex}{W}\raisebox{0.5ex} + {\hspace{-0.2ex}\textsc{AFU}}\hspace{0.3ex}% \textsc{Thesis} } } @@ -242,34 +245,40 @@ { \__nwafu_define_punct:nn #1 } \fp_const:Nn \c__nwafu_line_spread_fp { \dim_ratio:nn { 20 pt } { 12 bp } / 1.2 } -\int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } +\cs_new_protected:Npn \__nwafu_define_orig_decl_text: { - \tl_const:Nn \c__nwafu_orig_decl_text_tl + \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { - 本人声明:所呈交的学位论文是我个人在导师指导下独立进行的研究工作及取 - 得的研究结果;论文中的研究数据及结果的获得完全符合学校《关于规范西北 - 农林科技大学研究生学术道德的暂行规定》,如果违反此规定,一切后果与法 - 律责任均由本人承担。\par - 尽我所知,除了文中特别加以标注和致谢的地方外,论文中不包含其他人已经 - 发表或撰写过的研究结果,也不包含其他人和自己本人已获得西北农林科技大 - 学或其它教育机构的学位或证书而使用过的材料。与我一同工作的同事对本 - 研究所做的任何贡献均已在论文的致谢中作了明确的说明并表示了谢意。 + \tl_const:Nn \c__nwafu_orig_decl_text_tl + { + 本人声明:所呈交的学位论文是我个人在导师指导下独立进行的研究工作及取 + 得的研究结果;论文中的研究数据及结果的获得完全符合学校《关于规范西北 + 农林科技大学研究生学术道德的暂行规定》,如果违反此规定,一切后果与法 + 律责任均由本人承担。\par + + 尽我所知,除了文中特别加以标注和致谢的地方外,论文中不包含其他人已经 + 发表或撰写过的研究结果,也不包含其他人和自己本人已获得西北农林科技大 + 学或其它教育机构的学位或证书而使用过的材料。与我一同工作的同事对本 + 研究所做的任何贡献均已在论文的致谢中作了明确的说明并表示了谢意。 + } } - } - { - \tl_const:Nn \c__nwafu_orig_decl_text_tl { - 本人声明:所呈交的毕业 - \clist_item:Nn \c__nwafu_bachelor_type_clist { \l__nwafu_info_bachelor_type_int } - 是我个人在导师指导下 - 独立进行的研究工作及取得的研究结果。尽我所知,除了文中特别加 - 以标注和致谢的地方外,论文中不包含其他人已经发表或撰写过的研究结果, - 也不包含其他人和自己本人已获得\c__nwafu_name_simp_tl{}或其它教育 - 机构的学位或证书而使用过的材料。与我一同工作的同事对本研究所做 - 的任何贡献均已在论文的致谢中作了明确的说明并表示了谢意。 - 如违反此声明,一切后果与法律责任均由本人承担。 + \tl_const:Nn \c__nwafu_orig_decl_text_tl + { + 本人声明:所呈交的毕业 + \clist_item:Nn \c__nwafu_bachelor_type_clist + { \l__nwafu_info_bachelor_type_int } + 是我个人在导师指导下 + 独立进行的研究工作及取得的研究结果。尽我所知,除了文中特别加 + 以标注和致谢的地方外,论文中不包含其他人已经发表或撰写过的研究结果, + 也不包含其他人和自己本人已获得\c__nwafu_name_simp_tl{}或其它教育 + 机构的学位或证书而使用过的材料。与我一同工作的同事对本研究所做 + 的任何贡献均已在论文的致谢中作了明确的说明并表示了谢意。 + 如违反此声明,一切后果与法律责任均由本人承担。 + } } } +\__nwafu_define_orig_decl_text: \tl_const:Nn \c__nwafu_super_decl_text_tl { 本人承诺:我的研究生{\__nwafu_text_uline:V \l__nwafu_info_author_tl}所呈交的 @@ -279,63 +288,73 @@ 技大学研究生学术道德的暂行规定》,我愿接受按学校有关规定的处罚处理并 承担相应导师连带责任。 } -\int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } +\cs_new_protected:Npn \__nwafu_auth_orig_decl_text: { - \tl_const:Nn \c__nwafu_auth_decl_text_tl + \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { - 本学位论文的知识产权归属西北农林科技大学。本人同意西北农林科技大学 - 保存或向国家有关部门或机构送交论文的纸质版和电子版,允许论文被查阅和 - 借阅;同意西北农林科技大学将本学位论文的全部或部分内容授权汇编录入 - 中国博士/硕士学位论文全文数据库》和《中国学位论文全文数据库》进行 - 出版,并享受相关权益。\par + \tl_const:Nn \c__nwafu_auth_decl_text_tl + { + 本学位论文的知识产权归属西北农林科技大学。本人同意西北农林科技大学 + 保存或向国家有关部门或机构送交论文的纸质版和电子版,允许论文被查阅和 + 借阅;同意西北农林科技大学将本学位论文的全部或部分内容授权汇编录入 + 中国博士/硕士学位论文全文数据库》和《中国学位论文全文数据库》进行 + 出版,并享受相关权益。\par - 本人保证,在毕业离开(或者工作调离)西北农林科技大学后,发表或者使用本 - 学位论文及其相关的工作成果时,将以西北农林科技大学为第一署名单位,否 - 则,愿意按《中华人民共和国著作权法》等有关规定接受处理并承担法律责任。\par + 本人保证,在毕业离开(或者工作调离)西北农林科技大学后,发表或者使用本 + 学位论文及其相关的工作成果时,将以西北农林科技大学为第一署名单位,否 + 则,愿意按《中华人民共和国著作权法》等有关规定接受处理并承担法律责任。\par - 任何收存和保管本论文各种版本的其他单位和个人(包括研究生本人)未经本 - 论文作者的导师同意,不得有对本论文进行复制、修改、发行、出租、改编等 - 侵犯著作权的行为,否则,按违背《中华人民共和国著作权法》等有关规定处 - 理并追究法律责任。\par + 任何收存和保管本论文各种版本的其他单位和个人(包括研究生本人)未经本 + 论文作者的导师同意,不得有对本论文进行复制、修改、发行、出租、改编等 + 侵犯著作权的行为,否则,按违背《中华人民共和国著作权法》等有关规定处 + 理并追究法律责任。\par - {\sffamily (保密的学位论文在保密期限内,不得以任何方式发表、借阅、复印、 - 缩印或扫描复制手段保存、汇编论文)} + {\sffamily (保密的学位论文在保密期限内,不得以任何方式发表、借阅、复印、 + 缩印或扫描复制手段保存、汇编论文)} + } } - } - { - \tl_const:Nn \c__nwafu_auth_decl_text_tl { - 本毕业 - \clist_item:Nn \c__nwafu_bachelor_type_clist { \l__nwafu_info_bachelor_type_int } - 的知识产权归属\c__nwafu_name_simp_tl{}。 - 本人同意\c__nwafu_name_simp_tl{}保存或向国家有关部门或机构 - 送交论文的纸质版和电子版,允许论文被查阅和借阅。\par + \tl_const:Nn \c__nwafu_auth_decl_text_tl + { + 本毕业 + \clist_item:Nn \c__nwafu_bachelor_type_clist + { \l__nwafu_info_bachelor_type_int } + 的知识产权归属\c__nwafu_name_simp_tl{}。 + 本人同意\c__nwafu_name_simp_tl{}保存或向国家有关部门或机构 + 送交论文的纸质版和电子版,允许论文被查阅和借阅。\par - 本人保证,在毕业离开\c__nwafu_name_simp_tl{}后,发表或者使用本毕业 - \clist_item:Nn \c__nwafu_bachelor_type_clist { \l__nwafu_info_bachelor_type_int } - 及其相关的工作成果时,将以\c__nwafu_name_simp_tl{} - 为第一署名单位,否则,愿意按《中华人民共和国著作权法》等 - 有关规定接受处理并承担法律责任。\par + 本人保证,在毕业离开\c__nwafu_name_simp_tl{}后,发表或者使用本毕业 + \clist_item:Nn \c__nwafu_bachelor_type_clist + { \l__nwafu_info_bachelor_type_int } + 及其相关的工作成果时,将以\c__nwafu_name_simp_tl{} + 为第一署名单位,否则,愿意按《中华人民共和国著作权法》等 + 有关规定接受处理并承担法律责任。\par - 任何收存和保管本论文各种版本的其他单位和个人(包括作者本人)未经 - 本论文作者的导师同意,不得有对本论文进行复制、修改、发行、出租、 - 改编等侵犯著作权的行为,否则,按违背《中华人民共和国著作权法》 - 等有关规定处理并追究法律责任。 + 任何收存和保管本论文各种版本的其他单位和个人(包括作者本人)未经 + 本论文作者的导师同意,不得有对本论文进行复制、修改、发行、出租、 + 改编等侵犯著作权的行为,否则,按违背《中华人民共和国著作权法》 + 等有关规定处理并追究法律责任。 + } } } -\int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } - { - \tl_const:Nn \c__nwafu_orig_decl_sign_tl - { 研究生签名 } - \tl_const:Nn \c__nwafu_super_decl_sign_tl - { 导师签名 } - } +\__nwafu_auth_orig_decl_text: +\cs_new_protected:Npn \__nwafu_orig_decl_sign: { - \tl_const:Nn \c__nwafu_orig_decl_sign_tl - { 本科生签名 } - \tl_const:Nn \c__nwafu_super_decl_sign_tl - { 指导教师签名 } + \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } + { + \tl_const:Nn \c__nwafu_orig_decl_sign_tl + { 研究生签名 } + \tl_const:Nn \c__nwafu_super_decl_sign_tl + { 导师签名 } + } + { + \tl_const:Nn \c__nwafu_orig_decl_sign_tl + { 本科生签名 } + \tl_const:Nn \c__nwafu_super_decl_sign_tl + { 指导教师签名 } + } } +\__nwafu_orig_decl_sign: \clist_const:Nn \c__nwafu_auth_decl_sign_clist { 作者签名, 导师签名, 日期 } \clist_const:Nn \c__nwafu_thesis_type_clist @@ -366,66 +385,75 @@ { pdf_creator } { LaTeX~ with~ nwafuthesis~ class }, } { \__nwafu_define_name:nn #1 } -\int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } + +\cs_new_protected:Npn \__nwafu_define_name_const_zh: { - \clist_map_inline:nn + \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { - { student_id } { 研究生学号 }, - { orig_decl } { 研究生学位论文的独创性声明 }, - { super_decl } { 导师指导研究生学位论文的承诺 }, - { auth_decl } { 关于研究生学位论文使用授权的说明 } + \clist_map_inline:nn + { + { student_id } { 研究生学号 }, + { orig_decl } { 研究生学位论文的独创性声明 }, + { super_decl } { 导师指导研究生学位论文的承诺 }, + { auth_decl } { 关于研究生学位论文使用授权的说明 } + } + { \__nwafu_define_name:nn ##1 } + }{ + \clist_map_inline:nn + { + { major } { 专业 }, + { student_id } { 学号 }, + { author } { 学生姓名 }, + { cosupervisor } { 协助指导教师 }, + { date } { 完成日期 }, + { orig_decl } { 本科生毕业\clist_item:Nn + \c__nwafu_bachelor_type_clist { + \l__nwafu_info_bachelor_type_int + }的独创性声明 }, + { auth_decl } { 关于本科生毕业\clist_item:Nn + \c__nwafu_bachelor_type_clist { + \l__nwafu_info_bachelor_type_int + }知识产权的说明 } + } + { \__nwafu_define_name:nn ##1 } } - { \__nwafu_define_name:nn #1 } - }{ - \clist_map_inline:nn - { - { major } { 专业 }, - { student_id } { 学号 }, - { author } { 学生姓名 }, - { cosupervisor } { 协助指导教师 }, - { date } { 完成日期 }, - { orig_decl } { 本科生毕业\clist_item:Nn - \c__nwafu_bachelor_type_clist { - \l__nwafu_info_bachelor_type_int - }的独创性声明 }, - { auth_decl } { 关于本科生毕业\clist_item:Nn - \c__nwafu_bachelor_type_clist { - \l__nwafu_info_bachelor_type_int - }知识产权的说明 } - } - { \__nwafu_define_name:nn #1 } } +\__nwafu_define_name_const_zh: \clist_map_inline:nn { { supervisor } { 指导教师 } { Supervisor }, } { \__nwafu_define_name:nnn #1 } -\int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } +\cs_new_protected:Npn \__nwafu_define_name_const_zh_en: { - \clist_map_inline:nn - { - { major } { 学科专业 } { Major }, - { researchfield } { 研究方向 } { Research~ Field }, - { professionaltype } { 专业学位类型 } { Degree~ Type }, - { professionalfield } { 领域名称 } { Field }, - { author } { 论文作者 } { Candidate }, - { cosupervisor } { 联合指导教师 } { Co-Supervisor }, - { date } { 论文提交时间 } { Date~ of~ Submission }, - { abstract } { 摘 \quad 要 } { ABSTRACT }, - { keywords } { 关键字 } { KEYWORDS }, - { clc } { 分类号 } { CLC~ number: }, - { notation } { 主要符号对照表 } { List~ of~ Symbols } - } - { \__nwafu_define_name:nnn #1 } - }{ - \clist_map_inline:nn + \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { - { abstract } { 摘要 } { Abstract }, - { keywords } { 关键字 } { Keywords }, - { clc } { 分类号 } { CLC~ number }, + \clist_map_inline:nn + { + { major } { 学科专业 } { Major }, + { researchfield } { 研究方向 } { Research~ Field }, + { professionaltype } { 专业学位类型 } { Degree~ Type }, + { professionalfield } { 领域名称 } { Field }, + { author } { 论文作者 } { Candidate }, + { cosupervisor } { 联合指导教师 } { Co-Supervisor }, + { date } { 论文提交时间 } { Date~ of~ Submission }, + { abstract } { 摘 \quad 要 } { ABSTRACT }, + { keywords } { 关键字 } { KEYWORDS }, + { clc } { 分类号 } { CLC~ number: }, + { notation } { 主要符号对照表 } { List~ of~ Symbols } + } + { \__nwafu_define_name:nnn ##1 } + }{ + \clist_map_inline:nn + { + { abstract } { 摘要 } { Abstract }, + { keywords } { 关键字 } { Keywords }, + { clc } { 分类号 } { CLC~ number }, + } + { \__nwafu_define_name:nnn ##1 } } - { \__nwafu_define_name:nnn #1 } } +\__nwafu_define_name_const_zh_en: \clist_map_inline:nn { { proof } { 证明 } { Proof }, @@ -455,7 +483,6 @@ { amsmath, thmmarks } { ntheorem } } { \PassOptionsToPackage #1 } -\RequirePackage { etoolbox } \LoadClass { ctexbook } \RequirePackage { @@ -468,58 +495,63 @@ ntheorem, enumitem, graphicx, - longtable, - booktabs, caption, + bicaption, xcolor, } \cs_new_protected:Npn \__nwafu_check_package:nnn #1#2#3 { \@ifpackagelater {#1} {#2} - { } { \__nwafu_error:nnn { package-too-old } {#1} {#3} } + { } { \__nwafu_error:nnnn { package-too-old } { Package } {#1} {#3} } + } +\cs_new_protected:Npn \__nwafu_check_class:nnn #1#2#3 + { + \@ifclasslater {#1} {#2} + { } { \__nwafu_error:nnnn { package-too-old } { Class } {#1} {#3} } } \__nwafu_msg_new:nn { package-too-old } { - Package~ "#1"~ is~ too~ old. \\ - The~ nwafuthesis~ class~ only~ supports~ "#1"~ with~ a~ version \\ - higher~ than~ v#2. \\\\ - Please~ update~ an~ up-to-date~ version~ of~ it~ using~ your \\ - TeX~ package~ manager~ or~ from~ CTAN. + #1~ "#2"~ is~ too~ old. \\ + The~ nwafuthesis~ class~ only~ supports~ "#2" \\ + with~ a~ version~ higher~ than~ v#3. \\\\ + Please~ update~ an~ up-to-date~ version~ of~ it \\ + using~ your~ TeX~ package~ manager~ or~ from~ CTAN. } -\__nwafu_check_package:nnn { fontspec } { 2017/09/22 } { 2.6e } -\__nwafu_check_package:nnn { unicode-math } { 2017/11/18 } { 0.8i } +\__nwafu_check_class:nnn { ctexbook } { 2021/03/14 } { 2.5.6 } \sys_if_engine_xetex:T - { \__nwafu_check_package:nnn { xeCJK } { 2017/08/07 } { 3.5.0 } } -\sys_if_engine_luatex:T - { \__nwafu_check_package:nnn { xunicode-addon } { 2018/04/30 } { 3.7.1 } } -\int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } - { - \geometry - { - paper=a4paper, - top=3.1cm, - bottom=3.3cm, - left=2.6cm, - right=2.6cm, - headheight=0.8cm, - headsep=0.7cm, - footskip=1.4cm, - %includehead, - %includefoot, - } - }{ - \geometry + { \__nwafu_check_package:nnn { xeCJK } { 2020/05/01 } { 3.8.3 } } +\cs_new_protected:Npn \__nwafu_thesis_geometry: + { + \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { - paper=a4paper, - top=3.14cm, - bottom=3.8cm, - left=2.45cm, - right=2.45cm, - headheight=0.8cm, - headsep=0.63cm, - footskip=2.3cm, + \geometry + { + paper=a4paper, + top=3.1cm, + bottom=3.3cm, + left=2.6cm, + right=2.6cm, + headheight=0.8cm, + headsep=0.7cm, + footskip=1.4cm, + %includehead, + %includefoot, + } + }{ + \geometry + { + paper=a4paper, + top=3.14cm, + bottom=3.8cm, + left=2.45cm, + right=2.45cm, + headheight=0.8cm, + headsep=0.63cm, + footskip=2.3cm, + } } } +\__nwafu_thesis_geometry: \bool_if:NT \g__nwafu_draft_bool { \geometry { showframe } } \tl_new:N \g__nwafu_fontset_tl \tl_new:N \g__nwafu_cjk_fontset_tl @@ -550,11 +582,11 @@ \cs_new_protected:Npn \__nwafu_setmathfont:nn #1#2 { \__um_setmathfont:nn {#2} {#1} } \cs_new_protected:Npn \__nwafu_setCJKmainfont:nn #1#2 - { \__nwafu_set_family:nnn { \CJKrmdefault } {#2} {#1} } + { \__nwafu_set_family:xnn { \CJKrmdefault } {#2} {#1} } \cs_new_protected:Npn \__nwafu_setCJKsansfont:nn #1#2 - { \__nwafu_set_family:nnn { \CJKsfdefault } {#2} {#1} } + { \__nwafu_set_family:xnn { \CJKsfdefault } {#2} {#1} } \cs_new_protected:Npn \__nwafu_setCJKmonofont:nn #1#2 - { \__nwafu_set_family:nnn { \CJKttdefault } {#2} {#1} } + { \__nwafu_set_family:xnn { \CJKttdefault } {#2} {#1} } \cs_new_protected:Npn \__nwafu_set_cjk_font_hei:nn #1#2 { \__nwafu_set_family:nnn { nwafu@hei } {#2} {#1} } \cs_new_protected:Npn \nwafu@hei @@ -586,6 +618,7 @@ \cs_new_eq:NN \__nwafu_set_family:nnn \ctex_ltj_set_family:nnn \cs_new_eq:NN \__nwafu_switch_family:n \ctex_ltj_switch_family:n } +\cs_generate_variant:Nn \__nwafu_set_family:nnn { x } \cs_new_protected:Npn \__nwafu_set_font_helper:n #1 { \exp_args:Nc \RenewDocumentCommand { set #1 font } { O { } m O { } } @@ -623,7 +656,9 @@ \tl_set:Nn \g__nwafu_font_style_libertinus_bf_tl { Bold } \tl_set:Nn \g__nwafu_font_style_libertinus_it_tl { Italic } \tl_set:Nn \g__nwafu_font_style_libertinus_bfit_tl { BoldItalic } - \tl_set:Nn \g__nwafu_font_style_libertinus_bfsl_tl { BoldOblique } + \fontspec_font_if_exist:nTF { LibertinusSans-BoldOblique.otf } + { \tl_set:Nn \g__nwafu_font_style_libertinus_bfsl_tl { BoldOblique } } + { \tl_set:Nn \g__nwafu_font_style_libertinus_bfsl_tl { Bold } } } { \tl_set:Nn \g__nwafu_font_family_libertinus_serif_tl { libertinusserif } @@ -840,12 +875,7 @@ } \cs_new_protected:Npn \__nwafu_load_cjk_font_founder: { - \__nwafu_setCJKmainfont:nn { FZShuSong-Z01 } - { - UprightFont = *, - BoldFont = FZHei-B01, - ItalicFont = FZKai-Z03, - } + \__nwafu_setCJKmainfont:n { FZShuSong-Z01 } \__nwafu_setCJKsansfont:n { FZHei-B01 } \__nwafu_setCJKmonofont:n { FZFangSong-Z02 } \__nwafu_set_cjk_font_hei:n { FZHei-B01 } @@ -919,8 +949,8 @@ \__nwafu_set_cjk_font_hei:n { SimHei } \__nwafu_set_cjk_font_kai:n { KaiTi } } -\tl_new:N \l__nwafu_cjkfont_tl \tl_new:N \l__nwafu_font_tl +\tl_new:N \l__nwafu_cjkfont_tl \cs_new_protected:Npn \__nwafu_detect_platform: { \sys_if_platform_windows:TF @@ -943,17 +973,15 @@ { \file_if_exist:nTF { /System/Library/Fonts/Menlo.ttc } } \cs_new_protected:Npn \__nwafu_load_font: { - \tl_if_empty:NTF \g__nwafu_fontset_tl + \tl_if_empty:NT \g__nwafu_fontset_tl { \__nwafu_detect_platform: \tl_gset_eq:NN \g__nwafu_fontset_tl \l__nwafu_font_tl - }{ } - \tl_if_empty:NTF \g__nwafu_cjk_fontset_tl + \tl_if_empty:NT \g__nwafu_cjk_fontset_tl { \__nwafu_detect_platform: \tl_gset_eq:NN \g__nwafu_cjk_fontset_tl \l__nwafu_cjkfont_tl - }{ } \use:c { __nwafu_load_font_ \g__nwafu_fontset_tl : } \use:c { __nwafu_load_cjk_font_ \g__nwafu_cjk_fontset_tl : } @@ -1010,8 +1038,16 @@ } \cs_new:Npn \__nwafu_set_fullwidth_stop_catcode: { - \char_set_active_eq:nN { "3002 } \c__nwafu_fwid_full_stop_tl - \char_set_catcode_active:n { "3002 } + \char_set_active_eq:NN ^^^^3002 \c__nwafu_fwid_full_stop_tl + \char_set_catcode_active:N ^^^^3002 + \clist_map_inline:nn + { \c__nwafu_orig_decl_text_tl, \c__nwafu_auth_decl_text_tl } + { \tl_set_rescan:Nno ##1 { } {##1} } + } +\DeclareEmphSequence + { + \bfseries, + \upshape \CJKfamily { \CJKfamilydefault }, } \fancyhf { } \tl_new:N \l__nwafu_header_center_mark_tl @@ -1028,7 +1064,7 @@ \pagestyle { fancy } \cs_gset_eq:NN \nwafuhead\fancyhead \cs_gset_eq:NN \nwafufoot\fancyfoot -\RenewDocumentCommand{\frontmatter}{sO{Roman}} +\RenewDocumentCommand{\frontmatter}{s O{Roman}} { \IfBooleanTF{#1}{\clearpage}{\cleardoublepage} \@mainmatterfalse @@ -1039,8 +1075,9 @@ \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { \nwafuhead[EC]{\small \nouppercase{ - \c__nwafu_name_simp_tl \clist_item:Nn - \c__nwafu_thesis_type_clist { \g__nwafu_thesis_type_int } } + \c__nwafu_name_simp_tl + \clist_item:Nn \c__nwafu_thesis_type_clist + { \g__nwafu_thesis_type_int } } } }{ \nwafuhead[EC]{\small \nouppercase{ \leftmark } } @@ -1064,8 +1101,9 @@ \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { \nwafuhead[EC]{\small \nouppercase{ - \c__nwafu_name_simp_tl \clist_item:Nn - \c__nwafu_thesis_type_clist { \g__nwafu_thesis_type_int } } + \c__nwafu_name_simp_tl + \clist_item:Nn \c__nwafu_thesis_type_clist + { \g__nwafu_thesis_type_int } } } }{ \nwafuhead[EC]{\small \nouppercase{ \l__nwafu_info_title_tl } } @@ -1080,8 +1118,9 @@ \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { \small \nouppercase{ - \c__nwafu_name_simp_tl \clist_item:Nn - \c__nwafu_thesis_type_clist { \g__nwafu_thesis_type_int } } + \c__nwafu_name_simp_tl + \clist_item:Nn \c__nwafu_thesis_type_clist + { \g__nwafu_thesis_type_int } } }{ \small \nouppercase{ \l__nwafu_info_title_tl } } @@ -1105,8 +1144,9 @@ \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { \nwafuhead[EC]{\small \nouppercase{ - \c__nwafu_name_simp_tl \clist_item:Nn - \c__nwafu_thesis_type_clist { \g__nwafu_thesis_type_int } } + \c__nwafu_name_simp_tl + \clist_item:Nn \c__nwafu_thesis_type_clist + { \g__nwafu_thesis_type_int } } } }{ \nwafuhead[EC]{\small \nouppercase{ \leftmark } } @@ -1121,8 +1161,9 @@ \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { \small \nouppercase{ - \c__nwafu_name_simp_tl \clist_item:Nn - \c__nwafu_thesis_type_clist { \g__nwafu_thesis_type_int } } + \c__nwafu_name_simp_tl + \clist_item:Nn \c__nwafu_thesis_type_clist + { \g__nwafu_thesis_type_int } } }{ \small \nouppercase{ \leftmark } } @@ -1140,8 +1181,9 @@ \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { \nwafuhead[EC]{\small \nouppercase{ - \c__nwafu_name_simp_tl \clist_item:Nn - \c__nwafu_thesis_type_clist { \g__nwafu_thesis_type_int } } + \c__nwafu_name_simp_tl + \clist_item:Nn \c__nwafu_thesis_type_clist + { \g__nwafu_thesis_type_int } } } }{ \nwafuhead[EC]{\small \nouppercase{ \@chapapp } } @@ -1156,8 +1198,9 @@ \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { \small \nouppercase{ - \c__nwafu_name_simp_tl \clist_item:Nn - \c__nwafu_thesis_type_clist { \g__nwafu_thesis_type_int } } + \c__nwafu_name_simp_tl + \clist_item:Nn \c__nwafu_thesis_type_clist + { \g__nwafu_thesis_type_int } } }{ \small \nouppercase{ \@chapapp } } @@ -1175,8 +1218,9 @@ \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } { \nwafuhead[EC]{\small \nouppercase{ - \c__nwafu_name_simp_tl \clist_item:Nn - \c__nwafu_thesis_type_clist { \g__nwafu_thesis_type_int } } + \c__nwafu_name_simp_tl + \clist_item:Nn \c__nwafu_thesis_type_clist + { \g__nwafu_thesis_type_int } } } }{ \nwafuhead[EC]{\small \nouppercase{ \leftmark } } @@ -1200,91 +1244,95 @@ } } } -\int_compare:nNnTF{ \g__nwafu_thesis_type_int } < { 3 } +\cs_new_protected:Npn \__nwafu_ctexset_caption: { - \keys_set:nn { ctex } + \int_compare:nNnTF{ \g__nwafu_thesis_type_int } < { 3 } { - secnumdepth = 3, - chapter = - { - pagestyle = fancy, - aftername = \hspace*{1.0\ccwd}, - format = \zihao{3} \normalfont \nwafu@hei \bfseries \centering, - beforeskip = 1.47\baselineskip, - afterskip = 1.24\baselineskip, - number = \__nwafu_arabic:n { chapter }, - fixskip = true - }, - section = + \keys_set:nn { ctex } { - format = \zihao{-3} \normalfont \nwafu@hei \bfseries \raggedright, - beforeskip = 1.09\baselineskip, - afterskip = 0.80\baselineskip, - fixskip = true - }, - subsection = - { - format = \zihao{4} \normalfont \nwafu@hei \bfseries \raggedright, - beforeskip = 0.80\baselineskip, - fixskip = true - }, - subsubsection = - { - format = \zihao{-4} \normalfont \nwafu@hei \bfseries \raggedright, - beforeskip = 0.40\baselineskip, - afterskip = 0.40\baselineskip, - fixskip = true + secnumdepth = 3, + chapter = + { + pagestyle = fancy, + aftername = \hspace*{1.0\ccwd}, + format = \zihao{3} \normalfont \nwafu@hei \bfseries \centering, + beforeskip = 1.47\baselineskip, + afterskip = 1.24\baselineskip, + number = \__nwafu_arabic:n { chapter }, + fixskip = true + }, + section = + { + format = \zihao{-3} \normalfont \nwafu@hei \bfseries \raggedright, + beforeskip = 1.09\baselineskip, + afterskip = 0.80\baselineskip, + fixskip = true + }, + subsection = + { + format = \zihao{4} \normalfont \nwafu@hei \bfseries \raggedright, + beforeskip = 0.80\baselineskip, + fixskip = true + }, + subsubsection = + { + format = \zihao{-4} \normalfont \nwafu@hei \bfseries \raggedright, + beforeskip = 0.40\baselineskip, + afterskip = 0.40\baselineskip, + fixskip = true + } } - } - }{ - \keys_set:nn { ctex } - { - secnumdepth = 3, - chapter = - { - pagestyle = fancy, - name = { \bool_if:NT \l__nwafu_withchap_bool {第}, - \bool_if:NT \l__nwafu_withchap_bool {章} }, - number = \__nwafu_arabic:n { chapter }, - aftername = \hspace*{\ccwd}, - format = \zihao{3} \normalfont \nwafu@hei \bfseries \centering, - beforeskip = 0.25\baselineskip, - afterskip = 0.65\baselineskip, - fixskip = true - }, - section = - { - aftername = \hspace*{0.5\ccwd}, - format = \zihao{4} \normalfont \nwafu@hei \bfseries \raggedright, - beforeskip = 0.60\baselineskip, - afterskip = 0.65\baselineskip, - fixskip = true, - afterindent = true, - }, - subsection = - { - aftername = \hspace*{0.5\ccwd}, - format = \zihao{-4} \normalfont \nwafu@hei \bfseries, - beforeskip = 0.60\baselineskip, - afterskip = 0.65\baselineskip, - fixskip = true, - afterindent = true, - % indent = 2\ccwd, - }, - subsubsection = + }{ + \keys_set:nn { ctex } { - name = {(,)}, - aftername = \hspace*{0.5\ccwd}, - number = \__nwafu_arabic:n { subsubsection }, - format = \zihao{-4} \normalfont, - beforeskip = 0.60\baselineskip, - afterskip = 0.65\baselineskip, - fixskip = true, - % afterindent = true, - indent = 2\ccwd, + secnumdepth = 3, + chapter = + { + pagestyle = fancy, + name = { \bool_if:NT \l__nwafu_withchap_bool {第}, + \bool_if:NT \l__nwafu_withchap_bool {章} }, + number = \__nwafu_arabic:n { chapter }, + aftername = \hspace*{\ccwd}, + format = \zihao{3} \normalfont \nwafu@hei \bfseries \centering, + beforeskip = 0.25\baselineskip, + afterskip = 0.65\baselineskip, + fixskip = true + }, + section = + { + aftername = \hspace*{0.5\ccwd}, + format = \zihao{4} \normalfont \nwafu@hei \bfseries \raggedright, + beforeskip = 0.60\baselineskip, + afterskip = 0.65\baselineskip, + fixskip = true, + afterindent = true, + }, + subsection = + { + aftername = \hspace*{0.5\ccwd}, + format = \zihao{-4} \normalfont \nwafu@hei \bfseries, + beforeskip = 0.60\baselineskip, + afterskip = 0.65\baselineskip, + fixskip = true, + afterindent = true, + % indent = 2\ccwd, + }, + subsubsection = + { + name = {(,)}, + aftername = \hspace*{0.5\ccwd}, + number = \__nwafu_arabic:n { subsubsection }, + format = \zihao{-4} \normalfont, + beforeskip = 0.60\baselineskip, + afterskip = 0.65\baselineskip, + fixskip = true, + % afterindent = true, + indent = 2\ccwd, + } } } } +\__nwafu_ctexset_caption: \cs_new_protected:Npn \__nwafu_chapter:n #1 { \group_begin: @@ -1683,8 +1731,7 @@ \dim_set:Nn \l__nwafu_tmpt_dim {#1} \dim_add:Nn \l__nwafu_tmpt_dim {0.6em} \makebox[0cm][l]{\rule[-0.5ex]{\l__nwafu_tmpt_dim}{0.4 pt}} - {\hbox_to_wd:nn {\l__nwafu_tmpt_dim} { \hfil #2 \hfil }} - % \fbox[b]{\parbox {#1} { \centering #2 }} + \hbox_to_wd:nn {\l__nwafu_tmpt_dim} { \hfil #2 \hfil } } \cs_generate_variant:Nn \__nwafu_center_box:nn { Vn } \cs_new:Npn \__nwafu_fixed_width_box:nn #1#2 @@ -1843,12 +1890,12 @@ {1}{ \clist_set:Nx \l__nwafu_tmpa_clist { - \c__nwafu_name_major_tl, - \c__nwafu_name_researchfield_tl, - \c__nwafu_name_author_tl, - \c__nwafu_name_supervisor_tl, - \c__nwafu_name_cosupervisor_tl, - \c__nwafu_name_date_tl, + { \c__nwafu_name_major_tl }, + { \c__nwafu_name_researchfield_tl }, + { \c__nwafu_name_author_tl }, + { \c__nwafu_name_supervisor_tl }, + { \c__nwafu_name_cosupervisor_tl }, + { \c__nwafu_name_date_tl } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist \clist_set:Nx \l__nwafu_tmpb_clist @@ -1868,12 +1915,12 @@ {1}{ \clist_set:Nx \l__nwafu_tmpa_clist { - \c__nwafu_name_major_tl, - \c__nwafu_name_researchfield_tl, - \c__nwafu_name_author_tl, - \c__nwafu_name_supervisor_tl, - \c__nwafu_name_cosupervisor_tl, - \c__nwafu_name_date_tl, + { \c__nwafu_name_major_tl }, + { \c__nwafu_name_researchfield_tl }, + { \c__nwafu_name_author_tl }, + { \c__nwafu_name_supervisor_tl }, + { \c__nwafu_name_cosupervisor_tl }, + { \c__nwafu_name_date_tl, } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist \clist_set:Nx \l__nwafu_tmpb_clist @@ -1890,12 +1937,12 @@ {2}{ \clist_set:Nx \l__nwafu_tmpa_clist { - \c__nwafu_name_professionaltype_tl, - \c__nwafu_name_professionalfield_tl, - \c__nwafu_name_author_tl, - \c__nwafu_name_supervisor_tl, - \c__nwafu_name_cosupervisor_tl, - \c__nwafu_name_date_tl, + { \c__nwafu_name_professionaltype_tl }, + { \c__nwafu_name_professionalfield_tl }, + { \c__nwafu_name_author_tl }, + { \c__nwafu_name_supervisor_tl }, + { \c__nwafu_name_cosupervisor_tl }, + { \c__nwafu_name_date_tl } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist \clist_set:Nx \l__nwafu_tmpb_clist @@ -1914,13 +1961,13 @@ {3}{ \clist_set:Nx \l__nwafu_tmpa_clist { - \c__nwafu_name_department_tl, - \c__nwafu_name_major_tl, - \c__nwafu_name_enroll_tl\c__nwafu_name_class_id_tl, - \c__nwafu_name_author_tl, - \c__nwafu_name_supervisor_tl, - \c__nwafu_name_cosupervisor_tl, - \c__nwafu_name_date_tl, + { \c__nwafu_name_department_tl }, + { \c__nwafu_name_major_tl }, + { \c__nwafu_name_enroll_tl\c__nwafu_name_class_id_tl }, + { \c__nwafu_name_author_tl }, + { \c__nwafu_name_supervisor_tl }, + { \c__nwafu_name_cosupervisor_tl }, + { \c__nwafu_name_date_tl } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist \clist_set:Nx \l__nwafu_tmpb_clist @@ -1955,12 +2002,12 @@ {1}{ \clist_set:Nx \l__nwafu_tmpa_clist { - {\c__nwafu_name_major_en_tl{\l__nwafu_info_major_en_tl}}, - {\c__nwafu_name_researchfield_en_tl{\l__nwafu_info_researchfield_en_tl}}, - {\c__nwafu_name_author_en_tl{\l__nwafu_info_author_en_tl}}, - {\c__nwafu_name_supervisor_en_tl{\l__nwafu_info_supervisor_en_tl}}, - {\c__nwafu_name_cosupervisor_en_tl{\l__nwafu_info_cosupervisor_en_tl}}, - {\c__nwafu_name_date_en_tl{\l__nwafu_info_date_en_tl}}, + {\c__nwafu_name_major_en_tl{\l__nwafu_info_major_en_tl} }, + {\c__nwafu_name_researchfield_en_tl{\l__nwafu_info_researchfield_en_tl} }, + {\c__nwafu_name_author_en_tl{\l__nwafu_info_author_en_tl} }, + {\c__nwafu_name_supervisor_en_tl{\l__nwafu_info_supervisor_en_tl} }, + {\c__nwafu_name_cosupervisor_en_tl{\l__nwafu_info_cosupervisor_en_tl} }, + {\c__nwafu_name_date_en_tl{\l__nwafu_info_date_en_tl} } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist \dim_add:Nn \l__nwafu_tmpa_dim {2.5em} @@ -1968,12 +2015,12 @@ \flushleft \clist_set:Nx \l__nwafu_tmpa_clist { - \c__nwafu_name_major_en_tl, - \c__nwafu_name_researchfield_en_tl, - \c__nwafu_name_author_en_tl, - \c__nwafu_name_supervisor_en_tl, - \c__nwafu_name_cosupervisor_en_tl, - \c__nwafu_name_date_en_tl, + { \c__nwafu_name_major_en_tl }, + { \c__nwafu_name_researchfield_en_tl }, + { \c__nwafu_name_author_en_tl }, + { \c__nwafu_name_supervisor_en_tl }, + { \c__nwafu_name_cosupervisor_en_tl }, + { \c__nwafu_name_date_en_tl } } \clist_set:Nx \l__nwafu_tmpb_clist { @@ -2002,12 +2049,12 @@ {1}{ \clist_set:Nx \l__nwafu_tmpa_clist { - {\c__nwafu_name_major_en_tl{\l__nwafu_info_major_en_tl}}, - {\c__nwafu_name_researchfield_en_tl{\l__nwafu_info_researchfield_en_tl}}, - {\c__nwafu_name_author_en_tl{\l__nwafu_info_author_en_tl}}, - {\c__nwafu_name_supervisor_en_tl{\l__nwafu_info_supervisor_en_tl}}, - {\c__nwafu_name_cosupervisor_en_tl{\l__nwafu_info_cosupervisor_en_tl}}, - {\c__nwafu_name_date_en_tl{\l__nwafu_info_date_en_tl}}, + {\c__nwafu_name_major_en_tl{\l__nwafu_info_major_en_tl} }, + {\c__nwafu_name_researchfield_en_tl{\l__nwafu_info_researchfield_en_tl} }, + {\c__nwafu_name_author_en_tl{\l__nwafu_info_author_en_tl} }, + {\c__nwafu_name_supervisor_en_tl{\l__nwafu_info_supervisor_en_tl} }, + {\c__nwafu_name_cosupervisor_en_tl{\l__nwafu_info_cosupervisor_en_tl} }, + {\c__nwafu_name_date_en_tl{\l__nwafu_info_date_en_tl} } } \__nwafu_get_max_text_width:NN \l__nwafu_tmpa_dim \l__nwafu_tmpa_clist \dim_add:Nn \l__nwafu_tmpa_dim {2.5em} @@ -2015,12 +2062,12 @@ \flushleft \clist_set:Nx \l__nwafu_tmpa_clist { - \c__nwafu_name_major_en_tl, - \c__nwafu_name_researchfield_en_tl, - \c__nwafu_name_author_en_tl, - \c__nwafu_name_supervisor_en_tl, - \c__nwafu_name_cosupervisor_en_tl, - \c__nwafu_name_date_en_tl, + { \c__nwafu_name_major_en_tl }, + { \c__nwafu_name_researchfield_en_tl }, + { \c__nwafu_name_author_en_tl }, + { \c__nwafu_name_supervisor_en_tl }, + { \c__nwafu_name_cosupervisor_en_tl }, + { \c__nwafu_name_date_en_tl } } \clist_set:Nx \l__nwafu_tmpb_clist { @@ -2059,12 +2106,12 @@ \flushleft \clist_set:Nx \l__nwafu_tmpa_clist { - \c__nwafu_name_professionaltype_en_tl, - \c__nwafu_name_professionalfield_en_tl, - \c__nwafu_name_author_en_tl, - \c__nwafu_name_supervisor_en_tl, - \c__nwafu_name_cosupervisor_en_tl, - \c__nwafu_name_date_en_tl, + { \c__nwafu_name_professionaltype_en_tl }, + { \c__nwafu_name_professionalfield_en_tl }, + { \c__nwafu_name_author_en_tl }, + { \c__nwafu_name_supervisor_en_tl }, + { \c__nwafu_name_cosupervisor_en_tl }, + { \c__nwafu_name_date_en_tl } } \clist_set:Nx \l__nwafu_tmpb_clist { @@ -2450,14 +2497,18 @@ \UseInstance { nwafu / cover } { cover-vii-default } \restoregeometry } -\int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } +\cs_new_protected:Npn \__nwafu_declare_cover_i_template: { - \DeclareCoverTemplate { cover-i } - { logo, type, title, info } - }{ - \DeclareCoverTemplate { cover-i } - { id, logo, type, title, info } + \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } + { + \DeclareCoverTemplate { cover-i } + { logo, type, title, info } + }{ + \DeclareCoverTemplate { cover-i } + { id, logo, type, title, info } + } } +\__nwafu_declare_cover_i_template: \DeclareCoverTemplate { cover-ii } { type, title, info, department, nwafu } @@ -2491,129 +2542,137 @@ authorization-decl-sig, supervisor-decl-sig } -\int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } - { - \DeclareInstance { nwafu / cover } { cover-i-default } { cover-i } - { - bottom-skip = 0 pt plus 1.5 fill, - logo / content = \__nwafu_cover_logo:, - logo / bottom-skip = -45 pt plus 0.3 fill, - logo / align = center, - type / content = \__nwafu_cover_type:, - type / format = \sffamily \zihao { 0 },% \bfseries, - type / bottom-skip = -20 pt plus 0.3 fill, - type / align = center, - title / content = - \__nwafu_fixed_width_center_box:nn - { 0.9 \textwidth } { \l__nwafu_info_title_tl }, - title / format = \nwafu@hei \bfseries \zihao { 2 }, - title / bottom-skip = 80 pt plus 0.3 fill, - title / align = center, - info / content = \__nwafu_cover_info:, - info / format = \__nwafu_line_spread:n {1.05}\nwafu@hei \zihao { -3 }, - info / align = center, +\cs_new_protected:Npn \__nwafu_define_cover_i_entities: + { + \int_compare:nNnTF { \g__nwafu_thesis_type_int } < { 3 } + { + \DeclareInstance { nwafu / cover } { cover-i-default } { cover-i } + { + bottom-skip = 0 pt plus 1.5 fill, + logo / content = \__nwafu_cover_logo:, + logo / bottom-skip = -45 pt plus 0.3 fill, + logo / align = center, + type / content = \__nwafu_cover_type:, + type / format = \sffamily \zihao { 0 },% \bfseries, + type / bottom-skip = -20 pt plus 0.3 fill, + type / align = center, + title / content = + \__nwafu_fixed_width_center_box:nn + { 0.9 \textwidth } { \l__nwafu_info_title_tl }, + title / format = \nwafu@hei \bfseries \zihao { 2 }, + title / bottom-skip = 80 pt plus 0.3 fill, + title / align = center, + info / content = \__nwafu_cover_info:, + info / format = \__nwafu_line_spread:n {1.05}\nwafu@hei \zihao { -3 }, + info / align = center, + } + }{ + \DeclareInstance { nwafu / cover } { cover-i-default } { cover-i } + { + bottom-skip = 0 pt plus 0.5 fill, + id / content = \__nwafu_cover_id:, + id / format = \bfseries\zihao { 4 }, + id / bottom-skip = 0 pt plus 0.3 fill, + id / align = right, + logo / content = \__nwafu_cover_logo:, + logo / bottom-skip = -30 pt,% plus 0.3 fill, + logo / align = center, + type / content = \__nwafu_cover_type:, + type / format = \bfseries\nwafu@kai\zihao { 1 }, + type / bottom-skip = -20 pt plus 0.3 fill, + type / align = center, + title / content = + \__nwafu_fixed_width_center_box:nn + { 0.9 \textwidth } { \l__nwafu_info_title_tl }, + title / format = \nwafu@hei \bfseries\zihao { 2 }, + title / bottom-skip = 80 pt plus 0.3 fill, + title / align = center, + info / content = \__nwafu_cover_info:, + info / format = \rmfamily\zihao { 3 }, + info / align = center, + } } - }{ - \DeclareInstance { nwafu / cover } { cover-i-default } { cover-i } - { - bottom-skip = 0 pt plus 0.5 fill, - id / content = \__nwafu_cover_id:, - id / format = \bfseries\zihao { 4 }, - id / bottom-skip = 0 pt plus 0.3 fill, - id / align = right, - logo / content = \__nwafu_cover_logo:, - logo / bottom-skip = -30 pt,% plus 0.3 fill, - logo / align = center, - type / content = \__nwafu_cover_type:, - type / format = \bfseries\nwafu@kai\zihao { 1 }, - type / bottom-skip = -20 pt plus 0.3 fill, - type / align = center, - title / content = - \__nwafu_fixed_width_center_box:nn - { 0.9 \textwidth } { \l__nwafu_info_title_tl }, - title / format = \nwafu@hei \bfseries\zihao { 2 }, - title / bottom-skip = 80 pt plus 0.3 fill, - title / align = center, - info / content = \__nwafu_cover_info:, - info / format = \rmfamily\zihao { 3 }, - info / align = center, - } - } -\int_case:nn {\g__nwafu_thesis_type_int} - { - {1}{ - \DeclareInstance { nwafu / cover } { cover-ii-default } { cover-ii } - { - bottom-skip = 0 pt plus 0.5 fill, - type / content = - \__nwafu_fixed_width_center_box:nn { 0.7\textwidth } { - Thesis~Submitted~to~\c__nwafu_name_en_tl\\ - in~Partial~Fulfillment~of~the~Requirements\\ - for~Degree~of\\ - Doctor~of~Philosophy - }, - type / format = \__nwafu_line_spread:n {1.22} \zihao { -3 }, - type / bottom-skip = 42 pt,% plus 0.3 fill, - type / align = center, - title / content = \l__nwafu_info_title_en_tl, - title / format = \__nwafu_line_spread:n {0.90} - \zihao { 1 } \bfseries, - title / bottom-skip = 35 pt,% plus 0.3 fill, - title / align = center, - info / content = \__nwafu_cover_info_en:, - info / format = \__nwafu_line_spread:n {1.12} \zihao { -3 }, - info / bottom-skip = 72 pt,% plus 0.3 fill, - info / align = center, - department / content = \l__nwafu_info_department_en_tl, - department / format = \zihao { -3 }, - department / bottom-skip = -32 pt,% plus 0.3 fill, - department / align = center, - nwafu / content = \c__nwafu_name_en_tl, - nwafu / format = \zihao { -3 }, - nwafu / align = center, - } - } - {2}{ - \DeclareInstance { nwafu / cover } { cover-ii-default } { cover-ii } - { - bottom-skip = 0 pt plus 0.5 fill, - type / content = - \__nwafu_fixed_width_center_box:nn { 0.7\textwidth } { - Thesis~Submitted~to~\c__nwafu_name_en_tl\\ - in~Partial~Fulfillment~of~the~Requirements\\ - for~Degree~of\\ - Master~of - \int_case:nn {\l__nwafu_info_degree_type_int} - { - {1}{ - \__nwafu_text_uline:V \l__nwafu_info_mastertype_en_tl - } - {2}{ - \__nwafu_text_uline:V \l__nwafu_info_professionaltype_en_tl - } - } - }, - type / format = \__nwafu_line_spread:n {1.22} \zihao { -3 }, - type / bottom-skip = 42 pt,% plus 0.3 fill, - type / align = center, - title / content = \l__nwafu_info_title_en_tl, - title / format = \__nwafu_line_spread:n {0.90} \zihao { 1 } \bfseries, - title / bottom-skip = 35 pt,% plus 0.3 fill, - title / align = center, - info / content = \__nwafu_cover_info_en:, - info / format = \__nwafu_line_spread:n {1.12} \zihao { -3 }, - info / bottom-skip = 72 pt,% plus 0.3 fill, - info / align = center, - department / content = \l__nwafu_info_department_en_tl, - department / format = \zihao { -3 }, - department / bottom-skip = -32 pt,% plus 0.3 fill, - department / align = center, - nwafu / content = \c__nwafu_name_en_tl, - nwafu / format = \zihao { -3 }, - nwafu / align = center, - } - } } +\__nwafu_define_cover_i_entities: +\cs_new_protected:Npn \__nwafu_define_cover_ii_entities: + { + \int_case:nn {\g__nwafu_thesis_type_int} + { + {1}{ + \DeclareInstance { nwafu / cover } { cover-ii-default } { cover-ii } + { + bottom-skip = 0 pt plus 0.5 fill, + type / content = + \__nwafu_fixed_width_center_box:nn { 0.7\textwidth } { + Thesis~Submitted~to~\c__nwafu_name_en_tl\\ + in~Partial~Fulfillment~of~the~Requirements\\ + for~Degree~of\\ + Doctor~of~Philosophy + }, + type / format = \__nwafu_line_spread:n {1.22} \zihao { -3 }, + type / bottom-skip = 42 pt,% plus 0.3 fill, + type / align = center, + title / content = \l__nwafu_info_title_en_tl, + title / format = \__nwafu_line_spread:n {0.90} + \zihao { 1 } \bfseries, + title / bottom-skip = 35 pt,% plus 0.3 fill, + title / align = center, + info / content = \__nwafu_cover_info_en:, + info / format = \__nwafu_line_spread:n {1.12} \zihao { -3 }, + info / bottom-skip = 72 pt,% plus 0.3 fill, + info / align = center, + department / content = \l__nwafu_info_department_en_tl, + department / format = \zihao { -3 }, + department / bottom-skip = -32 pt,% plus 0.3 fill, + department / align = center, + nwafu / content = \c__nwafu_name_en_tl, + nwafu / format = \zihao { -3 }, + nwafu / align = center, + } + } + {2}{ + \DeclareInstance { nwafu / cover } { cover-ii-default } { cover-ii } + { + bottom-skip = 0 pt plus 0.5 fill, + type / content = + \__nwafu_fixed_width_center_box:nn { 0.7\textwidth } { + Thesis~Submitted~to~\c__nwafu_name_en_tl\\ + in~Partial~Fulfillment~of~the~Requirements\\ + for~Degree~of\\ + Master~of + \int_case:nn {\l__nwafu_info_degree_type_int} + { + {1}{ + \__nwafu_text_uline:V \l__nwafu_info_mastertype_en_tl + } + {2}{ + \__nwafu_text_uline:V \l__nwafu_info_professionaltype_en_tl + } + } + }, + type / format = \__nwafu_line_spread:n {1.22} \zihao { -3 }, + type / bottom-skip = 42 pt,% plus 0.3 fill, + type / align = center, + title / content = \l__nwafu_info_title_en_tl, + title / format = \__nwafu_line_spread:n {0.90} \zihao { 1 } \bfseries, + title / bottom-skip = 35 pt,% plus 0.3 fill, + title / align = center, + info / content = \__nwafu_cover_info_en:, + info / format = \__nwafu_line_spread:n {1.12} \zihao { -3 }, + info / bottom-skip = 72 pt,% plus 0.3 fill, + info / align = center, + department / content = \l__nwafu_info_department_en_tl, + department / format = \zihao { -3 }, + department / bottom-skip = -32 pt,% plus 0.3 fill, + department / align = center, + nwafu / content = \c__nwafu_name_en_tl, + nwafu / format = \zihao { -3 }, + nwafu / align = center, + } + } + } + } +\__nwafu_define_cover_ii_entities: \DeclareInstance { nwafu / cover } { cover-iii-default } { cover-iii } { top-skip = -55 pt plus 0.1 fill, @@ -2850,7 +2909,7 @@ \tableofcontents } } -\AfterEndPreamble +\ctex_after_end_preamble:n { \bool_if:NT \l__nwafu_auto_make_cover_bool { @@ -3164,11 +3223,11 @@ \vspace{32bp}{\zihao{-4}\nwafu@hei\bfseries\centerline{#1}}\par\vspace{14bp} } \newlist{publications}{enumerate}{1} -\setlist[publications]{label=[\arabic*],align=left,nosep,itemsep=6bp, - leftmargin=10mm,before=\zihao{-4},resume} +\setlist[publications]{label=[\arabic*],align=left,nosep,itemsep=3bp, + leftmargin=10mm,before=\zihao{5},resume} \newlist{achievements}{enumerate}{1} -\setlist[achievements]{label=[\arabic*],align=left,nosep,itemsep=6bp, - leftmargin=10mm,before=\zihao{-4}} +\setlist[achievements]{label=[\arabic*],align=left,nosep,itemsep=3bp, + leftmargin=10mm,before=\zihao{5}} \def\publicationskip{\bigskip\bigskip} \clist_new:N \l__nwafu_bib_resource_clist \keys_define:nn { nwafu / style } @@ -3183,363 +3242,16 @@ } \cs_new_protected:Npn \__nwafu_biblatex_pre_setup: { - \__nwafu_pass_options_to_biblatex:n { style = gb7714-2015ay } - \__nwafu_pass_options_to_biblatex:n { backend = biber, sortlocale=zh__pinyin, - gbtype=false, maxbibnames=99, maxcitenames=2, mincitenames=1, - gbpub=false, uniquename=false, uniquelist=false, gbnamefmt=lowercase, - doi=false, isbn=false, gbfieldtype=true, gbpunctin=false, - } + \__nwafu_pass_options_to_biblatex:n { style = gb7714-NWAFU } + \__nwafu_pass_options_to_biblatex:n { backend = biber, } } \cs_new_protected:Npn \__nwafu_biblatex_post_setup: { - \__nwafu_biblatex_misc: \clist_map_function:NN \l__nwafu_bib_resource_clist \addbibresource - \__nwafu_biblatex_allow_url_break: \defbibheading { bibliography } [ \bibname ] { \__nwafu_chapter:n {##1} } } \cs_new_protected:Npn \__nwafu_pass_options_to_biblatex:n #1 { \PassOptionsToPackage {#1} { biblatex } } -\cs_new:Npn \__nwafu_biblatex_misc: - { - \DefineBibliographyExtras{english}{\renewcommand*{\bibrangedash}{$\sim$}} - \newcommand\nwafu@font@bib{\__nwafu_line_spread:n {1.3}\zihao{5}} - \renewcommand{\bibfont}{\nwafu@font@bib} - \DeclareFieldFormat[article]{journaltitle}{\iffieldequalstr{userd}{chinese}{##1}{\textit{##1}}\isdot} - \renewcommand{\postnotedelim}{\addcolon\space} - \DeclareFieldFormat{postnote}{##1} - \DeclareDelimFormat[cite,parencite,pagescite]{nameyeardelim}{\space} - \DeclareDelimFormat[textcite]{nameyeardelim}{\space} - \DeclareDelimFormat[bib,biblist]{nameyeardelim}{\addperiod\space} - \renewcommand*{\finentrypunct}{} - \DefineBibliographyStrings{english}{ - andincitecn = {和}, - andincite = {and}, - mathesiscn={[硕士学位论文]}, - phdthesiscn={[博士学位论文]}, - in={In:\addspace}, - incn={见:\addspace}, - } - \DeclareDelimFormat{finalnamedelim}{% - \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}% - \edef\userfieldabcde{userd}% - \ifcurrentname{translator}{\edef\userfieldabcde{usere}}{}% - \ifcurrentname{editor}{\edef\userfieldabcde{userc}}{}% - \ifcurrentname{author}{\edef\userfieldabcde{userf}}{}% - \ifcurrentname{bookauthor}{\edef\userfieldabcde{userb}}{}% - \ifcase\value{gbcitelocalcase}% - \iffieldequalstr{\userfieldabcde}{chinese}{\bibstring{andincitecn}}{}% - \iffieldequalstr{\userfieldabcde}{korean}{\bibstring{andkr}}{}% - \iffieldequalstr{\userfieldabcde}{japnese}{\bibstring{andjp}}{}% - \iffieldequalstr{\userfieldabcde}{english}{\addspace\bibstring{andincite}\addspace}{}% - \iffieldequalstr{\userfieldabcde}{french}{\addspace\bibstring{and}\addspace}{}% - \iffieldequalstr{\userfieldabcde}{russian}{\addspace\bibstring{and}\addspace}{}% - \or% - \bibstring{andincitecn}% - \or% - \addspace\bibstring{andincite}\addspace% - \fi - } - \DeclareDelimFormat{strandothersdelim}{% - \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}% - %\addspace% - \edef\userfieldabcde{userd}% - \ifcurrentname{translator}{\edef\userfieldabcde{usere}}{}% - \ifcurrentname{editor}{\edef\userfieldabcde{userc}}{}% - \ifcurrentname{author}{\edef\userfieldabcde{userf}}{}% - \ifcurrentname{bookauthor}{\edef\userfieldabcde{userb}}{}% - \ifcase\value{gbcitelocalcase}% - \iffieldequalstr{\userfieldabcde}{chinese}{\bibstring{andothersincitecn}}{}% - \iffieldequalstr{\userfieldabcde}{korean}{\bibstring{andotherskr}}{}% - \iffieldequalstr{\userfieldabcde}{japnese}{\bibstring{andothersjp}}{}% - \iffieldequalstr{\userfieldabcde}{english}{\bibstring{andothersincite}}{}% - \iffieldequalstr{\userfieldabcde}{french}{\bibstring{andothers}}{}% - \iffieldequalstr{\userfieldabcde}{russian}{\bibstring{andothers}}{}% - \or% - \bibstring{andothersincitecn}% - \or% - \bibstring{andothersincite}% - \fi - } - \AtEveryCitekey{% - \iffieldequalstr{userf}{chinese}{\renewcommand*{\andothersdelim}{}}%\addthinspace - {\renewcommand*{\andothersdelim}{\addspace}}% - } - \renewbibmacro*{cite:extradate}{% - \iffieldundef{extradate} {} - {\printtext[bibhyperref]{\printlabeldateextra}}%\printfield{extradate} - } - \renewbibmacro*{date+extradate}{% - \iffieldundef{labelyear}{}% - {\ifboolexpr{% - test {\ifentrytype{patent}} - or - (test {\ifentrytype{newspaper}} )% - }% - {\printtext{\blx@isodate{}{}}}% - {\printtext{% - \iflabeldateisdate - {\printdateextra} - {\printlabeldateextra} - } - }% - }% - } - \newbibmacro*{origdate+extradate}{% - \printtext{\printorigdate}% - } - \renewbibmacro*{bytranslator+others}{% - \ifnameundef{translator} - {} - {\printnames[bytranslator]{translator}% - \usebibmacro{bytranslator+othersstrg}%“译”的位置换到下面来,即放到译者后面。 - \newunit - }% - \usebibmacro{withothers}% - \ifboolexpr{% - test {\iffieldundef{origyear}} or test {\ifnameundef{translator}}%% - }{}{\printtext{\printdate}}% - } - \renewbibmacro*{url+urldate}{% - \usebibmacro{url}% - \iffieldundef{urlyear}% - {} - {\usebibmacro{urldate} - } - } - \DeclareFieldFormat{addnumflag}{% - \ifentrytype{newspaper} - {\setunit{\addcomma\addspace}\printtext{##1}} - {\nobreak\printtext{(}\nobreak ##1\nobreak\printtext{)}} - } - \renewbibmacro*{patenttitle}{%原输出来自biblatex.def文件 - \ifboolexpr{% - test{\iffieldundef{title}}% - and% - test{\iffieldundef{subtitle}}% - }% - {}% - { - \printtext[title]{\bibtitlefont% - \printfield[titlecase]{title}% - \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题 - {} - { - \setunit{\subtitlepunct}% - \printfield[titlecase]{subtitle}}% - \iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格 - {\setunit{\subtitlepunct}\printfield{titleaddon}}% - \setunit{\adddot\addspace}\printfield{number}%写专利号 - \iftoggle{bbx:gbtype}{\printfield[gbtypeflag]{usera}}{}% - }% - }% - } - \renewbibmacro*{name:andothers}{% - \ifboolexpr{ - test {\ifnumequal{\value{listcount}}{\value{liststop}}} - and - test \ifmorenames - }{\ifnumgreater{\value{liststop}}{1}% - {\finalandcomma}% - {}% - \printdelim{andothersdelim}\printdelim{strandothersdelim}% - }{%当是译者的时候需要特殊处理 - \ifcurrentname{translator}{\addcomma}{}% - } - } - \DeclareFieldFormat{edition}{% - \testCJKfirst{userd}% - \iftoggle{ifCJKforgbt}% - {\ifinteger{##1}% - {\printtext{\bibstring{serialcn}\zhnumber{##1}\str@edition}}% - {##1\isdot} - }% - {\ifinteger{##1}% - {\mkbibordedition{##1}~\bibstring{edition}}% - {##1\isdot} - } - } - \renewbibmacro*{author}{% - \ifboolexpr{ - test \ifuseauthor - and - not test {\ifnameundef{author}} - }{\usebibmacro{bbx:dashcheck} - {\printnames{author}\setunit{\printdelim{nameyeardelim}}%把标点也带上 - }{\usebibmacro{bbx:savehash}% - \printnames{author}% - \iffieldundef{authortype} - {\setunit{\printdelim{nameyeardelim}}} - {\setunit{\printdelim{authortypedelim}}} - }% - \iffieldundef{authortype} - {} - {\usebibmacro{authorstrg}% - \setunit{\printdelim{nameyeardelim}} - } - }% - {\global\undef\bbx@lasthash - \usebibmacro{labeltitle}% - \setunit*{\printdelim{nonameyeardelim}} - }% - \ifboolexpr{% - test {\iffieldundef{origyear}} or test {\ifnameundef{translator}}% - }{\usebibmacro{date+extradate}}% - {\usebibmacro{origdate+extradate}}% - } - \DeclareBibliographyDriver{book}{%源来自standard.bbx文件 - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author/editor+others/translator+others}% - \ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 - \usebibmacro{maintitle+title}% - \iftoggle{bbx:gbstrict}{}{% - \newunit% - \printlist{language}% - \newunit\newblock% - \usebibmacro{byauthor}% - \newunit\newblock% - }% - \newunit% - \printfield{edition}% - \newunit% - \usebibmacro{byeditor+others}% - \newunit\newblock% - \iftoggle{bbx:gbstrict}{}{% - \iffieldundef{maintitle}% - {% - \printfield{volume}% - \printfield{part}% - }% - {}% - \newunit% - \printfield{volumes}% - \newunit\newblock% - \usebibmacro{series+number}% - }% - \newunit\newblock% - \usebibmacro{publisher+location+date}% - \usebibmacro{chapter+pages}% - \iffieldundef{url}{}{%当没有网址时也不输出 - \usebibmacro{modifydate}%带括号的修改或更新日期, - }% - \usebibmacro{doi+eprint+url}%从下面移动到上面来,因为gbt2015的url需直接放在页码后面。 - \newunit\newblock% - \printfield{pagetotal}% - \newunit\newblock% - \iftoggle{bbx:isbn}% - {\printfield{isbn}} - {}% - \newunit\newblock% - \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock - \usebibmacro{pageref}% - \newunit\newblock% - \iftoggle{bbx:related}% - {\usebibmacro{related:init}% - \usebibmacro{related}% - }{}% - \usebibmacro{finentry} - } - \DeclareBibliographyDriver{online}{%源来自standard.BBX - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author/editor+others/translator+others}% - \ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 - \usebibmacro{title}% - \iftoggle{bbx:gbstrict}{}{% - \newunit% - \printlist{language}% - \newunit\newblock - \usebibmacro{byauthor}% - \newunit\newblock - \usebibmacro{byeditor+others}% - \newunit\newblock - \printfield{note} - }% - \newunit - \printfield{version}% - \newunit\newblock - \printlist{institution}% - \newunit\newblock - \ifboolexpr{% - test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{eventday}}% - }{\usebibmacro{date}}% - \usebibmacro{url+urldate}%从下面移上来 - \newunit\newblock - \iftoggle{bbx:eprint} - {\usebibmacro{eprint}} - {}% - \newunit\newblock - \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock - \usebibmacro{pageref}% - \newunit\newblock - \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{finentry} - } - \DeclareBibliographyDriver{patent}{%源来自standard.BBX - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author}% - \ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 - \usebibmacro{patenttitle}%给出专利专用的标题输出 - \iftoggle{bbx:gbstrict}{}{% - \newunit% - \printlist{language}% - \newunit\newblock - \usebibmacro{byauthor} - }% - \newunit\newblock - \printfield{type}% - \setunit*{\addspace}% - \iflistundef{location} - {} - {\setunit*{\addspace}% - \printtext{%[parens] - \printlist[][-\value{listtotal}]{location}} - }% - \newunit\newblock - \usebibmacro{byholder}% - \newunit\newblock - \printfield{note}% - \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock - \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock - \usebibmacro{pageref}% - \newunit\newblock - \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related} - } - {}% - \usebibmacro{finentry} - } - \setlength{\bibitemsep}{2pt} - \setlength{\bibnamesep}{0ex} - \setlength{\bibinitsep}{0ex} - \setlength{\bibitemindent}{-2\ccwd}% bibitemindent表示一条文献中第一行相对后面各行的缩进 - \setlength{\bibhang}{2\ccwd} % 表示的各行起始位置到页边的距离 - } -\cs_new:Npn \__nwafu_biblatex_allow_url_break: - { - \int_set_eq:NN \c@biburlucpenalty \c_one_int - \int_set_eq:NN \c@biburlnumpenalty \c_one_int - \int_set_eq:NN \c@biburllcpenalty \c_one_int - } -\cs_new:Npn \__nwafu_set_cite_style_author_year: - { - \NAT@numbersfalse - \cs_set_eq:NN \NAT@open \c__nwafu_fwid_left_paren_tl - \cs_set_eq:NN \NAT@close \c__nwafu_fwid_right_paren_tl - \cs_set_eq:NN \NAT@sep \c__nwafu_fwid_semicolon_tl - \cs_set_eq:NN \NAT@aysep \c__nwafu_fwid_comma_tl - \cs_set_eq:NN \NAT@yrsep \c__nwafu_ideo_comma_tl - } \skip_set:Nn \parskip { 0pt plus 2pt minus 1pt } \skip_set:Nn \intextsep { 14pt plus 2pt minus 2pt } \skip_set:Nn \textfloatsep { 16pt plus 2pt minus 4pt } @@ -3558,12 +3270,9 @@ { bullet } { \textbullet }, { endash } { \normalfont\bfseries\textendash }, { asterisk } { \textasteriskcentered }, - { arabic } { \bool_if:NTF \l__nwafu_withchap_bool - { \arabic*. }{ (\arabic*) } }, - { alph } { \bool_if:NTF \l__nwafu_withchap_bool - { \alph*. }{ (\alph*) } }, - { roman } { \bool_if:NTF \l__nwafu_withchap_bool - { \roman*. }{ (\roman*) } }, + { arabic } { (\arabic*) }, + { alph } { (\alph*) }, + { roman } { (\roman*) }, { alph } { (\alph*) }, { roman } { \roman*. }, { outline } { \upshape\ding{111} } |