Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add 3 lines title support #361

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions config/format/general/title.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
\newcommand{\TitleEngLines}{1}
\newcommand{\TitleLineOne}{\Title}
\newcommand{\TitleLineTwo}{~}
\newcommand{\TitleLineThree}{~}
\newcommand{\TitleEngLineOne}{\TitleEng}
\newcommand{\TitleEngLineTwo}{~}
\newcommand{\TitleEngLineThree}{~}
\newcommand{\MajorLines}{1}
\newcommand{\MajorLineOne}{\Major}
\newcommand{\MajorLineTwo}{~}
Expand All @@ -17,12 +19,26 @@
\renewcommand{\TitleLineTwo}{{#2}}
}

\newcommand{\titlethreelines}[3]{
\renewcommand{\TitleLines}{3}
\renewcommand{\TitleLineOne}{{#1}}
\renewcommand{\TitleLineTwo}{{#2}}
\renewcommand{\TitleLineThree}{{#3}}
}

\newcommand{\titleengtwolines}[2]{
\renewcommand{\TitleEngLines}{2}
\renewcommand{\TitleEngLineOne}{{#1}}
\renewcommand{\TitleEngLineTwo}{{#2}}
}

\newcommand{\titleengthreelines}[3]{
\renewcommand{\TitleEngLines}{3}
\renewcommand{\TitleEngLineOne}{{#1}}
\renewcommand{\TitleEngLineTwo}{{#2}}
\renewcommand{\TitleEngLineThree}{{#3}}
}

\newcommand{\majortwolines}[2]{
\renewcommand{\MajorLines}{2}
\renewcommand{\MajorLineOne}{#1}
Expand Down
40 changes: 33 additions & 7 deletions page/graduate/cover-chn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@

% Define multi line title


\ifnumcomp{\TitleLines+\TitleEngLines}{=}{5}{
\renewcommand{\arraystretch}{0.8}
}{
\ifnumcomp{\TitleLines+\TitleEngLines}{=}{6}{
\renewcommand{\arraystretch}{0.65}
}
}

\begin{center}
\bfseries \zihao{-2}
Expand All @@ -62,9 +68,18 @@
~ & \uline{\hfill} \\
}
{
% TitleLines == 2
中文论文题目:& \uline{\hfill \fangsong \TitleLineOne{} \hfill} \\
~ & \uline{\hfill \fangsong \TitleLineTwo{} \hfill} \\
\ifthenelse{\equal{\TitleLines}{2}}
{
% TitleLines == 2
中文论文题目:& \uline{\hfill \fangsong \TitleLineOne{} \hfill} \\
~ & \uline{\hfill \fangsong \TitleLineTwo{} \hfill} \\
}
{
% TitleLines == 3
中文论文题目:& \uline{\hfill \fangsong \TitleLineOne{} \hfill} \\
~ & \uline{\hfill \fangsong \TitleLineTwo{} \hfill} \\
~ & \uline{\hfill \fangsong \TitleLineThree{} \hfill} \\
}
}

\ifthenelse{\equal{\TitleEngLines}{1}}
Expand All @@ -74,13 +89,24 @@
~ & \uline{\hfill} \\
}
{
% TitleEngLines == 2
英文论文题目:& \zihao{3} \uline{\hfill \TitleEngLineOne{} \hfill} \\
~ & \zihao{3} \uline{\hfill \TitleEngLineTwo{} \hfill} \\
\ifthenelse{\equal{\TitleEngLines}{2}}
{
% TitleEngLines == 2
英文论文题目:& \zihao{3} \uline{\hfill \TitleEngLineOne{} \hfill} \\
~ & \zihao{3} \uline{\hfill \TitleEngLineTwo{} \hfill} \\
}
{
% TitleEngLines == 3
英文论文题目:& \zihao{3} \uline{\hfill \TitleEngLineOne{} \hfill} \\
~ & \zihao{3} \uline{\hfill \TitleEngLineTwo{} \hfill} \\
~ & \zihao{3} \uline{\hfill \TitleEngLineThree{} \hfill} \\
}
}
\end{tabularx}
\end{center}

\renewcommand{\arraystretch}{1}

\ifthenelse{\equal{\DepartmentLines}{1}}
{
% DepartmentLines == 1
Expand Down
21 changes: 18 additions & 3 deletions page/graduate/title-chn.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
\cleardoublepage

\ifnumcomp{\TitleLines}{=}{3}{
\renewcommand{\arraystretch}{0.75}
}

\begin{center}
\bfseries \zihao{-2}
\begin{tabularx}{.8\textwidth}{>{\fangsong}X<{\centering}}
Expand All @@ -10,13 +14,24 @@
\uline{\hfill} \\
}
{
% TitleLines == 2
\uline{\hfill \fangsong \TitleLineOne{} \hfill} \\
\uline{\hfill \fangsong \TitleLineTwo{} \hfill} \\
\ifthenelse{\equal{\TitleLines}{2}}
{
% TitleLines == 2
\uline{\hfill \fangsong \TitleLineOne{} \hfill} \\
\uline{\hfill \fangsong \TitleLineTwo{} \hfill} \\
}
{
% TitleLines == 3
\uline{\hfill \fangsong \TitleLineOne{} \hfill} \\
\uline{\hfill \fangsong \TitleLineTwo{} \hfill} \\
\uline{\hfill \fangsong \TitleLineThree{} \hfill} \\
}
}
\end{tabularx}
\end{center}

\renewcommand{\arraystretch}{1}

\vskip 20pt

\begin{center}
Expand Down
22 changes: 19 additions & 3 deletions page/graduate/title-eng.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
\cleardoublepage

{
\ifnumcomp{\TitleLines}{=}{3}{
\renewcommand{\arraystretch}{0.65}
}

\begin{center}
% Chinese zihao{3} == English 16pt
\bfseries \zihao{3}
Expand All @@ -12,13 +16,25 @@
\uline{\hfill} \\
}
{
% TitleEngLines == 2
\uline{\hfill \TitleEngLineOne{} \hfill} \\
\uline{\hfill \TitleEngLineTwo{} \hfill} \\
\ifthenelse{\equal{\TitleEngLines}{2}}
{
% TitleEngLines == 2
\uline{\hfill \TitleEngLineOne{} \hfill} \\
\uline{\hfill \TitleEngLineTwo{} \hfill} \\
}
{
% TitleEngLines == 3
\uline{\hfill \TitleEngLineOne{} \hfill} \\
\uline{\hfill \TitleEngLineTwo{} \hfill} \\
\uline{\hfill \TitleEngLineThree{} \hfill} \\

}
}
\end{tabularx}
\end{center}

\renewcommand{\arraystretch}{1}

\vskip 6pt

\begin{center}
Expand Down
2 changes: 2 additions & 0 deletions zjuthesis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
%% Uncomment the following lines if you need multi line titles on cover pages
% \titletwolines{毕业论文题目第一行}{毕业论文题目第二行}
% \titleengtwolines{English Title Line One}{English Title Line Two}
% \titlethreelines{毕业论文题目第一行}{毕业论文题目第二行}{毕业论文题目第三行}
% \titleengthreelines{English Title Line One}{English Title Line Two}{English Title Line Three}

%% Uncomment the following lines if you need multi line major names on cover pages
% \majortwolines{专业名第一行}{专业名第二行}
Expand Down
Loading