[Tex/LaTex] Put page numbers at the bottom center with \pagestyle{headings}

fancyhdrheader-footernumbering

I use the \pagestyle{headings} to show headers in my article in Latex. But the pages numbers appear at the top right corner. How can I make it appear at the bottom center of the page ? I don't want to use the fancyhdr package since it overlays headers with some table that I display in landscape format. Here is a code sample

\documentclass[12pt]{article}
\begin{document}
\section*{Acknowledgements}
Test 
\pagestyle{headings}
\section{Chapter 1}
Test

\end{document}

Best Answer

If you want headers and a centered page number, you need to define a couple of things yourself. The fancyhdr-package is quite useful.

In this example, I'll assume there won't be any double-sided printing involved, so the code is pretty straightforward:

  • rhead (right head)
  • lhead (left head)
  • cfoot (center foot)

The manual explains it well, I think:

There are 12 places defined: Left, Center and Right Headers and Footers, and both can be on Even or Odd pages. Each place therefore has 3 coordinates which are the inital letters of the above description: (1) E or O, (2) L, C or R, (3) H or F.

For a one-sided document it would look like this:

\documentclass{article}

\usepackage[english]{babel}
\usepackage{fancyhdr}

\usepackage{blindtext}

\pagestyle{fancy}
\fancyhf{}
\rhead{Right side head}
\lhead{Left side head}
\cfoot{\thepage}

\begin{document}

\section{introduction}

\blindtext

\end{document}

Single-sided centered page number