代码如下:
\documentclass{article}
\usepackage{CJK}
\setcounter{page}{6}
\setlength\textheight{100.0pt}
\setlength\textwidth{200.0pt}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{layout}
%\pagestyle{empty} %不设置页眉页脚
\footskip = 10pt
\pagestyle{fancy} % 设置页眉
\begin{CJK}{GBK}{kai}\end{CJK}
\lhead{page \thepage\ of \pageref{LastPage}}
\chead{页眉中间}
\rhead{\small\leftmark}
\cfoot{\thepage}
\rfoot{页脚左}%
\lfoot{页脚右}
\renewcommand{\headrulewidth}{1pt} %页眉线宽,设为0可以去页眉线
\setlength{\skip\footins}{0.5cm} %脚注与正文的距离
\renewcommand{\footnotesize}{} %设置脚注字体大小
\renewcommand{\footrulewidth}{1pt} %脚注线的宽度
%===============
%双线页眉的设置
%\makeatletter %双线页眉
%\def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi%
%\hrule\@height 1.0pt \@width\headwidth\vskip1pt%上面线为1pt粗
%\hrule\@height 0.5pt\@width\headwidth %下面0.5pt粗
%\vskip-2\headrulewidth\vskip-1pt} %两条线的距离1pt
% \vspace{6mm}} %双线与下面正文之间的垂直间距
%\makeatother
%===============
%\pagestyle{fancy}
%\fancyhead{} %clear all fields
%\fancyhead[CE]{ \应\用 \数 \学 }
%\fancyhead[CO]{{ huangzh: 数学}}
%\fancyhead[RO]{\thepage} %奇数页眉的右边
%\fancyhead[LE]{\thepage} %偶数页眉的左边
%\fancyhead[RE]{\zihao{-5} 2005 c}
%\fancyfoot[C]{}
%================================================================%
\setcounter{tocdepth}{3}
\begin{CJK*}{GBK}{song}
\begin{document}
\section{The first}
\section{第二部分}
\paragraph{}
\newpage
\end{CJK*}
\end{document}