增加 nocover 选项

This commit is contained in:
KAAAsS 2022-06-01 11:46:18 +08:00
parent 8e217f26df
commit bad7df9522
Signed by: KAAAsS
GPG Key ID: D22F53AF662411FE

View File

@ -23,10 +23,12 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifmasterdegree\masterdegreefalse %doctor \newif\ifmasterdegree\masterdegreefalse %doctor
\newif\ifpdfcover\pdfcoverfalse \newif\ifpdfcover\pdfcoverfalse
\newif\ifnocover\nocoverfalse
\newif\ifchapterx\chapterxfalse \newif\ifchapterx\chapterxfalse
\DeclareOption{master}{\masterdegreetrue} \DeclareOption{master}{\masterdegreetrue}
\DeclareOption{pdfcover}{\pdfcovertrue} %using pdfcover,TOdo \DeclareOption{pdfcover}{\pdfcovertrue} %using pdfcover,TOdo
\DeclareOption{nocover}{\nocovertrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ProcessOptions\relax %revised by Quansheng Guan \ProcessOptions \ProcessOptions\relax %revised by Quansheng Guan \ProcessOptions
\LoadClass[12pt,a4paper,openany]{book} \LoadClass[12pt,a4paper,openany]{book}
@ -377,11 +379,14 @@
\renewcommand\mainmatter{% \renewcommand\mainmatter{%
\@mainmattertrue \@mainmattertrue
\chapterxfalse % \chapterxfalse %
\ifnocover
\else
\ifodd \arabic{page} % \ifodd \arabic{page} %
\clearpage \clearpage
\pagestyle{empty} \pagestyle{empty}
\mbox{} % \mbox{} %
\fi \fi
\fi
\clearpage \clearpage
\pagenumbering{arabic} \pagenumbering{arabic}
@ -407,6 +412,8 @@
\ifpdfcover \ifpdfcover
%%coverpage from pdf file %%coverpage from pdf file
\includepdf[pages=-]{thesis_cover.pdf}%pdftexlyx \includepdf[pages=-]{thesis_cover.pdf}%pdftexlyx
\fi
\ifnocover
\else \else
%%buildin coverpage %%buildin coverpage
\begin{titlepage} \begin{titlepage}