3

I am using next snippet to set page number in top-right corner. It works fine for me, except I want to place page number exactly 15mm from top edge. Is it possible? Thanks.

\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{} \chead{} \rhead{\normalsize\thepage}
\lfoot{} \cfoot{} \rfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyhead[RE,RO]{\normalsize \thepage} % Even page, Odd page; Right, Left, Center
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
1
  • You can set the correct lengths with geometry. Or use the package atbegshi. Commented May 14, 2012 at 17:32

1 Answer 1

2

Use

\usepackage[tmargin=15mm]{geometry}

to have your type area start 15mm from the page boundary. For other geometry settings, see the geometry documentation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .