[Tex/LaTex] How to move page number

fancyhdrheader-footerpage-numbering

I want to change the position of the page number. I've read around here that some suggest to use the fancyhdr package, but I don't want to use it – I'm a beginner to LaTeX so I don't want to use a package that could change the margins and other specifications to the layout that I've already made. Does anyone have any idea how to, or possibly correct me if my concerns (in regard to fancyhdr) are unfounded?

Best Answer

As a beginner you should be using packages, and making use of them as much as possible. Generally speaking, packages don't mess up things that they are not designed to change, so you shouldn't be worrying much about using them, especially if they are the kinds of packages that are recommended often by users here. Unless you are using a special documentclass such as memoir or one of the KOMA classes, you should be using fancyhdr, because it provides a very simple interface to do exactly what you want.

\documentclass{article}
\usepackage{fancyhdr}
\usepackage{lipsum} % only for showing some sample text
\fancyhf{} % clear all header and footers
\renewcommand{\headrulewidth}{0pt} % remove the header rule
\rfoot{\thepage}
%
%lfoot{\thepage} % puts it on the left side instead
%
% or if your document is 2 sided, and you want even and odd placement of the number
%\fancyfoot[LE,RO]{\thepage} % Left side on Even pages; Right side on Odd pages
%
\pagestyle{fancy}
\begin{document}
\lipsum
\end{document}

The best reason to use a package is that package writers are generally much more experienced in doing things than the average end user, and so a package will deal with problems that might not even occur to you (even when you become more experienced with LaTeX); also, there's really no sense in re-inventing the wheel, when good tools with long track records of use are available.

See also this page on the Wiki for some recommendations of useful packages. Since you also mentioned changing margins, you should also probably be using the geometry package instead of doing that by hand, too.