diff --git a/CCNUthesis.cls b/CCNUthesis.cls index e3fef67..80e5fa9 100644 --- a/CCNUthesis.cls +++ b/CCNUthesis.cls @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\ProvidesExplClass {CCNUthesis} {2024-03-27} {v1.3.1} +\ProvidesExplClass {CCNUthesis} {2024-04-03} {v1.4.0} {Thesis template for Central China Normal University} \RequirePackage { l3keys2e, xparse } @@ -3835,105 +3835,227 @@ \ctex_after_end_preamble:n { \begin{titlepage} - \int_compare:nNnTF { \g__ccnu_thesis_type_int } = {3} + \int_case:nn { \g__ccnu_thesis_type_int } { - \__ccnu_cover_bachelor: - \newpage - \bool_if:NTF \g__ccnu_blind_version_bool - { - \str_case:VnF \g__ccnu_blind_version_remove_content_str - { - { partial-schoolname } + {3} { \__ccnu_titlepage_bachelor: } + {2} { \__ccnu_titlepage_master: } + {1} { \__ccnu_titlepage_doctor: } + } + \end{titlepage} + } +\cs_new:Npn \__ccnu_titlepage_bachelor: + { + \__ccnu_cover_bachelor: + \newpage + \bool_if:NTF \g__ccnu_blind_version_bool + { + \str_case:VnF \g__ccnu_blind_version_remove_content_str + { + { partial-schoolname } + { + \pagestyle { empty } + % 版权页 + \begin{tikzpicture} [remember~picture, overlay] + \node at (current~page.center) { - \pagestyle { empty } - % 版权页 - \begin{tikzpicture} [remember~picture, overlay] - \node at (current~page.center) - { - \includegraphics - [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] - { copyright / Originality_Copyright_bachelor_remove_partial_schoolname.pdf } - }; - \end{tikzpicture} - } - { all-schoolname } + \includegraphics + [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] + { copyright / Originality_Copyright_bachelor_remove_partial_schoolname.pdf } + }; + \end{tikzpicture} + } + { all-schoolname } + { + \pagestyle { empty } + % 版权页 + \begin{tikzpicture} [remember~picture, overlay] + \node at (current~page.center) { - \pagestyle { empty } - % 版权页 - \begin{tikzpicture} [remember~picture, overlay] - \node at (current~page.center) - { - \includegraphics - [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] - { copyright / Originality_Copyright_bachelor_remove_all_schoolname.pdf } - }; - \end{tikzpicture} - } - } - {} % 都不是的话就默认去掉整个版权页 - } - { - \pagestyle { empty } - % 版权页 - \begin{tikzpicture} [remember~picture, overlay] - \node at (current~page.center) - { - \includegraphics - [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] - { copyright / Originality_Copyright_bachelor.pdf } - }; - \end{tikzpicture} - } - } - { - \bool_lazy_and:nnTF - { \bool_if_p:N \g__ccnu_head_scope_all_bool } - { \bool_if_p:N \g__ccnu_showhead_bool } - { - \int_compare:nNnTF { \g__ccnu_thesis_type_int } = {2} - { \pagestyle { masterplain-head-nopage } } - { \pagestyle { doctorplain-head-nopage } } - } - { - \pagestyle { empty } - } - \__ccnu_cover_i_master_doctor: - \str_case:VnTF \g__ccnu_type_version_str - { - { print-master-twoside } {} - { print-doctor } {} - } - { \__ccnu_new_blank_page: } - % {} - { \newpage } - \__ccnu_cover_ii_master_doctor: - \newpage - \__ccnu_cover_iii_master_doctor: - \bool_if:NF \g__ccnu_blind_version_bool + \includegraphics + [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] + { copyright / Originality_Copyright_bachelor_remove_all_schoolname.pdf } + }; + \end{tikzpicture} + } + } + {} % 都不是的话就默认去掉整个版权页 + } + { + \pagestyle { empty } + % 版权页 + \begin{tikzpicture} [remember~picture, overlay] + \node at (current~page.center) { - \newpage - % 版权页 - \begin{tikzpicture} [remember~picture, overlay] + \includegraphics + [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] + { copyright / Originality_Copyright_bachelor.pdf } + }; + \end{tikzpicture} + } + } +\cs_new:Npn \__ccnu_titlepage_master: + { + \bool_lazy_and:nnTF + { \bool_if_p:N \g__ccnu_head_scope_all_bool } + { \bool_if_p:N \g__ccnu_showhead_bool } + { + \pagestyle { masterplain-head-nopage } + } + { + \pagestyle { empty } + } + \__ccnu_cover_i_master_doctor: + \str_case:VnTF \g__ccnu_type_version_str + { + { print-master-twoside } {} + { print-doctor } {} + } + { \__ccnu_new_blank_page: } + % {} + { \newpage } + \__ccnu_cover_ii_master_doctor: + \newpage + \__ccnu_cover_iii_master_doctor: + \bool_if:NTF \g__ccnu_blind_version_bool + { + \str_case:Vn \g__ccnu_blind_version_remove_content_str + { + { blind-schoolname } + { + \newpage + \pagestyle { empty } + % 版权页 + \begin{tikzpicture} [remember~picture, overlay] + \node at (current~page.center) + { + \includegraphics + [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] + { copyright / Originality_Copyright_master_doctor_blind.pdf } + }; + \end{tikzpicture} + } + } + } + { + \bool_if:NTF \g__ccnu_master_doctor_copyright_version_new_bool + { + \newpage + % 版权页 + \begin{tikzpicture} [remember~picture, overlay] + % \begin{pgfonlayer}{background} \node at (current~page.center) { \includegraphics - [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] - { copyright / Originality_Copyright_master_doctor.pdf } + % [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] + [ width = \textwidth ] + { copyright / Originality_Copyright_master_doctor_new.pdf } }; - \end{tikzpicture} - } - \str_case:VnTF \g__ccnu_type_version_str - { - { print-master-twoside } {} - { print-doctor } {} - } - { \__ccnu_new_blank_page: } - { \newpage \thispagestyle{empty} } - % {} - } - \end{titlepage} + % \end{pgfonlayer} + \end{tikzpicture} + } + { + \newpage + % 版权页 + \begin{tikzpicture} [remember~picture, overlay] + \node at (current~page.center) + { + \includegraphics + [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] + { copyright / Originality_Copyright_master_doctor_old.pdf } + }; + \end{tikzpicture} + } + } + \str_case:VnTF \g__ccnu_type_version_str + { + { print-master-twoside } {} + { print-doctor } {} + } + { \__ccnu_new_blank_page: } + { \newpage \thispagestyle{empty} } + % {} + } +\cs_new:Npn \__ccnu_titlepage_doctor: + { + \bool_lazy_and:nnTF + { \bool_if_p:N \g__ccnu_head_scope_all_bool } + { \bool_if_p:N \g__ccnu_showhead_bool } + { + \int_compare:nNnTF { \g__ccnu_thesis_type_int } = {2} + { \pagestyle { masterplain-head-nopage } } + { \pagestyle { doctorplain-head-nopage } } + } + { + \pagestyle { empty } + } + \__ccnu_cover_i_master_doctor: + \str_case:VnTF \g__ccnu_type_version_str + { + { print-master-twoside } {} + { print-doctor } {} + } + { \__ccnu_new_blank_page: } + % {} + { \newpage } + \__ccnu_cover_ii_master_doctor: + \newpage + \__ccnu_cover_iii_master_doctor: + \bool_if:NTF \g__ccnu_blind_version_bool + { + \str_case:Vn \g__ccnu_blind_version_remove_content_str + { + { blind-schoolname } + { + \newpage + \pagestyle { empty } + % 版权页 + \begin{tikzpicture} [remember~picture, overlay] + \node at (current~page.center) + { + \includegraphics + [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] + { copyright / Originality_Copyright_master_doctor_blind.pdf } + }; + \end{tikzpicture} + } + } + } + { + \bool_if:NTF \g__ccnu_master_doctor_copyright_version_new_bool + { + \newpage + % 版权页 + \begin{tikzpicture} [remember~picture, overlay] + \node at (current~page.center) + { + \includegraphics + [ width = \textwidth ] + { copyright / Originality_Copyright_master_doctor_new.pdf } + }; + \end{tikzpicture} + } + { + \newpage + % 版权页 + \begin{tikzpicture} [remember~picture, overlay] + \node at (current~page.center) + { + \includegraphics + [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] + { copyright / Originality_Copyright_master_doctor_old.pdf } + }; + \end{tikzpicture} + } + } + \str_case:VnTF \g__ccnu_type_version_str + { + { print-master-twoside } {} + { print-doctor } {} + } + { \__ccnu_new_blank_page: } + { \newpage \thispagestyle{empty} } + % {} } - \cs_new:Npn \__ccnu_new_blank_page: { \newpage \null \thispagestyle{empty} \newpage diff --git a/CHANGELOG.md b/CHANGELOG.md index caccfdd..0a9df68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,17 @@ QQ 1群:435903068(若满了请加2群) QQ 2群:685329998 + + +## [v1.4.0] - 2024-04-03 + + +### Added - 增加硕博盲审的版权页和键值 `blind-version = blind-schoolname`(来自 qq 群用户1542656672,物理学院) +- 增加硕博的第二种类型的版权页和键值 `copyright-version`(来自 qq 群用户1584103174,貌似是 2023 年新的版本) + + + ## [v1.3.1] - 2024-03-27 diff --git "a/copyright/\345\215\216\344\270\255\345\270\210\350\214\203\345\244\247\345\255\246\345\255\246\344\275\215\350\256\272\346\226\207\345\216\237\345\210\233\346\200\247\345\243\260\346\230\216\345\222\214\344\275\277\347\224\250\346\216\210\346\235\203\350\257\264\346\230\216(2023)_\345\216\273\351\241\265\347\234\211.pdf" b/copyright/Originality_Copyright_master_doctor_new.pdf similarity index 91% rename from "copyright/\345\215\216\344\270\255\345\270\210\350\214\203\345\244\247\345\255\246\345\255\246\344\275\215\350\256\272\346\226\207\345\216\237\345\210\233\346\200\247\345\243\260\346\230\216\345\222\214\344\275\277\347\224\250\346\216\210\346\235\203\350\257\264\346\230\216(2023)_\345\216\273\351\241\265\347\234\211.pdf" rename to copyright/Originality_Copyright_master_doctor_new.pdf index 48432ec..f94ebfa 100644 Binary files "a/copyright/\345\215\216\344\270\255\345\270\210\350\214\203\345\244\247\345\255\246\345\255\246\344\275\215\350\256\272\346\226\207\345\216\237\345\210\233\346\200\247\345\243\260\346\230\216\345\222\214\344\275\277\347\224\250\346\216\210\346\235\203\350\257\264\346\230\216(2023)_\345\216\273\351\241\265\347\234\211.pdf" and b/copyright/Originality_Copyright_master_doctor_new.pdf differ diff --git a/copyright/Originality_Copyright_master_doctor.pdf b/copyright/Originality_Copyright_master_doctor_old.pdf similarity index 100% rename from copyright/Originality_Copyright_master_doctor.pdf rename to copyright/Originality_Copyright_master_doctor_old.pdf diff --git a/doc/CCNUthesis-doc.tex b/doc/CCNUthesis-doc.tex index 7a2c58a..3ee1bab 100644 --- a/doc/CCNUthesis-doc.tex +++ b/doc/CCNUthesis-doc.tex @@ -1,7 +1,7 @@ \documentclass{ccnudoc} -\newcommand{\DocDate}{2024-03-27} -\newcommand{\DocVersion}{v1.3.1} +\newcommand{\DocDate}{2024-04-03} +\newcommand{\DocVersion}{v1.4.0} \input{CCNUthesis-doc-setup.tex} diff --git a/doc/body/usage.tex b/doc/body/usage.tex index 3369d43..becfdde 100644 --- a/doc/body/usage.tex +++ b/doc/body/usage.tex @@ -116,6 +116,17 @@ \subsection{模板选项} \label{subsec:模板选项} \end{function} +\begin{function}[added = 2024-04-03]{copyright-version} + \begin{ccnusyntax}[emph={[1]copyright-version}] + copyright-version = (*<(old)|new>*) + \end{ccnusyntax} + 【硕|博】版权页版本。 + \begin{itemize} + \item \kvopt{copyright-version}{old} 表示使用旧版权页。对应 \file{copyright/Originality_Copyright_master_doctor_old.pdf} + \item \kvopt{copyright-version}{new} 表示使用新版权页。对应 \file{copyright/Originality_Copyright_master_doctor_new.pdf} + \end{itemize} +\end{function} + % \begin{function}{oneside,twoside} % 指明论文的单双面模式,默认为 \opt{twoside}。该选项会影响每章 % 的开始位置,还会影响页眉样式。 diff --git a/main.tex b/main.tex index 4ce91b2..7f60cae 100644 --- a/main.tex +++ b/main.tex @@ -4,8 +4,8 @@ %******************************************** % CCNUthesis: 华中师范大学论文模板(非官方) -% update date: 2024-03-27 -% version: v1.3.1 +% update date: 2024-04-03 +% version: v1.4.0 % % 重要提示: % 1. 请确保使用 UTF-8 编码保存 @@ -16,15 +16,16 @@ %******************************************** -\documentclass[type = bachelor]{CCNUthesis} +% \documentclass[type = bachelor]{CCNUthesis} % \documentclass[type = bachelor, blind-version=remove-partial-schoolname]{CCNUthesis} % \documentclass[type = master]{CCNUthesis} -% \documentclass[type = master, blind-version]{CCNUthesis} -% \documentclass[type = master, version = print-master-oneside]{CCNUthesis} -% \documentclass[type = master, version = print-master-twoside]{CCNUthesis} +% \documentclass[type = master, copyright-version=new]{CCNUthesis} +% \documentclass[type = master, blind-version=blind-schoolname]{CCNUthesis} +% \documentclass[type = master,version = print-master-oneside]{CCNUthesis} % \documentclass[type = doctor]{CCNUthesis} -% \documentclass[type = doctor, blind-version]{CCNUthesis} -% \documentclass[type = doctor, version = print-doctor]{CCNUthesis} +% \documentclass[type = doctor, copyright-version=new]{CCNUthesis} +% \documentclass[type = doctor, blind-version=blind-schoolname]{CCNUthesis} +\documentclass[type = doctor, copyright-version=new, version = print-doctor]{CCNUthesis} % type @@ -50,6 +51,14 @@ % 【本|硕|博】blind-version = false 或者不填"blind-version":正常编译 % 【本】blind-version = remove-partial-schoolname:去掉个人信息,保留版权声明页,但是去掉校名和版权声明页中的“华中师范”四个字(此为邓国泰老师在旧模板中的做法) % 【本】blind-version = remove-all-schoolname:去掉个人信息和校名,保留版权声明页,但是去掉版权声明页中出现的“华中师范大学”六个字 +% 【硕|博】blind-version = blind-schoolname:去掉个人信息和校名,保留版权声明页,但是版权声明页中出现的“华中师范大学”六个字变成“XXXXXX” + +% copyright-version +% 【硕|博】版权声明页版本,由于 2023 年后增加了新的版权页,故增加此键值让用户选择是否更新为最新的版本 +% 可选选项:old|new +% 默认:old +% old:旧版版权声明页,对应 copyright 目录下的 Originality_Copyright_master_doctor_old.pdf +% new:新版版权声明页,对应 copyright 目录下的 Originality_Copyright_master_doctor_new.pdf % 加载用户的个人信息和论文相关参数设置的配置文件