在我的论文中,我定义了一些后记。当我这样做时,后记(例如摘要)会从上一章中获取章节号。我不希望标题中包含任何章节号。但我想保留后记的名称,即标题中的摘要,就像现在定义的一样。
代码如下所示 - 我没有包含单独章节的详细信息。
%---------------------Preamble---------------%
\documentclass[twoside,b5paper,9.5pt,openright]{book}
\usepackage[total={13cm,19.5cm},top=2.5cm,bottom=2.0cm,left=2.0cm,right=2.0cm, includefoot]{geometry}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{amsmath}
\usepackage{tocloft}
\usepackage{fixltx2e}
\usepackage{sectsty}
\usepackage[english]{babel}
\usepackage{microtype} % removes extra spacing between text
\usepackage{chapterbib}
\pagenumbering{gobble} % Remove page numbers in a section. The counting starts from Introduction
\usepackage{fancyhdr} % fancy heading style in headers and footers
\usepackage{footnote} % use with savenotes to show footnotes % footnotemark can be used when you have to use the same footnote twice (to avoid repetition)
\usepackage{graphicx} % include graphs/ figures in the file
\usepackage{setspace} % to set the line spacing in the document
\usepackage{ragged2e}
\usepackage{lscape} % to write pages in landscape environment
\usepackage{threeparttable} % to add footnotes to the tables
\usepackage{booktabs}
\usepackage{caption} % to create some space between table caption and table, otherwise there was no space
\captionsetup[table]{skip=5pt}
\usepackage[normalem]{ulem} % to underline the text
\providecommand\phantomsection{}
\setcounter{secnumdepth}{3}
\usepackage{graphicx}
\usepackage[labelfont=bf]{caption}
\usepackage[font={small}]{caption}
\let\newfloat\relax
\usepackage{floatrow}
\floatsetup[table]{capposition=top}
\floatsetup[figure]{capposition=bottom}
\usepackage{etoolbox}
\usepackage{subfig}
\usepackage{xcolor}
\usepackage{grffile} % to avoid printing the figure name (or otherwise, give figure names without spaces)
\usepackage{float} % figures as 6 (a), 6 (b) etc.
\usepackage{tabu}
\usepackage{tikz}
\usepackage{arydshln}
\raggedbottom
\usepackage[compact]{titlesec}
\usepackage[sort&compress]{natbib}
\usepackage{lipsum}
\usepackage{hyperref}
\setlength{\bibsep}{3.05pt} % spacing between different references
\def\bibfont{\scriptsize} % fontsize of the references
\usepackage[
singlelinecheck=false
]{caption}
%---------------------To create fancy chapter title---------------%
\titleformat{\chapter}[display]
{\bfseries\Large} % here change huge or large to get small or large fonts in chaptertitle
{\filright\MakeUppercase{\chaptertitlename} \Large\thechapter}
{1ex}
{\titlerule\vspace{1ex}\filright}
[\vspace{1ex}\titlerule]
%---------------------Document starts here---------------%
\begin{document} % the document starts here!
%---------------------Table of contents---------------%
\pagestyle{empty}
\begin{onehalfspacing} % here doublespacing can be used. Adjust the margins of the page!
\setcounter{tocdepth}{0} % to display a detailed table of contents with each subsection
\tableofcontents
\end{onehalfspacing}
\pagestyle{empty}
%---------------------Adding space in the whole thesis---------------%
\cleardoublepage
\begin{spacing}{1.15}
%\sectionfont{\noindent\fbox} % makes a box around the section title.
%---------------------Headers, Footers and Page numbers---------------%
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{ \markboth{#1}{} }
\lhead{}
\chead{}
\renewcommand{\headrulewidth}{0.4pt} % % to add the top border
\pagenumbering{arabic}\setcounter{page}{5}
\fancyhf{}
\fancyhead[LE]{Chapter \thechapter}
\fancyhead[RO]{\nouppercase\leftmark}
\fancyfoot[LE,RO]{\thepage}
%---------------------------------------------------------%
%---------------------Chapters in the thesis---------------%
\mainmatter
\include{chapterone}
\include{chaptertwo}
\backmatter
\include{summary}
\include{acknowledgements}
%---------------------Chapters in the thesis---------------%
\end{spacing}
\end{document}
答案1
由于您已经定义了\chaptermark
to 条件,以确定您是否处于主要事项中(有条件地省略前缀Chapter \thechapter
),因此使用
\backmatter
\fancyhead[LE]{}
这将清除短语 ven 页面上的L
eft head
er 。E
Chapter \thechapter