# Page number in page which contain the name of the chapter

I would like to insert in each page the chapter name and number (bottom right)
The problem is that this configuration does not apply to pages that contain the name of the chapter! My code :

 \usepackage[fit]{truncate}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot[R]{\thepage}
\cfoot{}

• In the footer ("bottom right")? Your code snippet uses \leftmark in the header... Which is it? Also what document class are you using? Do you have any restrictions in terms of packages? – Werner May 23 '13 at 18:54
• I use : \documentclass[12pt,a4paper]{report} the problem is that: in all pages, the page number is centered except the pages that contain the title of the chapters and parts – physics May 23 '13 at 18:55

The titleps package provides easy access to sectional titles and is a viable alternative to using fancyhdr.

You can define a new page style (say main) and issue that at every start-of-chapter page, or redefine plain to include the details you want - plain is the default page style associated with the first page of a chapter.

Here's a complete example:

\documentclass{report}
\usepackage{lipsum,titleps}% http://ctan.org/pkg/{lipsum,titleps}
\makeatletter
\newpagestyle{main}{%
% Footer rule: \setfootrule
\setfoot{}{\thepage}{\@chapapp~\thechapter\ \chaptertitle}% \setfoot{<left>}{<centre>}{<right>}
}
\makeatother
\pagestyle{main}
\begin{document}
\chapter{First chapter}\thispagestyle{main}\lipsum[1-20]
\chapter{Second chapter}\lipsum[1-20]
\chapter{Last chapter}\lipsum[1-20]
\end{document}


Redefining plain would resemble:

\makeatletter
\renewpagestyle{plain}{%

• @physics: Can you provide more detail? Are you using titleps or ttlps? Also, you should use only titleps. Not that and fancyhdr. – Werner May 23 '13 at 19:55
• @physics: You absolutely need \usepackage{titleps}, while lipsum was just for the above example and provides dummy text. – Werner May 23 '13 at 20:00