![我的标题中没有内容](https://linux22.com/image/311158/%E6%88%91%E7%9A%84%E6%A0%87%E9%A2%98%E4%B8%AD%E6%B2%A1%E6%9C%89%E5%86%85%E5%AE%B9.png)
我在获取论文标题时遇到问题代码是:
\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}