\documentclass{book}
\usepackage{geometry}
\geometry{a4paper,left=2cm,right=2cm,top=2.5cm,bottom=2.5cm} %landscape页面横制,twocolumn双栏
\usepackage{ctex}
\newcommand{\xingkai}{\CJKfontspec{华文行楷}}
\usepackage{xcolor}
\usepackage{lastpage}
\usepackage{fancyhdr}
\fancypagestyle{preContent}{
\fancyhead{}
\renewcommand\headrulewidth{0pt}
\fancyfoot[C]{\thepage}
}
\fancypagestyle{zhengwen}{
\fancyhead{}
\renewcommand\headrulewidth{0pt}
\fancyfoot[c]{第~\thepage~页~~}
}
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[C]{第~\thepage~页}
\renewcommand{\headrulewidth}{0pt}
}
\begin{document}
\pagestyle{preContent}
\frontmatter
\tableofcontents
\mainmatter
\pagestyle{zhengwen}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\usepackage{ctex}
\usepackage{fancyhdr}
\fancypagestyle{preContent}{
\fancyhead{}
\renewcommand\headrulewidth{0pt}
\fancyfoot[C]{\thepage}
}
\fancypagestyle{zhengwen}{
\fancyhead{}
\renewcommand\headrulewidth{0pt}
\fancyfoot[c]{第~\thepage~页~~}
}
\begin{document}
\frontmatter
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}
}
\pagestyle{preContent}
\tableofcontents
\mainmatter
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[C]{第~\thepage~页}
\renewcommand{\headrulewidth}{0pt}
}
\pagestyle{zhengwen}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\end{document}```