[comp.text] LaTeX -- \pagestyle{empty} leaves number on page 1

ben@ulrich.mth.msu.edu (Ben Lotto) (03/11/89)

I have been frustrated in my attempts to completely remove the page
numbers from a document using LaTeX.  When I try \pagestyle{empty}, as
suggested by the manual, the first page is still numbered, although the
subsequent pages seem to be fine.  I tried putting the \pagestyle{empty}
in various places, but to no avail.  Can anyone enlighten me on this?
--

-B. A. Lotto  (ben@ulrich.mth.msu.edu)
Department of Mathematics/Michigan State University/East Lansing, MI  48824

hartzell@tigger (George Hartzell) (03/11/89)

In article <BEN.89Mar10112757@ulrich.mth.msu.edu>, ben@ulrich (Ben Lotto) writes:
>
>I have been frustrated in my attempts to completely remove the page
>numbers from a document using LaTeX.  When I try \pagestyle{empty}, as
>suggested by the manual, the first page is still numbered, although the
>subsequent pages seem to be fine.  I tried putting the \pagestyle{empty}
>in various places, but to no avail.  Can anyone enlighten me on this?

This can occur when you use the \maketitle command (not sure if this
is style dependent or not...) because it does a \thispagestyle{plain}.
The solution seems to be
a) redefine \maketitle 
b) put a \thispagestyle{empty} (or whatever) immediately after the
\maketitle.

g.
-- 
George Hartzell			                 (303) 492-4535
MCD Biology, University of Colorado-Boulder, Boulder, CO 80309
hartzell@Boulder.Colorado.EDU  ..!{ncar,nbires}!boulder!hartzell

piet@ruuinf (Piet van Oostrum) (03/14/89)

In article <7319@boulder.Colorado.EDU>, hartzell@tigger (George Hartzell) writes:
 `In article <BEN.89Mar10112757@ulrich.mth.msu.edu>, ben@ulrich (Ben Lotto) writes:
 `>
 `>I have been frustrated in my attempts to completely remove the page
 `>numbers from a document using LaTeX.  When I try \pagestyle{empty}, as
 `>suggested by the manual, the first page is still numbered, although the
 `>subsequent pages seem to be fine.  I tried putting the \pagestyle{empty}
 `>in various places, but to no avail.  Can anyone enlighten me on this?
 `
 `This can occur when you use the \maketitle command (not sure if this
 `is style dependent or not...) because it does a \thispagestyle{plain}.

It is worse: Latex does a \thispagestyle{plain} in several places:
1. At the beginning of most document styles.
2. At the beginning of echa chapter, part, Index, etc.
3. At the titlepage.
   and maybe more.
If you have a report or article style, no matter where you put the
\pagestyle, the first page does have the \thispagestyle set, and the only
way to get rid of it is to do another \thispagestyle{empty}.

I consider this a bug in Latex. I think Latex should cancel a pending
\thispagestyle whenever a \pagestyle is given. This does, however, not
solve all problems, because at each chapter you will get the same problem.
What actually is needed is a command to specify the ``default pagestyle for
these cases''
-- 
Piet van Oostrum, Dept of Computer Science, University of Utrecht
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands
Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet)

ben@ulrich.mth.msu.edu (Ben Lotto) (03/16/89)

In article <1194@ruuinf.UUCP> piet@ruuinf (Piet van Oostrum) writes:

>It is worse: Latex does a \thispagestyle{plain} in several places:
>1. At the beginning of most document styles.
>2. At the beginning of echa chapter, part, Index, etc.
>3. At the titlepage.
>   and maybe more.
>If you have a report or article style, no matter where you put the
>\pagestyle, the first page does have the \thispagestyle set, and the only
>way to get rid of it is to do another \thispagestyle{empty}.

>I consider this a bug in Latex. I think Latex should cancel a pending
>\thispagestyle whenever a \pagestyle is given. This does, however, not

>Piet van Oostrum, Dept of Computer Science, University of Utrecht

I would like to suggest a better fix.  It seems to me that the reason
these \thispagestyle commands are there in the first place is to give a
page with no headings if you are on a title page.  The only case where
you get an undesirable result, then, is when you want no page numbers at
all (\pagestyle{empty}).  My suggestion:  in each of the cases mentioned
above, have LaTeX check whether the pagestyle is set to empty, and if it
isn't, execute \thispagestyle{plain}.

By the way, I would still like to know how to move the title closer to
the top of the page on the first page of a document of the form
\documentstyle[12pt,twocolumn]{article}.
--

-B. A. Lotto  (ben@ulrich.mth.msu.edu)
Department of Mathematics/Michigan State University/East Lansing, MI  48824

akk2@uhura.cc.rochester.edu (Atul Kacker) (03/16/89)

In article <BEN.89Mar15133912@ulrich.mth.msu.edu> ben@ulrich.mth.msu.edu (Ben Lotto) writes:
>
>By the way, I would still like to know how to move the title closer to
>the top of the page on the first page of a document of the form
>\documentstyle[12pt,twocolumn]{article}.
>--

The place I would start looking for a fix to this is to look at how
\section is defined in ART12.STY.  \secion is usually defined in terms
of \@startsection and other parameters like BEFORESKIP and AFTERSKIP which
determine how much space is left before and after a section title.  These
terms should be explained in a little more detail in the file LATEX.TEX.  
Changing BEFORESKIP should then do the trick.

I haven't actually tried this, so...


-- 
Atul Kacker  |     Internet: akk2@uhura.cc.rochester.edu
             |     UUCP: {ames,cmcl2,decvax,rutgers}!rochester!ur-cc!akk2
-------------------------------------------------------------------------------

mj@myrias.UUCP (Michal Jaegermann) (03/16/89)

>  `In article <BEN.89Mar10112757@ulrich.mth.msu.edu>, ben@ulrich (Ben Lotto) writes:
>  `>
>  `>I have been frustrated in my attempts to completely remove the page
>  `>numbers from a document using LaTeX.  When I try \pagestyle{empty}, as

When I really want to remove those pesky line numbers I am redifining,
in my preamble, \thepage to an empty group {}.  This is, of course, a
hack - but it works.  There are, possibly, some circumstances when
the solution can be to radical.

Michal Jaegermann
Myrias Research Corporation
...{ncc, alberta}!myrias!mj