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 new period 'proposal_divided' #320

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ zjuthesis 模板有三种使用方式,Overleaf,本地编译,或者 Contain

- `Degree` 为 `undergraduate` 时,编译本科生论文:

| Field | Option 1 | Option 2 | Option 3 |
| :---------- | :----------------------------------- | :------------------------------------- | :--------------------------------- |
| Type | thesis: 论文类 | design: 设计类 | |
| Period | proposal: 开题报告 | final: 最终论文/设计(含开题报告) | paper: 最终论文/报告(无开题报告) |
| BlindReview | true: 生成盲审用 pdf(隐藏个人信息) | false: 生成提交用 pdf | |
| Field | Option 1 | Option 2 | Option 3 | Option 4 |
| :---------- | :----------------------------------- | :------------------------------------- | :------------------------------------- | :------------------------------------- |
| Type | thesis: 论文类 | design: 设计类 | | |
| Period | proposal: 开题报告 | final: 最终论文/设计(含开题报告) | paper: 最终论文/报告(无开题报告) | proposal_divided: 开题报告 (借助ProposalPart实现分别导出) |
| ProposalPart | review: 仅生成文献综述 | proposal: 仅生成开题报告 | translation: 仅生成文献翻译 | midcheck: 仅生成中期检查 |
| BlindReview | true: 生成盲审用 pdf(隐藏个人信息) | false: 生成提交用 pdf | | |
| MajorFormat | general: 默认模板 | 与 `config/format/major/` 下目录名相同 | |

- `Degree` 为 `graduate` 时,编译硕士生/博士生论文:
Expand Down
72 changes: 55 additions & 17 deletions body/undergraduate/proposal/content.tex
Original file line number Diff line number Diff line change
@@ -1,23 +1,61 @@
\cleardoublepage

\ifthenelse{\equal{\Type}{thesis}}
\ifthenelse{\equal{\Period}{proposal}}
{
% `thesis` content
\inputbody{proposal/review/review}
\inputbody{proposal/proposal/proposal}
\inputbody{proposal/translation/translation}
\inputbody{proposal/original/original}
}
\ifthenelse{\equal{\Type}{thesis}}
{
% `thesis` content
\inputbody{proposal/review/review}
\inputbody{proposal/proposal/proposal}
\inputbody{proposal/translation/translation}
\inputbody{proposal/original/original}
}
{
\ifthenelse{\equal{\Type}{design}}
{
% `design` content
\inputbody{proposal/proposal/proposal}
\inputbody{proposal/translation/translation}
\inputbody{proposal/original/original}
\inputbody{proposal/midcheck/midcheck}
}
{
% Wrong Input
}
}
}{}
\ifthenelse{\equal{\Period}{proposal_divided}}
{
\ifthenelse{\equal{\Type}{design}}
\ifthenelse{\equal{\Type}{thesis}}
{
\ifthenelse{\equal{\ProposalPart}{review}}
{
% `design` content
\inputbody{proposal/proposal/proposal}
\inputbody{proposal/translation/translation}
\inputbody{proposal/original/original}
\inputbody{proposal/midcheck/midcheck}
}
\inputbody{proposal/review/review}
}{}
\ifthenelse{\equal{\ProposalPart}{proposal}}
{
% Wrong Input
}
}
\inputbody{proposal/proposal/proposal}
}{}
\ifthenelse{\equal{\ProposalPart}{translation}}
{
\inputbody{proposal/translation/translation}
\inputbody{proposal/original/original}
}{}
}{}
\ifthenelse{\equal{\Type}{design}}
{
\ifthenelse{\equal{\ProposalPart}{proposal}}
{
\inputbody{proposal/proposal/proposal}
}{}
\ifthenelse{\equal{\ProposalPart}{translation}}
{
\inputbody{proposal/translation/translation}
\inputbody{proposal/original/original}
}{}
\ifthenelse{\equal{\ProposalPart}{midcheck}}
{
\inputbody{proposal/midcheck/midcheck}
}{}
}{}
}{}
2 changes: 2 additions & 0 deletions zjuthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
\DeclareStringOption[general]{MajorFormat}
\DeclareStringOption[thesis]{Type}
\DeclareStringOption[proposal]{Period}
\DeclareStringOption{ProposalPart}
\DeclareStringOption[chinese]{Language}
\DeclareStringOption[doctor]{GradLevel}
\DeclareStringOption{ColaboratorName}
Expand All @@ -37,6 +38,7 @@
\wlog{MajorFormat: {\MajorFormat}}
\wlog{Type: {\Type}}
\wlog{Period: {\Period}}
\wlog{ProposalPart: {\ProposalPart}}
\wlog{BlindReview: {\BlindReview}}
\wlog{Language: {\Language}}
\wlog{GradLevel: {\GradLevel}}
Expand Down
22 changes: 21 additions & 1 deletion zjuthesis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
MajorFormat = general,
Degree = undergraduate, % 'undergraduate' or 'graduate'
Type = thesis, % 'thesis' or 'design'
Period = final, % 'proposal' or 'paper' or 'final'
Period = final, % 'proposal' or 'paper' or 'final' or 'proposal_divided'
ProposalPart = review, % only for 'proposal_divided'. 'review' of 'proposal' or ' translation' or 'midcheck'.
BlindReview = false, % 'false' or 'true'
Language = chinese, % 'chinese' or 'english'
% Graduate Thesis Info
Expand Down Expand Up @@ -110,6 +111,25 @@
\inputpage{proposal}{post}
}

\ifthenelse{\equal{\Period}{proposal_divided}}
{
% Thesis proposal
\newcommand{\undergradcurrstage}{proposal_divided}

\coverstyle
\inputpage{proposal}{cover}

% 'proposal' previous part uses 'empty' page style,
% as shown in cs undergrad template.
\inputpage{proposal}{previous}

\prevstyle
\inputpage{proposal}{toc}

\bodystyle
\inputbody{proposal/content}
}

\ifthenelse{\equal{\Period}{paper}}
{
% paper only part
Expand Down