2

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}
}
  • You can set the correct lengths with geometry. Or use the package atbegshi. – Marco Daniel May 14 '12 at 17:32
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.