页脚出现在除第一页之外的所有页面上。以下是 MWE:
\documentclass[12pt]{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\renewcommand{\headrulewidth}{0pt} % no line in header area
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\thepage} % page number in "outer" position of footer line
\fancyfoot[RE,LO]{I reserve the right to change anything in this document at any time.} % other info in "inner" position of footer line
\title{Env. Science}
\author{Syllabus}
\date{}
\begin{document}
\maketitle
\hrule
\smallskip
Here is some random text.
\end{document}
答案1
对于文档类article
,第一页始终具有plain
样式(页面底部只有页码)。fancyhdr
例如,可以使用包指定其他页面的样式。
\thispagestyle{fancy}
如果您也希望第一页与其他页具有相同的样式,请在该行后插入命令\maketitle
:
\documentclass[12pt]{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\renewcommand{\headrulewidth}{0pt} % no line in header area
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\thepage} % page number in "outer" position of footer line
\fancyfoot[RE,LO]{I reserve the right to change anything in this document at any time.}
\title{Env. Science}
\author{Syllabus}
\date{}
\begin{document}
\maketitle
\thispagestyle{fancy} % <---
\hrule
\smallskip
Here is some random text.
\end{document}