\documentclass[a4paper, twoside, 12pt]{report}
\usepackage[
a4paper,
twoside,
inner=5cm,
outer=2.5cm,
top=2.5cm,
bottom=2.5cm,
headsep=0.5cm
]{geometry}
\pagestyle{headings}
I need page numbers to be at the outer corner -- \pagestyle{headings} accomplishes this perfectly, however, it also adds the name of the section, which I do not want in the header.
I tried:
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
which puts the number in the correct position, however, also produces an underlining, and does not understand the page margins (i.e. the width of the header is not the same as the width of the text).
Is there a way to avoid using the fancyhdr package, and still get the hoped result? And if I must use the fancyhdr package, how do I get rid of the underlining and set the correct width?
\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – LaRiFaRi Jul 07 '15 at 09:38\renewcommand{\headrulewidth}{0pt}after the\fancyheadinstruction. – egreg Jul 07 '15 at 09:41