新章节的页眉显示在上一章节的最后一页

新章节的页眉显示在上一章节的最后一页

我在撰写论文时遇到了以下问题。我在 Overleaf 上使用包含“fancyhdr”包的 Latex 模板,用于在页面左上角添加章节标题(此处为案例项目:https://it.overleaf.com/1433821482pvjkxhmrvwnh)。但是,每章的最后一页都有页眉,其中报告了下一章的名称。不幸的是,我不知道模板的确切名称,因为几年前我的一位同事给了我。顺便说一下,这是主 (.tex) 文件:

% Set up the document
\documentclass[a4paper, 11pt, oneside]{Thesis}  % Use the "Thesis" 
%style, based on the ECS Thesis style by Steve Gunn
\usepackage{placeins} % put this in your pre-amble
\usepackage[square, numbers, comma, sort&compress]{natbib}  % Use 
%the "Natbib" style for the references in the Bibliography

%% ----------------------------------------------------------------
\begin{document}
\frontmatter      % Begin Roman style (i, ii, iii, iv...) page 
numbering

\begin{titlepage}
    \begin{center}
        \textbf{Ph.D. DEGREE IN ...}
    \end{center}
\end{titlepage}

%% ----------------------------------------------------------------

\setstretch{1.5}  % It is better to have smaller font and larger 
%line spacing than the other way round

% Define the page headers using the FancyHdr package and set up for 
%one-sided printing
\fancyhead{}  % Clears all page headers and footers
\rhead{\thepage}  % Sets the right side header to show the page 
%number
\lhead{}  % Clears the left side page header

\pagestyle{fancy}  % Finally, use the "fancy" page style to 
%implement the FancyHdr headers
%% ----------------------------------------------------------------
\lhead{\emph{Contents}}  % Set the left side page header to 
%"Contents"
\tableofcontents  % Write out the Table of Contents
%% ----------------------------------------------------------------
\lhead{\emph{List of Figures}}  % Set the left side page header to 
%"List if Figures"
\listoffigures  % Write out the List of Figures
%% ----------------------------------------------------------------
\lhead{\emph{List of Tables}}  % Set the left side page header to 
%"List of Tables"
\listoftables  % Write out the List of Tables
%% ----------------------------------------------------------------

% End of the pre-amble, contents and lists of things
% Begin the Dedication page

\setstretch{1.5}  % Return the line spacing back to 1.5
\pagestyle{empty}  % Page style needs to be empty for this page
\addtocontents{toc}{\vspace{2em}}  % Add a gap in the Contents, for 
%aesthetics

%% ----------------------------------------------------------------
\mainmatter   % Begin normal, numeric (1,2,3...) page numbering
\pagestyle{fancy}  % Return the page headers back to the "fancy" 
%style

% Include the chapters of the thesis, as separate files
% Just uncomment the lines as you write the chapters

\input{Chapters/Chapter1} 

\input{Chapters/Chapter2}

\input{Chapters/Chapter3}


%% ----------------------------------------------------------------
\label{Bibliography}
\lhead{\emph{Bibliography}}  % Change the left side page header to 
%"Bibliography"
\bibliographystyle{unsrtnat}  % Use the "unsrtnat" BibTeX style for 
%formatting the Bibliography
\bibliography{Bibliography}  % The references (bibliography) 
%information are stored in the file named "Bibliography.bib"

\end{document}  % The End
%% ----------------------------------------------------------------

每个输入章节都以这些行开头:

\lhead{\emph{Chapter number "x"}}
\chapter{Chapter number "x"}

这不是一个可行的示例,因为缺少文件 .sty 和 .cls(以及输入章节)。但是,如果我编译它,在第 3 页(第 1 章末尾)我已经看到下一章的标题,但它在下一页。我是否应该提供其他信息来帮助我解决这个问题?谢谢

相关内容