# How to add page number to title page?

Because of some stupid format check requirement I need to add page number at the bottom of title page.

Here's a minimal working example that doesn't produce the page number on title page:

\documentclass{report}
\begin{document}
\author{test}
\title{mytitle}
\maketitle
\end{document}


What should I do to add page number to this title page?

-

You can patch \titlepage to change the default empty page style used there to plain:

\documentclass{report}
\usepackage{etoolbox}

\patchcmd{\titlepage}
{\thispagestyle{empty}}
{\thispagestyle{plain}}
{}
{}

\begin{document}
\author{test}
\title{mytitle}
\maketitle
\end{document}


Without the patching, you can redefine the environment as defined in report.cls:

\documentclass{report}

\makeatletter
\renewenvironment{titlepage}
{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse\newpage
\fi
\thispagestyle{plain}% the change was made here
\setcounter{page}\@ne
}%
{\if@restonecol\twocolumn \else \newpage \fi
\if@twoside\else
\setcounter{page}\@ne
\fi
}
\makeatother

\begin{document}
\author{test}
\title{mytitle}
\maketitle
\end{document}

-
Thank you @Gonzalo. I prefer \pretocmd{\titlepage}{\thispagestyle{empty}}{}{} and \apptocmd{\titlepage}{\thispagestyle{plain}}{}{} which make the intension more clearly. –  yegle Apr 8 at 16:34