1.全局默认参数
latex支持默认的三种预定义的页眉页脚样式(pagestyle),使用方法是是pagestyle{style},其中的style参数确定了使用哪种样式,包括三种:
- plain,默认设置,在页脚显示页码
- headings, 页脚空白,在页眉中显示章节名及页码
- empty, 页眉页脚均设置为空白
2. 局部页面设置
如果只改变当前页面的样式,可以采用 hispagestyle{plain}来设置。
3. 自定义页眉页脚(fancyhdr)
使用fancyhdr包来设置特定的页眉页脚(headers and footers)。
以下代码展示了一个样例,其中页眉是自定义的文章标题,页脚采用 page #number of # total number 形式,表明当年页码和总页码。
usepackage{fancyhdr} % Headers and footers
usepackage{lastpage}
pagestyle{fancy} % All pages have headers and footers
fancyhead{} % Blank out the default header
fancyfoot{} % Blank out the default footer
fancyhead[C]{This is my custom header text } % Custom header text
fancyfoot[RO,LE]{ Page hepage hspace{1pt} of pageref{LastPage}} % Custom footer text
© 版权声明
文章版权归作者所有,未经允许请勿转载。如内容涉嫌侵权,请在本页底部进入<联系我们>进行举报投诉!
THE END


















暂无评论内容