Forked from
NJU LUG / NJU LaTeX Templates / NJUThesis
551 commits behind the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
cover.sty 3.05 KiB
\ProvidesExplPackage{profile/cover}{2021-09-04}{0.1}{NJU Thesis Undergraduate cover design}
% 封面下划线
\cs_new:Npn \cover_underline:nn #1 #2 {
\uline{\makebox[#1]{#2}}
}
% 封面表格边框
\cs_new:Npn \coverbox:n #1 {
\makebox[4.2em][s]{#1}
}
% 封面标题
\tl_new:N \cover_oneline_title
\tl_set:Nn \cover_oneline_title {
\begin{tabular}{p{4.2em}c}
\coverbox:n {院\hfill 系}
& \cover_underline:nn {250pt}{\songti\Department}\\
\coverbox:n {专\hfill 业}
& \cover_underline:nn {250pt}{\songti\Major}\\
\coverbox:n {题\hfill 目}
& \cover_underline:nn {250pt}{\textbf{\songti\TitleA}} \\
\int_compare:nNnTF { \TitleLength } = { 2 } {
\coverbox:n {\hfill}
& \cover_underline:nn {250pt}{\textbf{\songti\TitleB}} \\
}{}
\int_compare:nNnTF { \TitleLength } = { 3 } {
\coverbox:n {\hfill}
& \cover_underline:nn {250pt}{\textbf{\songti\TitleB}} \\
\coverbox:n {\hfill}
& \cover_underline:nn {250pt}{\textbf{\songti\TitleC}} \\
}{}
\end{tabular}\\
\begin{tabular}{p{4.2em}cp{4.2em}c}
\coverbox:n {年\hfill 级}
& \cover_underline:nn {90pt}{\Grade}
& \coverbox:n {学\hfill 号}
& \cover_underline:nn {90pt}{\songti\StudentID}\\
\end{tabular}\\
\begin{tabular}{p{4.2em}c}
\coverbox:n {学\hfill 生\hfill 姓\hfill 名}
& \cover_underline:nn {250pt}{\StudentName}
\end{tabular}\\
\begin{tabular}{p{4.2em}cp{4.2em}c}
\coverbox:n {导\hfill 师}
& \cover_underline:nn {90pt}{\Mentor}
& \coverbox:n {职\hfill 称}
& \cover_underline:nn {90pt}{\MentorTitle}\\
\end{tabular}\\
% % 第二导师
% \ifnjut@title@twosupervisors
% \begin{tabular}{p{4.2em}cp{4.2em}c}
% \coverbox:n {\njut@cap@cover@secondsupervisor}
% & \njutunderline[90pt]{\songti\njut@value@secondsupervisor}
% & \coverbox:n {\njut@cap@cover@secondsupervisortitle}
% & \njutunderline[90pt]{\songti\njut@value@secondsupervisortitle}\\
% \end{tabular}
% \fi
\begin{tabular}{p{4.2em}c}
\coverbox:n {提\hfill 交\hfill 日\hfill 期}
& \cover_underline:nn {250pt}{\SubmitDate}\\
\end{tabular}
}
% 判断类型