Skip to content
Snippets Groups Projects
Commit f488cf13 authored by Yu Xiong's avatar Yu Xiong :confounded:
Browse files

feat: 用latex3语法改写封面标题判断

parent 4cd17424
No related branches found
No related tags found
No related merge requests found
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
\makebox[4.2em][s]{#1} \makebox[4.2em][s]{#1}
} }
% 封面标题 % 封面信息栏
\tl_new:N \cover_oneline_title \tl_new:N \cover_personalinfo
\tl_set:Nn \cover_oneline_title { \tl_set:Nn \cover_personalinfo {
\begin{tabular}{p{4.2em}c} \begin{tabular}{p{4.2em}c}
\coverbox:n {\hfill} \coverbox:n {\hfill}
& \cover_underline:nn {250pt}{\songti\Department}\\ & \cover_underline:nn {250pt}{\songti\Department}\\
...@@ -69,23 +69,12 @@ ...@@ -69,23 +69,12 @@
} }
% 判断类型 % 判断类型
\int_compare:nNnTF { \TitleLength } = { 2 } { \str_if_eq:eeTF {\Degree} {UG}
\coverbox:n {\hfill} {\tl_const:Nn \Degreename {\hfill\hfill\hfill }}{}
& \cover_underline:nn {250pt}{\textbf{\songti\TitleB}} \\
}{}
\ifthenelse{\equal{\Degree}{UG}}
{
\NewDocumentCommand \Degreename {} {\hfill\hfill\hfill }
}
{}
\ifthenelse{\equal{\Type}{thesis}} \str_if_eq:eeTF {\Type} {thesis}
{ {\tl_const:Nn \typename {\Degreename\hfill\hfill\hfill\hfill}}
\NewDocumentCommand \typename {} {\Degreename\hfill\hfill\hfill\hfill} {\tl_const:Nn \typename {\Degreename\hfill\hfill\hfill\hfill}}
}
{
\NewDocumentCommand \typename {} {\Degreename\hfill\hfill\hfill\hfill}
}
% 重定义maketitle生成封面 % 重定义maketitle生成封面
\RenewDocumentCommand \maketitle {} {% \RenewDocumentCommand \maketitle {} {%
...@@ -104,7 +93,7 @@ ...@@ -104,7 +93,7 @@
{\bgroup {\bgroup
\kaishu\zihao{3} \kaishu\zihao{3}
\def\tabcolsep{1pt} \def\tabcolsep{1pt}
\def\arraystretch{1.5} \cover_oneline_title \def\arraystretch{1.5} \cover_personalinfo
\egroup}\\ \egroup}\\
\vfill \vfill
\end{center} \end{center}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment