如何在 fancyhdr 中对所有页面进行编号

如何在 fancyhdr 中对所有页面进行编号

我不知道为什么,但以下代码只对第一页进行编号,而我需要对所有页面进行编号。有谁能帮我吗?

\documentclass[10pt]{article}
\usepackage{fancyhdr,graphicx,times}
\renewcommand{\headrulewidth}{0pt}
\usepackage[top=2.5cm, bottom=2cm, left=2.5cm, right=2.5cm]{geometry}

\setcounter{secnumdepth}{0}
\cfoot{}
\lfoot{\thepage}
\fancypagestyle{plain}{
  \fancyhead[R]{\includegraphics[width=8cm,height=2.1cm]{LogiMod.jpg}}% Right header
  \fancyhead[L]{\textbf{Vernieuwingsimpuls}\\
  \textbf{Innovational Research Incentives Scheme\\
Grant application form 2014} \\
\textit{Please refer to Explanatory Notes when completing this form}
}

}

\pagestyle{plain}

\author{}
\title{}
\date{}

\begin{document}
\maketitle

\section{Overview}
\newpage

\section{Second Section}
\newpage

\section{Third Section}

\end{document}

答案1

它在那里,但由于页眉太大,它已经掉到了页面底部。设置页面大小时,您应该为页眉留出空间。

\documentclass[10pt]{article}
\usepackage{fancyhdr,graphicx,times}
\renewcommand{\headrulewidth}{0pt}
\usepackage[top=2.5cm, bottom=2cm, left=2.5cm, right=2.5cm,headheight=8ex,includehead,includefoot]{geometry}

\setcounter{secnumdepth}{0}
\fancypagestyle{plain}{\fancyhf{}
\fancyhead[R]{\includegraphics[width=8cm,height=2.1cm]{example-image-a}}% Right header
\fancyhead[L]{\textbf{Vernieuwingsimpuls}\\
\textbf{Innovational Research Incentives Scheme\\
Grant application form 2014} \\
\textit{Please refer to Explanatory Notes when completing this form}}
\fancyfoot[L]{\thepage}}

\pagestyle{plain}
\author{}
\title{}
\date{}

\begin{document}
\maketitle

\section{Overview}
\newpage

\section{Second Section}
\newpage

\section{Third Section}

\end{document}

相关内容