我正在使用documentclass{report}
。我希望所有页面(包括摘要)上都有页脚,但除每章第一页外的所有页面都有页眉
\documentclass[a4paper,11pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, total={6in, 8in}, margin=0.5mm]{geometry}
\usepackage[english]{babel}
\usepackage[document]{ragged2e}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{caption}
\usepackage{subcaption}
\graphicspath{{\Images}}
\usepackage{float}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage{amssymb}
\usepackage{exercise}
\usepackage{lipsum}
\usepackage{gensymb}
\usepackage{pifont}
\usepackage{multirow}
\usepackage{subfiles}
\usepackage{comment}
\usepackage{array}
\usepackage[toc,page]{appendix}
\usepackage{booktabs}
\usepackage{dirtytalk}
\usepackage{geometry}
\usepackage{afterpage}
\usepackage{subfiles}
\usepackage{blindtext}
\usepackage{nomencl}
\makenomenclature
\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
\item[\bfseries
\ifstrequal{#1}{L}{List of Symbols}{%
\ifstrequal{#1}{A}{Abbreviations}{}}%
]}
\graphicspath{{D10/}{D15/}}
\newcommand\Tstrut{\rule{0pt}{2.6ex}} % = `top' strut
\newcommand\Bstrut{\rule[-0.9ex]{0pt}{0pt}} % = `bottom' strut
\hypersetup{
colorlinks,
citecolor=blue,
filecolor=blue,
linkcolor=blue,
urlcolor=blue
}
\thispagestyle{empty}
\begin{figure} [H]
\includegraphics [width=20.9cm, height=29.65cm] {TU}
\end{figure}
\usepackage{tikz}
\usetikzlibrary{"arrows", "automata", "backgrounds", "calendar", "chains", "matrix", "mindmap", "patterns", "petri", "shadows", "shapes.geometric", "shapes.misc", "spy", "trees"}
\afterpage{\null\newpage}
\usepackage[round]{natbib}
\fancyhead[LE,RO]{\textbf{\chaptername}}
\fancyhead[RE,LO]{}
\fancyfoot[LE,RO]{\textbf{Thesis}}
\fancyhead[RE,LO]{Master of Science}
\begin{document}
\newgeometry{top=1in,bottom=1in,right=1in,left=1in}
\begin{titlepage}
\end{titlepage}
\newpage
\thispagestyle{empty}
\mbox{}
\clearpage
\addcontentsline{toc}{chapter}{Abstract}
\chapter*{Abstract}
\thispagestyle{plain}
\justify
\clearpage
\newpage
\thispagestyle{empty}
\mbox{}
\clearpage
\addcontentsline{toc}{chapter}{Acknowledgements}
\chapter*{Acknowledgements}
\thispagestyle{plain}
\cfoot{}
\clearpage
\newpage
\thispagestyle{empty}
\mbox{}
\clearpage
\textheight = 674pt
\textwidth = 440pt
\pagestyle{fancy}
\fancyhf{}
\rhead{}
\lhead{}
\rfoot{}
\lfoot{}
\cfoot{}
\clearpage
\tableofcontents
\thispagestyle{empty}
\clearpage
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
\clearpage
\newpage
\thispagestyle{empty}
\mbox{}
\clearpage
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\clearpage
\newpage
\thispagestyle{empty}
\mbox{}
\clearpage
\subfile{nomenclature}
\addcontentsline{toc}{chapter}{Nomenclature}
\printnomenclature
\clearpage
\newpage
\thispagestyle{empty}
\mbox{}
\clearpage
\newgeometry{width=150mm,top=25mm,bottom=25mm,bindingoffset=0.5in}
\pagenumbering{arabic}
\textheight = 674pt
\textwidth = 440pt
\fancyhf{}
\cfoot{\thepage}
\clearpage
\chapter{Introduction}
\clearpage
\newpage
\thispagestyle{empty}
\mbox{}
\clearpage
\chapter{Problem Statement}
\clearpage
\newpage
\thispagestyle{empty}
\mbox{}
\clearpage
\begin{appendices}
\subfile{appendices}
\end{appendices}
\clearpage
\newpage
\thispagestyle{empty}
\mbox{}
\clearpage
\bibliographystyle{plainnat}
\bibliography{reference}
\newpage
\thispagestyle{empty}
\mbox{}
\clearpage
\end{document}
答案1
在文档的开头(例如,就在 \begin{document} 之前):
\fancypagestyle{plain}{}
这说明plain
pagestyle与pagestyle相同fancy
。
然后就在第一章之前:
\fancypagestyle{plain}{% copy pagestyle fancy
\fancyhead[]{}% but remove all header fields
\renewcommand{\headrule}{}}% and remove the headrule