多页图表列表的页眉和页脚

多页图表列表的页眉和页脚

我用的是花式高清包来修改页眉和页脚。如果我的\listoffigures跨页,那么 LoF 第一页上的页眉和页脚就不美观了。下面的 TeX 示例演示了这一点。

请问我做错了什么?

\documentclass{report}

\usepackage[a3paper,landscape]{geometry}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[L]{A}
\fancyhead[C]{FANCY}
\fancyhead[R]{HEADER}

\fancyfoot{}
\fancyfoot[L]{A}
\fancyfoot[C]{FANCY}
\fancyfoot[R]{FOOTER}

\begin{document}

\listoffigures\thispagestyle{fancy}

\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage
\begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage

\end{document}

答案1

章节的第一页(以及内部使用的图表列表的第一页\chapter)使用普通页面样式。因此您需要重新定义它:添加

\fancypagestyle{plain}{
  \fancyhead{}
  \fancyhead[L]{A}
  \fancyhead[C]{FANCY}
  \fancyhead[R]{HEADER}

  \fancyfoot{}
  \fancyfoot[L]{A}
  \fancyfoot[C]{FANCY}
  \fancyfoot[R]{FOOTER}
}

在您已进行类似设置之后。

如果两个页面样式确实完全相同,那么

\makeatletter
\let\ps@plain\ps@fancy
\makeatother

将使调用plain页面样式等同于调用fancy页面样式。使用上面描述的重新定义样式的方法,plain您可以获得更大的灵活性。

相关内容