Page LayoutHow to customize page numbers

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
poudeln18
Posts: 4
Joined: Tue Jan 20, 2009 6:58 pm

How to customize page numbers

Post by poudeln18 »

Hi all,

I want to have my article print out the page numbers at the bottom of the page as "page 1, page 2..." as opposed to just "1 ,2 .."
can anyone help me on how I can do that?

Thank you in advance!!!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

How to customize page numbers

Post by localghost »

Have a look at packages like fancyhdr or titlesec. They allow customizing headers and footers of a document and let you display page numbers as desired.


Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
poudeln18
Posts: 4
Joined: Tue Jan 20, 2009 6:58 pm

Re: How to customize page numbers

Post by poudeln18 »

Thank you so much for the information..I am looking into the package documentation to see if I can figure it out.
poudeln18
Posts: 4
Joined: Tue Jan 20, 2009 6:58 pm

Re: How to customize page numbers

Post by poudeln18 »

Ok so I went through the documentation for both the packages and both of them do not tell me how I could go about having the page numbers displayed as "page 1, page 2..." as opposed to "1, 2..."

Isnt there a simple code that I could type after I import the fancyhdr package that does the trick??

Please help.

Thanking you in advance!!
marco_d
Posts: 57
Joined: Tue Jan 20, 2009 7:49 pm

How to customize page numbers

Post by marco_d »

Hello,

an easy way:

Code: Select all

\renewcommand\thepage{page~\arabic{page}}
Marco
i am German. I can not use difficult words. :-)
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

How to customize page numbers

Post by localghost »

marco_d wrote:[...] an easy way:

Code: Select all

\renewcommand\thepage{page~\arabic{page}}
[...]
But not a good idea since this command is also used in other places (for example the ToC).
poudeln18 wrote:Ok so I went through the documentation for both the packages and both of them do not tell me how I could go about having the page numbers displayed as "page 1, page 2..." as opposed to "1, 2..." [...]
Of course the manual gives simple examples how to manage that. They may have to be adapted to your needs. Otherwise this manual would be superfluous.
poudeln18 wrote:Isnt there a simple code that I could type after I import the fancyhdr package that does the trick?? [...]
It is very simple and as stated above an adapted example from the manual.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{fancyhdr}
\usepackage{lmodern}
\usepackage{blindtext}

\parindent0em
\parskip\medskipamount

% Page setup (fancyhdr)
\fancyhf{}
\cfoot{Page \thepage}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}

\begin{document}
  \tableofcontents
  \Blinddocument
\end{document}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
poudeln18
Posts: 4
Joined: Tue Jan 20, 2009 6:58 pm

Re: How to customize page numbers

Post by poudeln18 »

Dear. Localghost,
Thank you so incredibly much. The way I had gone through the files was to search the words Page Number..I must have missed out on the detailed explanations. Anyhow, I will try to work on it now.

Thanks again.
Post Reply