\documentclass[a4paper, twoside, 12pt]{book}
\usepackage{ctex}
\renewcommand
\baselinestretch{1.41}
\usepackage{ccmap}%这个包在texlive中会报错
\usepackage{amsmath, amsthm, amssymb, amscd}
\usepackage{makecell,booktabs}
\usepackage{float}
\usepackage{mathrsfs}
\usepackage{latexsym}
\usepackage{setspace}
\usepackage{headrule}%这个包在texlive中会报错
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{tocbibind}
\usepackage{fancyhdr}
\allowdisplaybreaks
\newtheorem{theorem}{\indent 定理}[section]
\newtheorem{corollary}[theorem]{\indent 推论}
\newtheorem{lemma}[theorem]{\indent 引理}
\newtheorem{proposition}[theorem]{\indent 命题}
\newtheorem{nature}[theorem]{\indent 性质}
\newtheorem{definition}[theorem]{\indent 定义}
\newtheorem{remark}[theorem]{\indent 注记}
\newtheorem{example}[theorem]{\indent 例}
\newcommand{\headingstobeshown}{}
\newcommand{\cndash}{\rule{0.2em}{0pt}\rule[0.35em]{1.6em}{0.05em}\rule{0.2em}{0pt}}
\renewcommand{\proofname}{\bf{\indent 证明}}
\renewcommand\subsectionformat{}%添加这个命令在texlive中会报错
\renewcommand\sectionformat{}%添加这个命令在texlive中会报错
\def\Box{\hfill\square}
%%%%%%%%%%%%%%%%%%%
\numberwithin{equation}{section}
\topmargin=0.5cm
\oddsidemargin=20pt
\evensidemargin=0pt
\textwidth=15.1cm
\textheight=22.5cm
%%%%%%%%%%%%%%%%%
\makeatletter
\numberwithin{equation}{section}
\def\ps@headings{%
\def\@oddfoot{\hfill\thepage\hfill}
\def\@evenfoot{\hfill\thepage\hfill}
\def\@evenhead{\thepage\hfil\slshape\leftmark}% !!!
\def\@oddhead{\slshape\rightmark\hfil\thepage}% !!!
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth {% !!!
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\chaptername \ \ % !!!
\fi
\fi
##1}{}}% !!!
\def\sectionmark##1{%
\markright {% !!!
\ifnum \c@secnumdepth >\z@
\sectionname \ \ % !!!
\fi
##1}}}% !!!
\ps@headings
\renewcommand{\@oddhead}{\protect\footnotesize{%
\begin{minipage}{\textwidth}
{\heiti \hfill \ziju{0.5} 家里蹲大学博士学位论文
\hfill} \\
\begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}r@{}}%
{\kaishu \leftmark} & { \kaishu \rightmark}
\\ \hline \hline\vspace{2pt}
\end{tabular*}
\end{minipage}
}}
\renewcommand{\@evenhead}{\@oddhead}
\makeatletter \@addtoreset{equation}{section} \makeatother
\renewcommand\contentsname{目 \ 录}
\renewcommand\bibname{参考文献}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 摘要 %%%%%%%%%%%%%%%
\newpage\pagenumbering{Roman}\thispagestyle{plain}\chapter*{摘 \ 要}
\addcontentsline{toc}{chapter}{摘 \ \ \ \ 要}
在第一章中, 我们主要阐述本文所讨论问题的背景及研究现状, 并简要介绍本文的主要工作以及相关的预备知识和一些记号.
\bigskip
\textbf{\zihao{4}\textbf{关键词}:} 临界指数;\ Lusternik-Schnirelman定理.
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of 摘要 %%%%%%%%%%%%%%%
\thispagestyle{plain}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The Abstract of Thesis %%%
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{\large Abstract}
In this thesis,
\bigskip
\textbf{\zihao{4}\textbf{Keywords}:} Lusternik-Schnirelman theory.
\newpage
\thispagestyle{plain}
\tableofcontents
\newpage
\pagenumbering{arabic} \setcounter{page}{1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 引言 %%%%%%%%%%%%%
\chapter{引 言}\renewcommand\headingstobeshown{ 引 \ 言}
本章介绍了与本文所研究课题相关的背景知识, 发展概况以及我们所做的主要工作.
\section{问题的背景及研究现状} %%使用\section命令会报错
\chapter{第一章}
\section{问题的背景及研究现状} %%使用\section命令会报错
\begin{thebibliography}{199}
\bibitem{ass} AAAA
\end{thebibliography}
%%%%%%%%%%%致谢
\newpage\thispagestyle{empty}\chapter*{\zihao{2} 致 \ \ \ 谢}
\addcontentsline{toc}{chapter}{致\ \ \ \ \ 谢}\bigskip
aaa
\chapter*{攻读XX学位期间发表的学术论文}
\addcontentsline{toc}{chapter}{攻读XX学位期间发表的学术论文}
\begin{enumerate}
\vskip 20pt
{\zihao{4}}
\item 1
\vskip 15pt
\item 2
\vskip 15pt
\item 3
\end{enumerate}
\end{document}
将上述出问题的命令注释后texlive能运行,但是和ctex的不一样。比较如下