LaTeX forum ⇒ Page LayoutPage numbering in footer Topic is solved

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

Page numbering in footer

Postby nkal » Fri Jul 13, 2012 11:00 pm

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:
  1. \documentclass[11pt]{report}
  2. \usepackage{amsmath}
  3. \usepackage{amsfonts}
  4. \usepackage[papersize={8.5in,11in},top=0.81in, left=1.44in, right=1in,bottom=0.94in]{geometry}
  5. \usepackage{alltt}
  6. \usepackage{fancyhdr}
  7. \usepackage{graphicx}
  8. \usepackage{ulem}
  9. \usepackage{ifthen}
  10. \usepackage{winfonts}
  11. \usepackage[T1]{fontenc}
  12. \usepackage{color,hyperref}
  13. \usepackage{titlesec}
  14. \usepackage{lastpage}
  15.  
  16. \rfoot{\fontsize{8pt}{0pt}\fontfamily{phv}\selectfont{V1.0.0 DOCUMENT}}
  17. \cfoot{Page \thepage of \pageref{LastPage}}
  18. \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:

  1. \pagestyle{fancy}
  2. \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
  1. \pagestyle{fancy}
  2. \rhead{}
  3. \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.
Reason: inline code changed to code block

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Stefan Kottwitz
Site Admin
Posts: 7803
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Fri Jul 13, 2012 11:09 pm

Hi Nkal,

you could use
  1. \pagenumbering{roman}

and later
  1. \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
Site admin

Link:
BBcode: Topic is solved[/url]" title="Click to select post's link in BBcode format" onclick="this.focus();this.select();" />
HTML: Topic is solved</a>" title="Click to select post's link in HTML format" onclick="this.focus();this.select();" />
Hide post links
Show post links

nkal
Posts: 17
Joined: Fri Jul 10, 2009 8:57 pm

Postby nkal » Fri Jul 13, 2012 11:31 pm

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

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Stefan Kottwitz
Site Admin
Posts: 7803
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Fri Jul 13, 2012 11:40 pm

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
Site admin

Link:
BBcode:
HTML:
Hide post links
Show post links

nkal
Posts: 17
Joined: Fri Jul 10, 2009 8:57 pm

Postby nkal » Fri Jul 13, 2012 11:45 pm

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

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 4 guests