我想更改右侧标题的字体样式。目前它是大写字母,除了名称外还显示章节号,如下图所示。我想仅以标题样式显示章节名称,即单词的首字母大写,其他字母小写。我的 MWE 已附上。
\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}
\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}
\end{document}
答案1
实现这一点的一种方法是重新定义\rhead
命令(负责将某些内容放在标题的右侧)。你已经有了
\lhead{Statistics}
对于左侧,只需添加以下行
\rhead{\nouppercase{\leftmark}}
紧随其后。