加页眉本不是问题,问题是在第一页中加页眉,而其他页不加,就得靠代码。
当使用\maketitle 后,页面效果自动会变化,导致第一页没有页眉,必须手动恢复页面才可以。方法即在\maketitle 之后加入如下代码:
使用代码如下:
\maketitle
%header
\thispagestyle{fancy}
\fancyhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{\thepage} %current page number
\rfoot{}
\fancyhead[L]{This is the header text you need to change.}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.7pt}
效果如下:

