Skip to content

Commit

Permalink
将英文封面定制移至模块中
Browse files Browse the repository at this point in the history
  • Loading branch information
SwitWu committed May 1, 2024
1 parent 1bb74cd commit c4e0592
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 32 deletions.
27 changes: 27 additions & 0 deletions module/module.cs.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
%tag 计算机学院

%tag 英文封面
\cs_set_protected:Npn \__whu_master_cover_ii:
{
\pdfbookmark{英文封面}{titlepage-en}
\group_begin:
\centering
\mode_leave_vertical:
\skip_vertical:n { 1.6cm }
{ \zihao{2} \linespread{1.25}\selectfont \l__whu_info_title_en_tl\par }
\skip_vertical:n { 4.75cm }
\zihao{4} By
\skip_vertical:n { 0.65cm }
\l__whu_info_author_en_tl
\skip_vertical:n { 2.05cm }
Supervised ~ By
\skip_vertical:n { 0.65cm }
\l__whu_info_supervisor_academic_title_en_tl . \c_space_tl
\l__whu_info_supervisor_en_tl
\skip_vertical:n { 4.9cm }
Wuhan ~ University
\skip_vertical:n { 0.65cm }
\__whu_month_cover_to_english_version:V \l__whu_info_month_int, \c_space_tl
\int_use:N \l__whu_info_year_int \par
\group_end:
}
26 changes: 26 additions & 0 deletions module/module.cse.tex
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,30 @@
}
%endregion

%tag 英文封面
\cs_set_protected:Npn \__whu_master_cover_ii:
{
\pdfbookmark{英文封面}{titlepage-en}
\group_begin:
\centering
\mode_leave_vertical:
\skip_vertical:n { 1.6cm }
{ \zihao{2} \linespread{1.25}\selectfont \l__whu_info_title_en_tl\par }
\skip_vertical:n { 4.75cm }
\zihao{4} By
\skip_vertical:n { 0.65cm }
\l__whu_info_author_en_tl
\skip_vertical:n { 2.05cm }
Supervised ~ By
\skip_vertical:n { 0.65cm }
\l__whu_info_supervisor_academic_title_en_tl . \c_space_tl
\l__whu_info_supervisor_en_tl
\skip_vertical:n { 4.9cm }
Wuhan ~ University
\skip_vertical:n { 0.65cm }
\__whu_month_cover_to_english_version:V \l__whu_info_month_int, \c_space_tl
\int_use:N \l__whu_info_year_int \par
\group_end:
}

\endinput
35 changes: 11 additions & 24 deletions whu-thesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
\ExplSyntaxOn
\clist_map_inline:nn { #1 }
{
\file_input:n { module / ##1 }
\file_input:n { module / module.##1 }
}
\ExplSyntaxOff
}
Expand Down Expand Up @@ -1108,10 +1108,6 @@
day .int_set:N = \l__whu_info_day_int,
keywords .clist_set:N = \l__whu_info_keywords_clist,
keywords* .clist_set:N = \l__whu_info_keywords_en_clist,
cover-en-type .choice:,
cover-en-type .choices:nn = { normal, cs }
{ \tl_set_eq:NN \l__whu_cover_en_type_tl \l_keys_choice_tl },
cover-en-type .initial:n = normal
}
%tag 初始化公共键
\keys_set:nn { whu / info }
Expand Down Expand Up @@ -1651,25 +1647,16 @@
\cs_new_protected:Npn \__whu_master_cover_ii:
{
\pdfbookmark{英文封面}{titlepage-en}
\tl_if_eq:NnTF \l__whu_cover_en_type_tl { normal }
{
\begin{tikzpicture} [ remember~picture, overlay ]
% 标题
\__whu_master_cover_ii_title:
% 个人信息
\__whu_master_cover_ii_information:
% 时间
\__whu_master_cover_ii_date_en:
% 学校名和logo
\__whu_master_cover_ii_logo:
\end{tikzpicture}
}
{
\tl_if_eq:NnT \l__whu_cover_en_type_tl { cs }
{
\__whu_master_cs_cover_ii:
}
}
\begin{tikzpicture} [ remember~picture, overlay ]
% 标题
\__whu_master_cover_ii_title:
% 个人信息
\__whu_master_cover_ii_information:
% 时间
\__whu_master_cover_ii_date_en:
% 学校名和logo
\__whu_master_cover_ii_logo:
\end{tikzpicture}
}
%tag 标题
\cs_new_protected:Npn \__whu_master_cover_ii_title:
Expand Down
9 changes: 1 addition & 8 deletions whuthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,6 @@
% \end{function}
%
%
% \begin{function}{info/cover-en-type}
% \begin{whusyntax}[emph={[1]cover-en-type}]
% cover-en-type = (*<(normal)|cs>*)
% \end{whusyntax}
% 设置英文封面的样式。计算机学院和网络安全学院请选择 \opt{cs}。
% \end{function}
%
%
% \subsubsection{论文格式}\label{subsubsec:论文格式}
% \begin{function}{style}
% \begin{whusyntax}[emph={[1]style}]
Expand Down Expand Up @@ -580,6 +572,7 @@
% 目前支持的模块为:
% \begin{itemize}
% \item \texttt{cse}: 网络安全学院
% \item \texttt{cs}: 计算机学院
% \end{itemize}
% \end{function}
%
Expand Down

0 comments on commit c4e0592

Please sign in to comment.