[Tex/LaTex] Only number and name of chapter wanted in header

chaptersfancyhdrheader-footer

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 use titleps, which is easier to use than fancyhdr, in my opinion. It allows to define a new page style without using marks with a simple syntax:

\documentclass[a4paper, openany]{book}

\usepackage[pagestyles]{titlesec}
\usepackage{titlecaps}

\titleformat{\chapter}{\normalfont\huge \bfseries}{\Huge \thechapter}{20pt}{\Huge} %This is here, so that at each chapter start, I only get "chapter number + chapter name"

\newpagestyle{myps}{%
\sethead[\small\scshape\thechapter. ~\titlecap{\chaptertitle}][][]{}{}{\small\thesection.~\itshape\sectiontitle}
\setfoot{}{\thepage}{}
}%

\usepackage{lipsum}
\pagestyle{myps}

\begin{document}

\chapter{A first chapter}
\lipsum[1-3]
\section{Some section}

\lipsum

\end{document} 

enter image description here enter image description here