[Tex/LaTex] How not have page numbers when there is \maketitle

header-footerpage-numberingtitles

After translating in pdflatex

\documentclass[12pt]{article}

\pagestyle{empty}   %  no page number

\begin{document}

\title{Article name}
\author{Author}

\maketitle

\end{document}

the first page is numbered.

How do I remove the numbering? Or is there another tool for having no page numbers?

Best Answer

In artcile.cls without the titlepage option, the definition of \maketitle contains

\thispagestyle{plain}

You can discover this by issuing \show\maketitle and looking the .log file, but the output is quite long.

This means that either you need to change the plain layout, or much simpler, you need to issue \thispagestyle{empty} after \maketitle has had effect, but before the page ends. In your example, the latter is sufficient.

Sample output

\documentclass[12pt]{article}

\pagestyle{empty}   %  no page number

\begin{document}

\title{Article name}
\author{Author}

\maketitle
\thispagestyle{empty}

\end{document}

If you had used the titlepage option then there would have been no page number.

Note that other places where \thispagestyle{plain} in article.cls is issued is on the first page of an index if you have one.

See Page number on Index page for defining the plain page style.