I have the problem, that in my header "chapter" is mentioned, but I only want the chapter number and name to appear.
\documentclass[a4paper, openany]{book}
\usepackage{fancyhdr}
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\huge}{\Huge \bf \thechapter}{20pt}{\Huge \bf} %This is here, so that at each chapter start, I only get "chapter number + chapter name"
\fancyhead[RO]{\rightmark}
\fancyhead[LE]{\leftmark}
\fancyfoot[RO,LE]{\thepage}
\begin{document}
\chapter{dsfjdj}
\newpage
\end{document}
The right mark works the way I want it to, but the left mark doesn't, since it also lists the word "chapter" explicitly. How can I avoid it?
Best Answer
Since you use
titlesec
, I suggest you usetitleps
, which is easier to use thanfancyhdr
, in my opinion. It allows to define a new page style without using marks with a simple syntax: