# How to position page numbering in footer for only where Chapters begin

So far I have the page numbering in header for all pages (which is fine as wanted) except for the page where chapter begins - they are left empty without page numbering.

I would like to get the page number in footer for pages where chapter begins. Is that possible ?

So far I got this which work pretty well for page numbering in headers however the page numbering are missing for chapter pages:

\pagestyle{fancy}                       % Sets fancy header and footer
\fancyfoot{}                            % Delete current footer settings

\fancyhf{}

\fancyhead[LE,RO]{\bfseries\thepage}    % Page number (boldface) in left on even
% pages and right on odd pages
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter.\ #1}}{}}

\fancyhead[RE]{\bfseries\nouppercase{\leftmark}}      % Chapter in the right on even pages
\fancyhead[LO]{\bfseries\nouppercase{\rightmark}\chaptermark}     % Section in the left on odd pages

\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot{}
}


• Where you redefine the plain page style, you wrote \fancyfoot{}, which makes the footer empty, since it's the plain style which is uused on chapters first pages in standard classes. Use fancyfoot[C]{\thepage} instead. Aug 13 '19 at 10:44
• easy way to do it - thanks a lot Aug 13 '19 at 10:51

Assuming you are using a standard class (there is no MWE in the question), you can remove the definition of fancypagestyle plain. Then the default plain style provided by the standard class is used on chapter pages. And this default plain style seems to be the desired style.

Example:

\documentclass{book}
\usepackage{blindtext}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter.\ #1}}{}}
\fancyhf{}
\begin{document}
\blinddocument
\end{document}


Result:

• thanks a lot brow Aug 14 '19 at 9:27

\let\oldchapter\chapter
\makeatletter
\def\chapter{%
\@ifstar{\@Starred}{\@nonStarred}%
}
\def\@Starred{%
\@ifnextchar[%
{\GenericWarning{}{Warning: A starred section can not have parameters. I am going to ignore them!}\@StarredWith}%
{\@StarredWithout}%
}
\def\@StarredWith[#1]#2{%
\oldchapter*{#2}%
\thispagestyle{plain}
}
\def\@StarredWithout#1{
\oldchapter*{#1}%
\thispagestyle{plain}
}
\def\@nonStarred{%
\@ifnextchar[%
{\@nonStarredWith}%
{\@nonStarredWithout}%
}
\def\@nonStarredWith[#1]#2{%
\oldchapter[#1]{#2}%
\thispagestyle{plain}
}
\def\@nonStarredWithout#1{%
\oldchapter{#1}%
\thispagestyle{plain}
}
\makeatother


This will change the default behavior of the chapter (that includes a pagestyle{empty} command)

• I had not seen the comment of @Bernard ... and depends on the documentclass if the pagestyle would be plain or empty ... But this code is supposed to fix the issue anyway. Aug 13 '19 at 10:46
• I simply added the code, but the page numbering was still empty on chapter pages - I appreciate your help, I have fixed it Aug 13 '19 at 10:52