Skip to content

Commit

Permalink
Add: 增加硕博的第二种类型的版权页和键值 copyright-version
Browse files Browse the repository at this point in the history
  • Loading branch information
xkwxdyy committed Apr 3, 2024
1 parent d8337ac commit e566fe5
Show file tree
Hide file tree
Showing 7 changed files with 253 additions and 101 deletions.
304 changes: 213 additions & 91 deletions CCNUthesis.cls
Original file line number Diff line number Diff line change
@@ -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 }

Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions doc/CCNUthesis-doc.tex
Original file line number Diff line number Diff line change
@@ -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}

Expand Down
11 changes: 11 additions & 0 deletions doc/body/usage.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}。该选项会影响每章
% 的开始位置,还会影响页眉样式。
Expand Down
Loading

0 comments on commit e566fe5

Please sign in to comment.