%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 论文格式表头部分%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\documentclass[11pt, epsf,    paper,    onecolumn,    twoside,    openany,    titlepage,    CJK]{cctbook}
\documentclass[twoside]{nmgdthesis}
%\documentclass[pspdfm]{nmgdthesis}
%\usepackage[dvipdfm]{hyperref}
%\usepackage{epstopdf}
\usepackage[ruled,linesnumbered]{algorithm2e}
\usepackage{setspace}
\usepackage{amsfonts}
\usepackage{color}
\pagestyle{empty}

\setlength{\textfloatsep}{5pt}

% 图形文件的搜索路径
\graphicspath{{chapter/}{figures/}}
\usepackage{mathrsfs}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{latexsym}
\pagestyle{empty}
%%%%%%页面设置%%%%%%%%%%%%%%%%%%%%%%
\usepackage{geometry}
\geometry{inner=3cm, outer=2.5cm, top=2.5cm, bottom=2.5cm, footskip=1.5cm}
\renewcommand{\baselinestretch}{1.5}
%%%%%%%%%%%%%%%华氏摄氏度
\newcommand{\grad}{\ensuremath{^{\circ}}}
\usepackage{latexsym,   amsfonts,   amssymb,   amsmath,   fancyhdr}%调用系统宏包.
\allowdisplaybreaks[4]
\usepackage{indentfirst}  %% 节标题后第一行段缩进
\usepackage{bm}
\usepackage{epstopdf}
\usepackage{epsfig}
\usepackage{extarrows}
\usepackage{fancyhdr}
\usepackage{etoolbox}
\usepackage{float}
\usepackage{booktabs}


\makeatletter
\newcommand{\figcaption}{\def\@captype{figure}\caption}
\newcommand{\tabcaption}{\def\@captype{table}\caption}
\makeatother
%-----------------------------latex正文----------------------------------
%\newcommand{\mycite}[1]{\scalebox{1.3}[1.3]{\raisebox{-0.7ex}{\cite{#1}}}}  %% 定义命令, 得到文献是非上标的情形
\newcommand{\mycite}[1]{${\mbox{\normalsize \cite{#1}}}$}
%{$_{\mbox{\normalsize\cite{#1}}$}%{\scalebox{3.4}[3.4]{\raisebox{-0.2ex}{\cite{#20}}}}  %% 定义命令, 得到文献是非上标的情形
\usepackage[sort&compress]{natbib}

\newcommand{\eops}{\hspace{\fill} \hspace{-0.5 em}\rule{0.5 em}{2 ex}}

\makeatletter %双线页眉
\def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi%
\hrule\@height 0.8pt \@width\headwidth\vskip1pt%上面线为1pt粗
%\hrule\@height 0.3pt\@width\headwidth  % 下面0.1pt粗
\vskip-2\headrulewidth\vskip-1pt}      %两条线的距离1pt
\vspace{6mm}}     %双线与下面正文之间的垂直间距
\makeatother

% 设置脚注为带圆圈的数字
\usepackage{footmisc}
\renewcommand{\thefootnote}{\textcircled{\arabic{footnote}}}

% 设置每页脚注重新编号
\usepackage{perpage}
\MakePerPage{footnote}

% 设置脚注格式
\renewcommand{\footnotesize}{\zihao{-5}\songti}  % 小五号宋体
\setlength{\footnotesep}{0pt}  % 段前段后0磅

% 禁止参考文献自动添加到目录
\patchcmd{\thebibliography}{\addcontentsline{toc}{chapter}{\bibname}}{}{}{}
%\usepackage[super, square, comma, sort&compress]{natbib}% 参考文献上标及压缩引用
%\newcommand{\ucite}[1]{$^{\mbox{\scriptsize \cite{#1}}}$}%参考文献上标及压缩引用
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%把参考文献改为本章参考文献%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\def\thebibliography#1{\center{\bf\normalsize 本章参考文献}\list
%{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
%\advance\leftmargin\labelsep
%\usecounter{enumi}}
%\def\newblock{\hskip .11em plus .33em minus .07em}
%\sloppy\clubpenalty4000\widowpenalty4000 \sfcode`\.=1000\relax}
%%%%%%%%%%%%%%%该部分是公式的形式是（1-1）还是（1.1）
\renewcommand{\theequation}{\thechapter-\arabic{equation}}
%%%%%%%%%%%% 该部分是使得公式前面加上“式”这个字

% ========== 定义正文分页命令（只分页，不强制奇数页）==========
\newcommand{\chapterend}{\clearpage}

%\renewcommand \theequation{\thesection.\arabic{equation}}
\renewcommand\theequation{\arabic{chapter}-\arabic{equation}}

\renewcommand\thefigure{\arabic{chapter}-\arabic{figure}}
\newcommand{\h}{\hspace*{2\ccwd}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 重新设置计数器%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 论文正文部分%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\setlength{\textfloatsep}{5pt}
\begin{document}
%%----------------- 封面页和独创性声明部分 ----------------- %%
\frontmatter
\include{fengmian/fengmian}
\clearpage{\pagestyle{empty}\cleardoublepage}

%%----------------- 前言部分 ----------------- %%
\frontmatter
\include{chap/abstract}
\clearpage{\pagestyle{empty}\cleardoublepage}

% 自动生成目录页，目录页使用 school 样式
\pagestyle{school}
\tableofcontents
\clearpage{\pagestyle{empty}\cleardoublepage}

% 在正文开始前临时修改 \cleardoublepage
\makeatletter
\def\cleardoublepage{\clearpage}  % 正文中只分页，不插空白
\makeatother

%%----------------- 正文部分 ----------------- %%
    \mainmatter
    \fancyhead[CO]{\zihao{5}第一章 \hspace{6mm}绪论}
    \fancyfoot[CO,CE]{\zihao{5}\thepage}
    \include{chap/chapter1}
    \chapterend
    \fancyhead[CO]{\zihao{5}第二章 \hspace{6mm}第二章章标题}
    \fancyfoot[CO,CE]{\zihao{5}\thepage}
    \include{chap/chapter2}
    \chapterend
    \fancyhead[CO]{\zihao{5}第三章 \hspace{6mm}论文基本要求}
    \fancyfoot[CO,CE]{\zihao{5}\thepage}
    \include{chap/chapter3}
    \chapterend
    \fancyhead[CO]{\zihao{5}第四章 \hspace{6mm}论文书写规定}
    \fancyfoot[CO,CE]{\zihao{5}\thepage}
    \include{chap/chapter4}
    \chapterend
    \fancyhead[CO,CE]{\zihao{5}内蒙古工业大学硕士学位论文}
    \fancyfoot[CO,CE]{\zihao{5}\thepage}
    \include{chap/ZongJie}
    \chapterend
    \fancyhead[CO,CE]{\zihao{5}内蒙古工业大学硕士学位论文}
    \fancyfoot[CO,CE]{\zihao{5}\thepage}
    \include{chap/CanKaoWenXian}
    \chapterend
    \fancyhead[CO,CE]{\zihao{5}内蒙古工业大学硕士学位论文}
    \fancyfoot[CO,CE]{\zihao{5}\thepage}
    \include{chap/ZhiXie}
    \chapterend
    \fancyhead[CO,CE]{\zihao{5}内蒙古工业大学硕士学位论文}
    \fancyfoot[CO,CE]{\zihao{5}\thepage}
    \include{chap/FuLu}
    \chapterend
    \fancyhead[CO,CE]{\zihao{5}内蒙古工业大学硕士学位论文}
    \fancyfoot[CO,CE]{\zihao{5}\thepage}
    \include{chap/YanJiuChengGuo}
    \clearpage{\pagestyle{empty}\cleardoublepage}  %%%这个是去掉章之间空白页的页眉页脚
    \backmatter
\end{document}
