Hey guys it's me again,
I tried to add \leftmark
to my header, but I want to change it from Chapter 1. Introduction
to 1 Introduction
. My MWE:
\documentclass[12pt, oneside, a4paper]{book}
\usepackage{titlesec}
\titleformat{\chapter}{\huge\bfseries}{\thechapter}{20pt}{\huge}
\usepackage{fancyhdr}
\fancypagestyle{plain}
{
\fancyhf{}
\fancyhead[L]{\rightmark}
\fancyfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{Introduction}
\chapter{Blablabla}
\end{document}
I googled a lot a found \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
and other variations and inserted it at different places of the preamble, but it doesn't work.
Am I missing something important again? Guess so, but I couldn't point it out.
Best Answer
\chaptermark
can be redefined the following way:It prints the headers:
The upper casing of
CONTENTS
can be removed by the redefinition of\tableofcontents
:That removed
\MakeUppercase
from the definition of\tableofcontents
(twice).