Skip to content
Closed
Binary file added .exFig/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .exFig/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .exFig/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .exFig/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .exFig/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# zjuthesis-moreFlexible

自己在完成本科毕业论文期间对zjuthesis的一些修改。

1. 在目录中添加“承诺书”、“致谢”、“摘要”章节,物理逻辑上这些章节位于`第一部分 毕业论文`之前,目录逻辑中位于`第一部分 毕业论文`之后。
![1](.exFig/1.png)

2. 添加参数`LeftEqRight`,控制TwoSide模式下左右页边距相等,仍保持奇偶页面页眉不同。提交电子版时可设置为`true`,美观一点。打印时建议设置为`false`。
![2](.exFig/2.png)

3. 添加参数`ClearEmptyPage`,在TwoSide模式下删除空白页,提交电子版时可设置为`true`,打印时建议设置为`false`。
![3](.exFig/3.png)

4. 目录中部分项(任务书、考核表等)不编页码。
使用`\sectionNoTocPageNum`和`\chapterNoTocPageNum`,需3个参数。

`\sectionNoTocPageNum{任务书}{}{}`:对应项在目录中不编页码。

`\sectionNoTocPageNum{任务书}{haveTocPageNum}{}`:在第二个参数传入`haveTocPageNum`可以将目录中的页面重新添加进来。

`\sectionNoTocPageNum{任务书}{}{onlyTocItem}`:在第三个参数传入`onlyTocItem`将不在正文中添加对应标题,仅在目录中添加对应条目。

![4](.exFig/4.png)

5. 为Final版本中的文献综述和开题报告添加目录。需添加`titletoc`包。
![5](.exFig/5.png)


---

# 浙江大学学位论文 LaTeX 模板

[![ZJUTHESIS](https://img.shields.io/badge/zjuthesis-latex-blue.svg)](https://thenetadmin.github.io/zjuthesis)
Expand Down
10 changes: 4 additions & 6 deletions body/undergraduate/final/abstract.tex
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
\cleardoublepage{}
\begin{center}
\bfseries \zihao{3} 摘~要
\end{center}
\manualTocSection{摘~要}{tgt:abstract-zh}{sec:abstract-zh}


\cleardoublepage{}
\begin{center}
\bfseries \zihao{3} Abstract
\end{center}
\manualTocSection{Abstract}{tgt:abstract-en}{sec:abstract-en}


5 changes: 2 additions & 3 deletions body/undergraduate/final/acknowledgement.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
\cleardoublepage{}
\begin{center}
\bfseries \zihao{3} 致~谢
\end{center}

\manualTocSection{致~谢}{tgt:acknowledgement}{sec:acknowledgement}
66 changes: 66 additions & 0 deletions config/commands.tex
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,70 @@
\newcommand{\changelocaltocdepth}[1]{%
\addtocontents{toc}{\protect\setcounter{tocdepth}{#1}}%
\setcounter{tocdepth}{#1}%
}

% zjuthesis-moreFlexible
% \manualTocSection{<标题文本>}{<锚点>}{<标签>}
\newcommand{\manualTocSection}[3]{%
\begin{center}
\phantomsection
\hypertarget{#2}{}
\label{#3}
\pdfbookmark[section]{#1}{#2}
\bfseries \zihao{3} #1
\end{center}
}

% \manualAddToContents{<标题文本>}{<锚点>}{<标签>}
\newcommand{\manualAddSectionToContents}[3]{%
\addtocontents{toc}{\protect\contentsline {section}{\protect\hyperlink{#2}{#1}}{\pageref{#3}}{}}
}

\ifthenelse{\equal{\ClearEmptyPage}{true}}
{
\makeatletter
\@openrightfalse
\makeatother
}{}

% \sectionNoTocPageNum{<标题文本>}{<目录是否编页码,置空表示无页码>}{<正文是否生成标题,置空表示生成标题>}
\newcommand{\sectionNoTocPageNum}[3]{%
\ifthenelse{\equal{#2}{haveTocPageNum}}{
\ifthenelse{\equal{#3}{onlyTocItem}}
{
\phantomsection
\addcontentsline{toc}{section}{#1}
}
{\sectionnonum{#1}}
}{
\addtocontents{toc}{\cftpagenumbersoff{section}} % 关闭页码
\ifthenelse{\equal{#3}{onlyTocItem}}
{
\phantomsection
\addcontentsline{toc}{section}{#1}
}
{\sectionnonum{#1}}
\addtocontents{toc}{\cftpagenumberson{section}} % 恢复页码
}
}

% \chapterNoTocPageNum{<标题文本>}{<目录是否编页码,置空表示无页码>}{<正文是否生成标题,置空表示生成标题>}
\newcommand{\chapterNoTocPageNum}[3]{%
\ifthenelse{\equal{#2}{haveTocPageNum}}{
\ifthenelse{\equal{#3}{onlyTocItem}}
{
\phantomsection
\addcontentsline{toc}{chapter}{#1}
}
{\chapternonum{#1}}
}{
\addtocontents{toc}{\cftpagenumbersoff{chapter}} % 关闭页码
\ifthenelse{\equal{#3}{onlyTocItem}}
{
\phantomsection
\addcontentsline{toc}{chapter}{#1}
}
{\chapternonum{#1}}
\addtocontents{toc}{\cftpagenumberson{chapter}} % 恢复页码
}
}
37 changes: 30 additions & 7 deletions config/format/general/geometry.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,36 @@
{
% The top and left margins are set to 2.5 cm according to undergrad school standard
% https://github.com/TheNetAdmin/zjuthesis-std/blob/b78c2147d329b9b3d18885a366e4f6040a8a9c8d/standard/README.rst
\geometry{
a4paper,
marginpar=0pt,
includeheadfoot,
vmargin={2.5cm, 2.0cm},
hmargin={2.5cm, 2.0cm},
headsep=4mm
% \geometry{
% a4paper,
% marginpar=0pt,
% includeheadfoot,
% vmargin={2.5cm, 2.0cm},
% hmargin={2.5cm, 2.0cm},
% headsep=4mm
% }

% zjuthesis-moreFlexible
\ifthenelse{\equal{\LeftEqRight}{true}}
{
\geometry{
a4paper,
marginpar=0pt,
includeheadfoot,
vmargin={2.5cm, 2.0cm},
hmargin={2.25cm, 2.25cm},
headsep=4mm
}
}
{
\geometry{
a4paper,
marginpar=0pt,
includeheadfoot,
vmargin={2.5cm, 2.0cm},
hmargin={2.5cm, 2.0cm},
headsep=4mm
}
}
}
{
Expand Down
3 changes: 3 additions & 0 deletions config/packages.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@
\usepackage[chapter]{algorithm}
\usepackage{algorithmic}
\usepackage{mathptmx} % Use times font in equation env (#426 #425)

% zjuthesis-moreFlexible 为终稿版本中的开题报告部分添加目录
\usepackage{titletoc}
6 changes: 5 additions & 1 deletion page/undergraduate/final/eval.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
\cleardoublepage{}
\sectionnonum{本科生毕业论文(设计)考核}
% \sectionnonum{本科生毕业论文(设计)考核}
\sectionNoTocPageNum{本科生毕业论文(设计)考核表}{}{onlyTocItem}
\begin{center}
\bfseries \zihao{3} 本科生毕业论文(设计)考核
\end{center}

{
\bfseries
Expand Down
3 changes: 2 additions & 1 deletion page/undergraduate/final/job.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\cleardoublepage{}
\sectionnonum{本科生毕业论文(设计)任务书}
% \sectionnonum{本科生毕业论文(设计)任务书}
\sectionNoTocPageNum{本科生毕业论文(设计)任务书}{}{}

{
\bfseries
Expand Down
5 changes: 1 addition & 4 deletions page/undergraduate/final/promise.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

\begin{center}
\bfseries \zihao{3} 浙江大学本科生毕业论文(设计)承诺书
\end{center}
\manualTocSection{浙江大学本科生毕业论文(设计)承诺书}{tgt:promise}{sec:promise}

{
\zihao{4}
Expand Down
12 changes: 12 additions & 0 deletions page/undergraduate/final/toc-previous.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
% zjuthesis-moreFlexible


\manualAddSectionToContents{承诺书}{tgt:promise}{sec:promise}

\ifthenelse{\equal{\BlindReview}{true}}
{}{
\manualAddSectionToContents{致~谢}{tgt:acknowledgement}{sec:acknowledgement}
}

\manualAddSectionToContents{摘~要}{tgt:abstract-zh}{sec:abstract-zh}
\manualAddSectionToContents{Abstract}{tgt:abstract-en}{sec:abstract-en}
2 changes: 2 additions & 0 deletions page/undergraduate/proposal/cover.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
\cleardoublepage{}

\chapterNoTocPageNum{文献综述和开题报告封面}{}{onlyTocItem}

\hskip 40mm

\begin{center}
Expand Down
5 changes: 5 additions & 0 deletions page/undergraduate/proposal/proposal-toc.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
\cleardoublepage

\chapterNoTocPageNum{文献综述和开题报告目录}{}{onlyTocItem}
\tableofcontents % 仅有目录标题,与整体目录的标题格式保持一致
\printcontents[proposalPart]{}{0}{}
2 changes: 2 additions & 0 deletions page/undergraduate/proposal/thesis/previous.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
\chapterNoTocPageNum{指导教师对文献综述和开题报告具体内容要求}{}{onlyTocItem}

\setlength{\parindent}{0em}
\par {\zihao{4}\bfseries 一、题目:\Title}
\\
Expand Down
13 changes: 11 additions & 2 deletions page/undergraduate/proposal/thesis/proposaleval.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
\cleardoublepage

\chapterNoTocPageNum{浙江大学本科生文献综述和开题报告考核表}{}{onlyTocItem}

\ifthenelse{\equal{\MajorFormat}{cs}}
{
\chapternonum{毕业论文(设计)文献综述和开题报告考核}
% \chapternonum{毕业论文(设计)文献综述和开题报告考核}
\begin{center}
\bfseries \zihao{3} 毕业论文(设计)文献综述和开题报告考核
\end{center}
\bfseries

{
Expand Down Expand Up @@ -33,7 +38,11 @@
% \signaturewithdate{开题报告审核负责人(签名/签章)}{1897}{5}{21}
}
{
\chapternonum{毕业论文(设计)文献综述和开题报告考核}
% \chapternonum{毕业论文(设计)文献综述和开题报告考核}
\begin{center}
\bfseries \zihao{3} 毕业论文(设计)文献综述和开题报告考核
\end{center}

\bfseries

{
Expand Down
2 changes: 2 additions & 0 deletions zjuthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
\DeclareBoolOption[true]{ListOfFigures}
\DeclareBoolOption[true]{ListOfTables}
\DeclareBoolOption[false]{ListOfAlgorithms}
\DeclareStringOption[false]{LeftEqRight}
\DeclareStringOption[false]{ClearEmptyPage}

\ProcessKeyvalOptions*

Expand Down
34 changes: 33 additions & 1 deletion zjuthesis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
ListOfAlgorithms= false,
% Title
Title = 毕业论文/设计题目,
TitleEng = {{Graduation Thesis Title}}
TitleEng = {{Graduation Thesis Title}},
% zjuthesis-moreFlexible
LeftEqRight = true, % TwoSide=true, keep left and right headers different. Left margin equals to right margin,
ClearEmptyPage = true, % Submitting the electronic version of the thesis does not require blank pages.
]{zjuthesis}

%% Uncomment the following lines if you need multi line titles on cover pages
Expand All @@ -62,6 +65,13 @@

\newcommand{\inputundergraduate}
{
% zjuthesis-moreFlexible
\ifthenelse{\equal{\ClearEmptyPage}{true}}
{
\let\cleardoublepage\clearpage
}{}
% zjuthesis-moreFlexible

\ifthenelse{\equal{\Period}{final}}
{
% Final thesis
Expand All @@ -79,6 +89,12 @@
\bodystyle
\inputpage{final}{cover-part}

% zjuthesis-moreFlexible % 添加承诺书、致谢、摘要至目录,如果不需要直接注释下面三行
\prevstyle
\inputpage{final}{toc-previous}
\bodystyle
% zjuthesis-moreFlexible % 添加承诺书、致谢、摘要至目录,如果不需要直接注释上面三行

\resetpagecounter{}
\inputbody{final/content}
\inputbody{final/post}
Expand All @@ -95,9 +111,19 @@
\inputpage{proposal}{cover}
\inputpage{proposal}{previous}

% zjuthesis-moreFlexible 为终稿版本中的开题报告部分添加目录
\startcontents[proposalPart] % 开题报告局部目录
\stopcontents[proposalPart] % 开题报告局部目录
\prevstyle
\inputpage{proposal}{proposal-toc}
\resumecontents[proposalPart]

\bodystyle
\inputbody{proposal/content}

\stopcontents[proposalPart]
% zjuthesis-moreFlexible 为终稿版本中的开题报告部分添加目录

\poststyle
\inputpage{proposal}{post}
}
Expand Down Expand Up @@ -140,6 +166,12 @@
\bodystyle
\inputpage{final}{cover-part}
\cleardoublepage

% zjuthesis-moreFlexible % 添加承诺书、致谢、摘要至目录,如果不需要直接注释下面三行
\prevstyle
\inputpage{final}{toc-previous}
\bodystyle
% zjuthesis-moreFlexible % 添加承诺书、致谢、摘要至目录,如果不需要直接注释上面三行

\inputbody{final/content}
\inputbody{final/post}
Expand Down
Loading