我在获取论文标题时遇到问题代码是:
\usepackage{fancyhdr}
\includeonly{Chapters/Chapter1,Chapters/Chapter2,Chapters/Chapter3}
\pagestyle{fancy}
\rhead{}
\lhead{\nouppercase{\textsc{\leftmark}}}
\renewcommand{\headrulewidth}{0.4pt}
\begin{document}
\title{
\huge{\textbf{Luminescent properties of semiconductor materials}}\\[1.2cm]
\Large{A thesis submitted to the University of Manchester \\ for the degree of Doctor of Philosophy in the Facultly of Engineering and Physical Science} \\[1cm]
\Large{2015} \\
\Large{Rachel Southern-Holland} }
\author{}
\date{}
\maketitle
\tableofcontents
\listoffigures
\newpage
\include{Chapters/Chapter1} %Introduction
\include{Chapters/Chapter2} %Literature review
\include{Chapters/Chapter3} %Methods
\end{document}
但我在文档顶部只看到一行,但没有章节名称。有人知道我哪里错了吗?谢谢
答案1
我完成了您的示例,以便可以运行,并且您提供的标题代码确实在左(偶数)页提供了标题,而奇数(右)页没有标题\rhead{}
因此第 4 页有:
\documentclass{report}
\usepackage{fancyhdr}
\includeonly{Chapters/Chapter1,Chapters/Chapter2,Chapters/Chapter3}
\pagestyle{fancy}
\rhead{}
\lhead{\nouppercase{\textsc{\leftmark}}}
\renewcommand{\headrulewidth}{0.4pt}
\begin{document}
\title{Luminescent properties of semiconductor materials}
\begin{abstract}A thesis submitted to the University of Manchester \\ for the degree of Doctor of Philosophy in the Facultly of Engineering and Physical Science
\end{abstract}
%{\Large 2015} %NOT \Large{2015}!!! (otherwise whole document will be large
\author{Rachel Southern-Holland}
\date{2015}
\maketitle
\tableofcontents
\listoffigures
\chapter{Zzzzz}
\section{bbb}
aaaa aaaa aaa \newpage bbb bbb bbb
aaaa aaaa aaa \newpage bbb bbb bbb
\chapter{Zzzzzzzz}
\section{bbb bb}
aaaa aaaa aaa \newpage bbb bbb bbb
aaaa aaaa aaa \newpage bbb bbb bbb
\end{document}