Skip to content

Commit

Permalink
feat(GT): add support for special type.
Browse files Browse the repository at this point in the history
  • Loading branch information
fky2015 committed Mar 21, 2024
1 parent 4f1ad21 commit 76255d8
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
20 changes: 20 additions & 0 deletions bithesis-doc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,26 @@ \subsubsection{论文基本信息}
密级。
\end{function}

\begin{function}[added=2024-03-22]{info/crossResearch}
\begin{bitsyntax}[emph={[1]crossResearch}]
crossResearch = (*<(false)|true>*)
\end{bitsyntax}

特殊类型:交叉研究方向。(不勾选时不显示整个内容)

\textit{此选项一般不需要用户自行修改。}
\end{function}

\begin{function}[added=2024-03-22]{info/internationalStudentUGP}
\begin{bitsyntax}[emph={[1]internationalStudentUGP}]
internationalStudentUGP = (*<(false)|true>*)
\end{bitsyntax}

特殊类型:政府项目留学生。

\textit{此选项一般不需要用户自行修改。}
\end{function}

\subsubsection{样式信息}

\begin{function}{style}
Expand Down
49 changes: 48 additions & 1 deletion bithesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@
{classification} {中图分类号:},
{classified_level} {密级},
{type} {种类},
{special_type} {特别类型},
{cross_research} {交叉研究方向},
{international_student_ugp} {政府项目留学生},
}
{\@@_define_label:nn #1}
% \end{macrocode}
Expand Down Expand Up @@ -646,6 +649,12 @@
defenseDateEn .initial:n = {June,~2019~(example)},
% 因为默认不显示,所以不需要设置初始值。
classifiedLevel .tl_set:N = \l_@@_value_classified_level_tl,
% 特别类型-交叉研究方向
crossResearch .bool_set:N = \l_@@_value_cross_research_bool,
crossResearch .initial:n = {false},
% 特别类型-政府项目留学生
internationalStudentUGP .bool_set:N = \l_@@_value_international_student_ugp_bool,
internationalStudentUGP .initial:n = {false},
}
% \end{macrocode}
%
Expand Down Expand Up @@ -1825,11 +1834,49 @@
\cs_new:Npn \@@_make_chinese_title_page: {
\cleardoublepage
\begin{titlepage}
{
\begin{minipage}[t]{0.48\textwidth}
% 密级、分类号
{\heiti \zihao{5} \noindent \c_@@_label_classification_tl}
\l_@@_value_classification_tl\\
{\heiti \zihao{5} \c_@@_label_udc_tl} \l_@@_value_udc_tl
\end{minipage}

\hfill

% 以下内容是「特别类型」的内容,
% 在没有勾选的时候隐藏。
\bool_if:nT {\l_@@_value_international_student_ugp_bool || \l_@@_value_cross_research_bool} {
\begin{minipage}[t]{0.48\textwidth}
\vspace{-12pt}
\begin{flushright}
\setlength\fboxrule{1pt}\setlength\fboxsep{3mm}
\fbox{
\noindent\begin{minipage}{0.48\linewidth}
\heiti \zihao{-4}
\scalebox{1.1}\BigStar{}\hspace{4pt} \c_@@_label_special_type_tl\\

\makebox[1em][l]
{
\makebox[1pt][l]{\zihao{4}$\boxempty$}
\bool_if:NT \l_@@_value_cross_research_bool {
$\checkmark$
}
}
\hspace{3pt}\c_@@_label_cross_research_tl\\
\makebox[1em][l]
{
\makebox[1pt][l]{\zihao{4}$\boxempty$}
\bool_if:NT \l_@@_value_international_student_ugp_bool {
$\checkmark$
}
}
\hspace{3pt}\c_@@_label_international_student_ugp_tl
\end{minipage}
}
\end{flushright}
\end{minipage}
% 保证下面的内容空间不会受到挤占。
\vspace{-35pt}
}

\begin{center}
Expand Down
6 changes: 6 additions & 0 deletions templates/graduate-thesis/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
keywordsEn = shape memory properties; polyurethane; textile; synthesis; application,
% 必要时置于封面右上角,并按照国家规定进行标记。
% classifiedLevel = 密级\BigStar 保密期限,
%
% 一下两个选项不勾选时将会隐藏显示。
% 特别类型——交叉研究方向(一般不用勾选)
% crossResearch = true,
% 特别类型——政府项目留学生(一般不用勾选)
% internationalStudentUGP = true,
},
% 在目录页中不显示摘要和主要符号对照表的标题。
TOC = {
Expand Down

0 comments on commit 76255d8

Please sign in to comment.