In my thesis, am not getting page number on the first page of each chapter.

The definitions used in the thesis are (formatAndDefs.tex):

\usepackage{amsmath,amssymb}             % AMS Math
% \usepackage[french]{babel}
%\linespread{1.25}   %%%smita
% Table of contents for each chapter

\usepackage[nottoc, notlof, notlot]{tocbibind}
% Use \minitoc where to put a table of contents


% Glossary / list of abbreviations

\renewcommand{\nomname}{List of Abbreviations}


% My pdf code




% nicer backref links
\ifcase #1 %
(Not cited.)%
(Cited on page~#2.)%
(Cited on pages~#2.)%
\renewcommand*{\backrefsep}{, }
\renewcommand*{\backreftwosep}{ and~}
\renewcommand*{\backreflastsep}{ and~}

% Links in pdf

pdftitle="Design of low power digital circuits using deep submicron technology",
pdfauthor="Smita Singhal", 
pdfsubject="Low power cmos design", %subject of the document

pdfmenubar=true, %menubar shown
pdfhighlight=/O, %effect of clicking on a link
colorlinks=true, %couleurs sur les liens hypertextes
pdfpagemode=None, %aucun mode de page
pdfpagelayout=SinglePage, %ouverture en simple page
pdffitwindow=true, %pages ouvertes entierement dans toute la fenetre
linkcolor=linkcol, %couleur des liens hypertextes internes
citecolor=citecol, %couleur des liens pour les citations
urlcolor=linkcol %couleur des liens pour les url

% definitions.
% -------------------


% Some useful commands and shortcut for maths:  partial derivative and stuff

\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}

\usepackage{rotating}                    % Sideways of figures & tables

\usepackage{fancyhdr}                    % Fancy Header and Footer

%%% Fancy Header %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fancy Header Style Options

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

\fancyfoot[C]{\bfseries\thepage} %%%%by smita:
% pages and right on odd pages
\fancyhead[RE]{\bfseries\nouppercase{\leftmark}}      % Chapter in the right on even pages
\fancyhead[LO]{\bfseries\nouppercase{\rightmark}}     % Section in the left on odd pages

\renewcommand{\headrule}{\color{black} \headruleORIG}



%%% Clear Header %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Clear Header Style on the Last Empty Odd pages

\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else%
  \thispagestyle{empty}%              % Empty header styles


% Prints your review date and 'Draft Version' (From Josullvn, CS, CMU)
\newcommand{\reviewtimetoday}[2]{\special{!userdict begin
    /bop-hook{gsave 20 710 translate 45 rotate 0.8 setgray
      /Times-Roman findfont 12 scalefont setfont 0 0   moveto (#1) show
      0 -12 moveto (#2) show grestore}def end}}
% You can turn on or off this option.
% \reviewtimetoday{\today}{Draft Version}

\hrulefill $\:$ {\bf #1}\\


\renewcommand{\minitoc}{\minitocORIG \vspace{1.5em}}


{ \begin{list}%
{ \end{list} }


% centered page environment


{\newpage\vspace*{\fill}\renewcommand{\headrulewidth}{0pt}} %%Smita

File Thesis.tex consists of:

\documentclass[a4paper,12pt,twoside, openany]{ThesisStyle}
\providecommand{\e}[1]{\ensuremath{\times 10^{#1}}}
\usepackage{subfigure}% Support for small, `sub' figures and tables


\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}










  • 1
    Look in your code for fancypahestyle{plain} and add the page number where you want it to appear.
    – Johannes_B
    Feb 9, 2020 at 4:58
  • 1
    Your template is mostly outdated. I would recommend to start with a minimal document and just add what you really need. The page number on chapter starting pages would be the default, your code disables it, and you don't want it.
    – Johannes_B
    Feb 9, 2020 at 5:00
  • Thank you for posting a working example! At the same time, much of your code does not seem to be relevant to the question you're asking here. Please limit the example to only the code required for your issue to appear. You can have a look at this guide for how to prune your code for this purpose. Feb 9, 2020 at 13:06

1 Answer 1


Hi ssinghal and welcome to TeX-SE.

As has been said in the comments of your question, please revise your code and post here only the minimum necessary to the question. If you have some problems while combining packages, ask a specific question about it.

When someone uses a lot of packages and other configurations, it becomes a little bit messy to clearly identify the issue.

That said, I will assume your ThesisStyle is some variation of the book class (The options seems to be basically the same). The book class always use the pagestyle plainto the pages where the chapter begins. A simple method to define the page with chapters the way you want is modify the pagestyle plain with the package fancyhdr.

The following code has some commented options to make easier and faster to you to test them. Basically \pagestyle{headings} defines the style of the whole document and \fancypagestyle{plain}{...} defines the style of pages with chapters.

The line \fancyhead[RO,LE]{\thepage} sets the Right-Odd and Left-Even header of the pages with the page number. It is necessary if you use the openany option of the bookclass. I suggest to test what happens with the option openright and the others fancyhead combinations.

A MWE follows:



\pagestyle{headings} % options: fancy, headings, myheadings
    \fancyhf{} % clear all header and footer fields 
    \fancyhead[RO,LE]{\thepage} % Right Odd, Left Even => Outside
    % Some examples
    %\fancyhead[R]{\thepage} % Right side has the page number
    %\fancyhead[L]{\leftmark} % Left side has the \chapter{title} 
    \renewcommand{\headrulewidth}{0pt} % remove line between header and main text 

\chapter{title a}
\chapter{title b}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .