[Tex/LaTex] Problems setting chaptermark in headings

fancyhdrsectioning

I am producing a small document, oneside. I'd like to have the following structure of headings/footers:

  1. Document title in the left side header
  2. Chapter name in the right side header
  3. Page number in the center footer

I tried using the fancyhdr package, but the right header isn't printed (everything else works fine).

Here is a MWE, can you please help?

% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = lualatex
% !TEX spellcheck = it-IT
\documentclass[11pt,a5paper,oneside]{book}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{italian}                          
\usepackage{graphicx}
\usepackage{fancyhdr} 
\usepackage[a5paper]{geometry}                                    
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{lipsum}
\usepackage{microtype}    
\PolyglossiaSetup{italian}{indentfirst=false}
\setmainfont{Bauer Bodoni Std 1}[
Ligatures={TeX},
Numbers=OldStyle,
SmallCapsFeatures={%
LetterSpace=4,
Letters=SmallCaps
}]
\renewcommand\thesection{\arabic{section}}
\titleformat{\section}{\normalfont\large\rm\filcenter}{\thesection}{0em}{}
\titlecontents{chapter}[1.5em]{}{\scshape\contentslabel{2.3em}}{}{\titlerule*[1pc]{}\contentspage}
\titleformat{\chapter}{\normalfont\Large\scshape\filcenter}{}{0em}{}
\setlength{\headheight}{15.2pt}
\lhead{\scshape Title}\rhead{\chaptermark}\lfoot{}\rfoot{}
\chead{}
\cfoot{\thepage}
\begin{document}
\pagestyle{fancy}
\chapter{Test}
\lipsum{10}
\end{document}

Can someone show me what I've done wrong? Thanks!

Best Answer

As you use titlesec and titletoc, I wanted to point it is much simpler to use the pagestyles option of titlesec to customise headers and footers. It works with \chaptertitle, \sectiontitle and the like, instead of playing with marks — although you still can use them.

\documentclass[11pt,a5paper,oneside]{book}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{italian}
\usepackage{graphicx}
%\usepackage{fancyhdr}
\usepackage[a5paper, showframe]{geometry}
\usepackage[pagestyles]{titlesec}
\usepackage{titletoc}
\usepackage{lipsum}
\usepackage{microtype}
\PolyglossiaSetup{italian}{indentfirst=false}
\setmainfont{Bauer Bodoni Std 1}[
Ligatures={TeX},
Numbers=OldStyle,
SmallCapsFeatures={%
LetterSpace=4,
Letters=SmallCaps
}]
\renewcommand\thesection{\arabic{section}}
\titleformat{\section}{\normalfont\large\rm\filcenter}{\thesection}{0em}{}
\titlecontents{chapter}[1.5em]{}{\scshape\contentslabel{2.3em}}{}{\titlerule*[1pc]{}\contentspage}
\titleformat{\chapter}{\normalfont\Large\scshape\filcenter}{}{0em}{}
\newpagestyle{mystyle}{%
\sethead{Document Title}{}{\scshape\chaptertitle}
\setfoot{}{\thepage}{}
\headrule
}

\begin{document}%

\pagestyle{mystyle}
\chapter{Test}
\lipsum{10}

\end{document} 

enter image description here