Skip to content

Commit

Permalink
Merge pull request #325 from OhGaGaGaGa/twolinemajor
Browse files Browse the repository at this point in the history
Add 2 Lines Major Support
  • Loading branch information
TheNetAdmin authored Sep 20, 2023
2 parents 124ce4f + d188cd4 commit d8e8b76
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
9 changes: 9 additions & 0 deletions config/format/general/title.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
\newcommand{\TitleLineTwo}{~}
\newcommand{\TitleEngLineOne}{\TitleEng}
\newcommand{\TitleEngLineTwo}{~}
\newcommand{\MajorLines}{1}
\newcommand{\MajorLineOne}{\Major}
\newcommand{\MajorLineTwo}{~}
\newcommand{\DepartmentLines}{1}
\newcommand{\DepartmentLineOne}{\Department}
\newcommand{\DepartmentLineTwo}{~}
Expand All @@ -20,6 +23,12 @@
\renewcommand{\TitleEngLineTwo}{{#2}}
}

\newcommand{\majortwolines}[2]{
\renewcommand{\MajorLines}{2}
\renewcommand{\MajorLineOne}{#1}
\renewcommand{\MajorLineTwo}{#2}
}

\newcommand{\departmenttwolines}[2]{
\renewcommand{\DepartmentLines}{2}
\renewcommand{\DepartmentLineOne}{#1}
Expand Down
9 changes: 8 additions & 1 deletion page/undergraduate/final/cover.tex
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@

姓名与学号 & \uline{\hfill \StudentName~\StudentID \hfill} \\
指导教师 & \uline{\hfill \AdvisorName \hfill} \\
年级与专业 & \uline{\hfill \mbox{\Grade}级\Major \hfill} \\
\ifthenelse{\equal{\MajorLines}{1}}
{% MajorLines == 1
年级与专业 & \uline{\hfill \mbox{\Grade}级\Major \hfill} \\
}
{% MajorLines == 2
年级与专业 & \uline{\hfill \mbox{\Grade}级\MajorLineOne \hfill} \\
& \uline{\hfill \MajorLineTwo \hfill} \\
}
\ifthenelse{\equal{\DepartmentLines}{1}}
{% DepartmentLines == 1
所在学院 & \uline{\hfill \Department \hfill} \\
Expand Down
9 changes: 8 additions & 1 deletion page/undergraduate/proposal/cover.tex
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@
{%
姓名与学号 & \uline{\hfill \StudentName~\StudentID \hfill} \\
指导教师 & \uline{\hfill \AdvisorName \hfill} \\
年级与专业 & \uline{\hfill \mbox{\Grade}级\Major \hfill} \\
\ifthenelse{\equal{\MajorLines}{1}}
{% MajorLines == 1
年级与专业 & \uline{\hfill \mbox{\Grade}级\Major \hfill} \\
}
{% MajorLines == 2
年级与专业 & \uline{\hfill \mbox{\Grade}级\MajorLineOne \hfill} \\
& \uline{\hfill \MajorLineTwo \hfill} \\
}
\ifthenelse{\equal{\DepartmentLines}{1}}
{% DepartmentLines == 1
所在学院 & \uline{\hfill \Department \hfill} \\
Expand Down
3 changes: 3 additions & 0 deletions zjuthesis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
% \titletwolines{毕业论文题目第一行}{毕业论文题目第二行}
% \titleengtwolines{English Title Line One}{English Title Line Two}

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

%% Uncomment the following lines if you need multi line department names on cover pages
% \departmenttwolines{学院名第一行}{学院名第二行}

Expand Down

0 comments on commit d8e8b76

Please sign in to comment.