代码如下:

\documentclass{ctexart}
\setcounter{page}{6}
\setlength\textheight{100.0pt}
\setlength\textwidth{200.0pt}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{layout}
%\pagestyle{empty}%不设置页眉页脚
\footskip = 10pt
\pagestyle{fancy}% 设置页眉
\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{document}
\section{第一节}
1、1子曰:“学而时习之,不亦说乎?有朋自远方来,不亦乐乎?人不知而不愠,不亦君子乎?”

1、2有子曰:“其为人也孝弟,而好犯上者,鲜矣;不好犯上,而好作乱者,未之有也。君子务本,本立而道生。孝弟也者,其为仁之本与!”
\section{第二节}
1、3子曰:“巧言令色,鲜矣仁!”

1、4曾子曰:“吾日三省吾身:为人谋而不忠乎?与朋友交而不信乎?传不习乎?”
\end{document}

效果图一:

双线页眉的设置

点赞(1)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部