[comp.text] LaTeX page number placement

dougcc@csv.viccol.edu.au (Douglas Miller) (03/16/89)

In article <3051@nunki.usc.edu>, dwu@nunki.usc.edu (Daniel Wu) asks
how to get a LaTeX page number in the top right corner of the page.

The following .sty option file produces the specified format:

   \oddsidemargin=? \evensidemargin=\oddsidemargin
   \textheight=?
   \textwidth=?
   \topmargin=0.5in
   \headheight=12pt
   \headsep=0.5in \advance\headsep by -\headheight
   \newdimen\headwidth \headwidth=\textwidth \advance\headwidth by 0.5in
   \let\@mkboth\markboth
   \def\@oddhead{\hbox to \headwidth{\hfil\sl\thepage}%
      \hskip-0.5in} % This last hskip prvents 'overfull hbox' message
   \pagenumbering{arabic}

This style assumes that the DVI program doesn't insert a vertical offset.