1. LaTeX page numbering

I have a LaTeX file in which I don't want a page number to be printed. Its preamble looks like this:
Code:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{indentfirst}
\usepackage{url}
\pagestyle{empty}
\title{}
\author{Ferio}
\date{}
I've just learned from Guide to LaTeX, 4th edition, by Helmut Kopka and Patrick W. Daly, that the "\pagestyle{empty}" command should do the trick, but it doesn't work. Am I wrong? If so, how could I do it?

2. Tea Glorious Tea!
Join Date
Mar 2007
Beans
267

Re: LaTeX page numbering

\begin{document}
TEST
\end{document}

.. and got an empty page with the word TEST on. Seems to work as it should.

(But if want a title you also need to add \maketitle after begin{document})
Last edited by xadder; March 26th, 2007 at 07:56 AM.

Join Date
Sep 2005
Beans
463
Distro
Kubuntu 12.04 Precise Pangolin

Re: LaTeX page numbering

Hi there, I've just started with latex myself and when I use the \pagestyle{empty} option it doesn't work either when I use article as a document class in the preamble. However when I change this the class to book the option does work...

4. Ubuntu Extra Shot
Join Date
Mar 2007
Location
Beans
358
Distro
Ubuntu 7.10 Gutsy Gibbon

Re: LaTeX page numbering

Hi. Your latex code works for me.
Code:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{indentfirst}
\usepackage{url}
\pagestyle{empty}
\title{}
\author{Ferio}
\date{}
\begin{document}
Hello World.
\end{document}
commenting out the pagestyle line produces a document with a page number.

I'm not sure what is going wrong, maybe you are missing a package. were there any output warnings?

5. Ubuntu Extra Shot
Join Date
Mar 2007
Location
Beans
358
Distro
Ubuntu 7.10 Gutsy Gibbon

Re: LaTeX page numbering

that's weird. after six hours of no response, three of us replied at exactly the same time (within 1 minute of each other).

6. Re: LaTeX page numbering

In fact I've just tested it, and the problem i's the very "\maketitle" command that is triggering the number apparition. Any idea on how to get a title but not a number?

7. Re: LaTeX page numbering

I've just found that the "\maketitle" command makes the number appear; if you're using it, try to remove it and see whether it disappears or not.

Now it's just a question of finding out how to get a title but not a page number.

8. Re: LaTeX page numbering

There are warnings, but they're about the bullets for the lists I'm using in the body. The problem seems to be the "\maketitle" command (I thought my problem was in the preamble, not in the body); removing it makes the page number disappear, and if you take it back, the number reappears.

Now it's just a matter of finding out how to get a title but not a number.

9. Re: LaTeX page numbering

There's not such thing as a coincidence. As they used to said in "Lost" (and I can't believe I'm quoting a TV show):
Everythng happens for a reason
You three replying at once, LaTeX behaving weird...

Join Date
Sep 2005
Beans
463
Distro
Kubuntu 12.04 Precise Pangolin

Re: LaTeX page numbering

I was looking for arguments for the \maketitle command, but no luck so far... it appears that the package uses \pagestyle to generate the pagenumber...

Now I've been messing around a bit with a document I already had and when changing the document class to book instead of article, adding \thispagestyle{empty} to the title section the first page number is gone!

To restart numbering at the first page after the title I added
\setcounter{page}{1}

It's a work around, but not the best solution imo! Keep us updated when you come up with something!

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•