You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB

%%%% fancyhdr设置页眉页脚
%% 页眉页脚宏包
\usepackage{fancyhdr}
%% 页眉页脚风格
\pagestyle{fancy}
%%这两行代码是修改
%\leftmark和\rightmark的经典模式
\renewcommand{\chaptermark}[1]{\markboth{{\heiti {\thechapter{}}}\hspace{1em} #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection{} #1}}
%% 清空当前页眉页脚的默认设置
\fancyhf{}
%\fancyhead[L]{\scriptsize \fangsong \ascii{ZTE}中兴}
%\fancyhead[R]{\scriptsize \fangsong 内部公开}
%\fancyhead[CE]{\scriptsize \fangsong \leftmark}
%\fancyhead[CO]{\scriptsize \fangsong \rightmark}
%\fancyfoot[RO, LE]{\scriptsize \thepage}
%\fancyfoot[C]{\scriptsize \fangsong 本文中的所有信息均为中兴通讯股份有限公司内部信息,不得向外传播}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
%第{\couriernew\thechapter{}}章
%%下面开始修改页眉和页脚
\fancyhead[L]{\small \fangsong \leftmark}
\fancyhead[R]{\small \fangsong \rightmark}
\fancyfoot[C] {\small \thepage}
%\fancyhead[RO, LE]{\small \thepage}
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers
\renewcommand{\headrulewidth}{0pt} % and the line.
}