使用花式页眉时,如果使用 \chapter*,页眉将采用上一章标题

使用花式页眉时,如果使用 \chapter*,页眉将采用上一章标题

我想改变右标题的字体样式。使用 \chapter* 时,右标题显示上一章的章节标题。

\documentclass[12pt]{scrreprt}

\usepackage{booktabs}
\usepackage[explicit]{titlesec}
\usepackage{tikz}
\usetikzlibrary{calc}

\DeclareFixedFont{\chapternumberfont}{T1}{ppl}{m}{n}{1.5in}

\newcommand\brectangles{%
\begin{tikzpicture}[overlay, remember picture]
\fill[red!60!blue!50!green!120]%[red!60!blue!50!green!150]% 
  (current page.north west) rectangle ( $ (current page.north east) + (0,-7cm) $);
\fill[red!60!blue!50!green!120]%[red!60!blue!50!green!150]% 
  (current page.south west) rectangle ( $ (current page.south east) + (0,3cm) $);
\end{tikzpicture}%
}

\titleformat{\chapter}[display]
  {\Large\bfseries\ssfamily\color{white}}%\scshape
  {\thispagestyle{empty}\brectangles}
  {-2in}
  {%
  \vskip-4ex\filcenter {\small\MakeUppercase{Project on Compilation of...}}\\[2ex]
  \parbox[b]{.65\linewidth}{#1}%
  \raisebox{0.8in}{\parbox{.15\linewidth}{\large\chaptertitlename}}%
  \parbox[b]{.2\linewidth}{\chapternumberfont\thechapter}%
  }
  [\vspace*{1in}]

\titleformat{name=\chapter,numberless}[display]
  {\Huge\bfseries\color{white}} %sffamily\
  {\thispagestyle{empty}\brectangles} 
  {-2in}
  {\parbox[b]{.65\linewidth}{#1}}
  [\vspace*{1in}]


% for fancy header & footer
\usepackage{xcolor}%
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Statistics}
\lfoot{ LHS }
\rfoot{\includegraphics[width=20pt]{logo}}
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}


%for quotes
\usepackage{csquotes}

% for hyperrefrences
\usepackage{url}
\usepackage[linktoc=all]{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=blue
}

% for line spacing
\renewcommand{\baselinestretch}{1.15}

%for indenting paragraphs
\setlength{\parskip}{1em}

%for drop caps
% works with pdfLaTeX
\usepackage{type1cm} % scalable fonts
\usepackage{lettrine}

% FOR CALLIGRAPHIC FONTS
\usepackage{calligra}
\usepackage[T1]{fontenc}

\renewcommand{\arraystretch}{2}

\begin{document}

\tableofcontents

\pagenumbering{roman}

\pagestyle{empty}% no page numbers

\pagestyle{plain}

\pagestyle{fancy}

\pagenumbering{arabic}

\chapter {Introduction}

\clearpage

\section{Right header is in capitals, how to change in normal font}

\section {Background}

\chapter*{Appendicies}

\addcontentsline{toc}{chapter}{Appendicies}

\section*{Appendix-W.R}

\addcontentsline{toc}{section}{Appendix-Workers' Remitances}

\clearpage

\newpage

\section{Ahmad}

\end{document}

答案1

您使用附录的方式不对,这给您带来了问题,因此需要您付出所有\addcontentsline努力。完成常规章节后,输入命令\appendix。然后继续像以前一样制作更多章节和部分。附录中的章节将被标记为A等,并且各部分将被标记A.1A2B.1等等。

代码

\chapter {Introduction}

\clearpage

\section{Right header is in capitals, how to change in normal font}

\section {Background}

\appendix

\chapter{Appendix-Workers' Remitances}

\section{Ahmad}

\section{Ahmad again}

\chapter{Ahmad yet again}

\section{Ahmad once more}

输出

在此处输入图片描述

答案2

回答晚了,简单补充一下:

\chapter*{Introduction}
\markboth{}{Introduction}

相关内容