18

My report requires page numbers to start from 1st chapter 1st page. So I use

\pagenumbering{arabic}

just before I do

\include{tex_files/chapter1)Introduction}

Now I want the page counting to start from 1st page, but I dont want the page numbers to appear on the first page of each chapter.

How to do this?

Answer :
Quick (and dirty?) solution: \thispagestyle{empty} just after \chapter{...}.

epsilon8
  • 5,961

4 Answers4

14

In the report class, it's the \chapter command that selects the page style for the first chapter page:

\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
                    \thispagestyle{plain}%
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}

Thus a solution is to change plain into empty, by adding the following to the document preamble:

\makeatletter
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
                    \thispagestyle{empty}%
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}
\makeatother

If you don't plan to use the plain pagestyle, then a simpler

\makeatletter
\let\ps@plain\ps@empty
\makeatother

would suffice.

A similar patch should probably be made also to \part; you can get both with this alternative code that doesn't require looking at report.cls in order to find the definitions:

\usepackage{etoolbox}
\patchcmd{\chapter}{plain}{empty}{}{}
\patchcmd{\part}{plain}{empty}{}{}
egreg
  • 1,121,712
  • Hi, egreg, I use \chapter* for Abstract and other front matter. This solution removes the page number from their first page as well. I tried \renewcommand\chapter* with \thispagestyle{plain} but that doesn't compile. – Hitanshu Sachania Apr 04 '21 at 02:51
  • 1
    @HitanshuSachania I find no reason for omitting the page number in some chapters and not in others. Actually I find no reason for omitting the page number anywhere. – egreg Apr 04 '21 at 08:58
  • @HitanshuSachania You might patch \@schapter with \preto\@schapter{\thispagestyle{plain}} – egreg Apr 04 '21 at 09:01
  • My bad. I meant hide page numbers and not remove them. That is my university's requirement. – Hitanshu Sachania Apr 04 '21 at 13:44
5

The best answer to this question depends on your document class and packages you want to load. One possibility would be KOMA-Script:

\documentclass{scrreprt}
\renewcommand{\chapterpagestyle}{empty}%The first page in each chapter won't have any heading or footer, especially no page number
\title{foobar}
\usepackage{lipsum}
\begin{document}
\pagestyle{empty}%All pages from now on won't have any heading or footer, especially no page number [will be changed later on]
\maketitle
\tableofcontents
\clearpage
The following text uses Lorem Ipsum.
\chapter{eins}
\pagestyle{plain}%All pages, except first pages of each chapters, from now on will have the page number in the footer
\pagenumbering{arabic}%Sets page numbers to be Western Numerals and resets the page count to start at 1
\lipsum[1-10]
\section{uno}
\lipsum[11-20]
\section{due}
\lipsum[21-30]
\chapter{zwei}
\lipsum[31-40]
\section{wahid}
\lipsum[41-50]
\section{itneen}
\lipsum[51-60]
\chapter{drei}
\end{document}
Toscho
  • 4,713
4

Assuming you're using the report or book document class, or a class that's based on/derived from one of these classes, you could achieve your goal by modifying the plain page style. This works because in the report and book document classes, the plain page style is used only for the initial pages of chapters and chapter-like entities such as the Index.

The following MWE redefines the \ps@plain macro, which sets up the plain page style. Just copy and paste the lines beginning with \makeatletter and ending with \makeatother to your document's preamble, and you should be all set.

\documentclass{report} % or "book"
\makeatletter
\renewcommand\ps@plain{\let\@mkboth\@gobbletwo
     \let\@oddhead\@empty
     \def\@oddfoot{\reset@font\hfil}
     \let\@evenhead\@empty\let\@evenfoot\@oddfoot}
\makeatother

\usepackage{lipsum} % for filler text
\begin{document}
\tableofcontents
\chapter{First chapter}
\lipsum[1-10]
\chapter{Second chapter}
\lipsum[11-20]
\end{document}
Mico
  • 506,678
1
\documentclass{report} % or "book"
\makeatletter
\let\ps@plain\ps@empty
\makeatother

\usepackage{lipsum} % for filler text
\begin{document}
\tableofcontents
\chapter{First chapter}
\lipsum[1-10]
\chapter{Second chapter}
\lipsum[11-20]
\end{document}