Featured Book

LaTeX Beginners Guide

Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 8 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Page numbering in footer Topic is solved

Add tags Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).

Page numbering in footer

Postby nkal on Fri Jul 13th, 2012

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  •  Open in writeLaTeX
\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  •  Open in writeLaTeX
\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  •  Open in writeLaTeX
\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_K on Fri Jul 13th, 2012, edited 1 time in total.
Reason: inline code changed to code block
nkal
 
Posts: 17
Joined: Fri Jul 10th, 2009

Re: Page numbering in footer  Topic is solved

Postby Stefan_K on Fri Jul 13th, 2012

Hi Nkal,

you could use
Code: Select all  •  Open in writeLaTeX
\pagenumbering{roman}

and later
Code: Select all  •  Open in writeLaTeX
\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 Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6336
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Page numbering in footer

Postby nkal on Fri Jul 13th, 2012

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
nkal
 
Posts: 17
Joined: Fri Jul 10th, 2009

Re: Page numbering in footer

Postby Stefan_K on Fri Jul 13th, 2012

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 Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6336
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Page numbering in footer

Postby nkal on Fri Jul 13th, 2012

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
nkal
 
Posts: 17
Joined: Fri Jul 10th, 2009


Return to Page Layout

Who is online

Users browsing this forum: No registered users and 8 guests