Page LayoutPage numbering in footer

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
nkal
Posts: 17
Joined: Fri Jul 10, 2009 8:57 pm

Page numbering in footer

Post by nkal »

Hi,

I want to page numbers in the footer as Page i of vi but only till my page numbering is roman. After the initial lists and summary, I change the page number to arabic numerals so there then, I want to restart page numbers in the footer as 1 of 19.

Is there a quick way to do it?

I am currently using this:

Code: Select all

\documentclass[11pt]{report}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[papersize={8.5in,11in},top=0.81in, left=1.44in, right=1in,bottom=0.94in]{geometry}
\usepackage{alltt}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{ulem}
\usepackage{ifthen}
\usepackage{winfonts}
\usepackage[T1]{fontenc}
\usepackage{color,hyperref}
\usepackage{titlesec}
\usepackage{lastpage}

\rfoot{\fontsize{8pt}{0pt}\fontfamily{phv}\selectfont{V1.0.0 DOCUMENT}}
\cfoot{Page \thepage of \pageref{LastPage}}
\lfoot{\fontsize{8pt}{0pt}\fontfamily{phv}\selectfont{Department Name}}
Another problem I have is with the header. I need to add an image in the header. I am currently using this:

Code: Select all

\pagestyle{fancy}
\fancyhead[L L]{\includegraphics[323pt,229pt][466pt,314pt]{Header_image.eps}}
The problem is that with this pagestyle, I get an ugly header on the right hand side with a line and chapter title randomly on some pages.

If I use

Code: Select all

\pagestyle{fancy}
\rhead{}
\lhead{\fancyplain{}{\includegraphics[323pt,229pt][466pt,314pt]{Header_image.eps}}}
then the image appears only on the first page of the report along with a horizontal line.

Any help is welcome!

Thank you,
Nkal
Last edited by Stefan Kottwitz on Fri Jul 13, 2012 11:04 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Page numbering in footer

Post by Stefan Kottwitz »

Hi Nkal,

you could use

Code: Select all

\pagenumbering{roman}
and later

Code: Select all

\pagenumbering{arabic}
To refer to a page, use \label and \pageref, or if you would like to do it quickly with fixed value, just write it there.

Stefan
LaTeX.org admin
nkal
Posts: 17
Joined: Fri Jul 10, 2009 8:57 pm

Re: Page numbering in footer

Post by nkal »

Hey Stefan,

If you see the code, I do that already. What I need is a little more complex. I have page numbers in both roman and arabic numerals in my report. First pages have page numbers in roman form and after that they restart from 1 and are in arabic form. I need page numbers in the footer in this format: i of j, where i is the current page number and j is the last page number in that page number type. For example, if I have 5 pages that go from i, ii, iii, iv, v, then on page 2 I should have (page ii of v). In the pages where I have arabic numerals I need (page 3 of 10).
I dont know if that is confusing. But I will try once more. I have, lets say 10 pages in all. They are numbered i to v and 1 to 5. so on first 5 pages that are numbered in roman (i to v), I need page i of v, page ii of v, etc. and on the last five pages I need page 1 of 5, page 2 of 5, etc. Remember, my report has both formats in it.

Thank you for your reply!
Cheers,
Nkal
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Page numbering in footer

Post by Stefan Kottwitz »

nkal wrote:If you see the code, I do that already.
There was no \pagenumbering. ;-)
nkal wrote: I need page numbers in the footer in this format: i of j, where i is the current page number and j is the last page number in that page number type.
Do you really want a programmed solution? You could easily place \label{lastromanpage} on the last roman page and use \pageref{lastromanpage}.

Stefan
LaTeX.org admin
nkal
Posts: 17
Joined: Fri Jul 10, 2009 8:57 pm

Re: Page numbering in footer

Post by nkal »

Oops! Forgot to add it in the code here. That works great! I used it with if then else in the footer to get both roman and arabic on the respective pages.

Thanks a bunch, Stefan. That helps!

Cheers,
NKal
Post Reply