Page LayoutProble switching between page numbering styles

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
captainslow
Posts: 2
Joined: Wed Jul 07, 2010 7:28 pm

Proble switching between page numbering styles

Post by captainslow »

Hi Chaps,

I'm currently experiencing an odd pagenumbering problem. My document begins with a title page with 'alph' numbering (not displayed in document), and followed by contents, list of figures and list of tables which should have roman numeral numbering. From the Introduction onwards page numbering should be numeric. My problem is that the final page of the list of tables has the page number 1, and the first page of the introduction is page number 2, as opposed to vi and 1. The transition from the alph to the roman numbering is fine howvever.

The section in question of my header is shown below, does anyone have any idea what I can change to get the first page of the introduction reading 1 instead of 2!?

Code: Select all

\pagenumbering{alph}
\input{./title.tex}

\pagenumbering{roman}
\setcounter{page}{1}

 \begin{abstract}
      Abstract inserted here
	
 \end{abstract}

\tableofcontents
\listoffigures
\listoftables
\pagenumbering{arabic}
\setcounter{page}{1}


\fancyfoot[LE,RO]{\footnotesize{\textsl{Page \thepage\ of \pageref{lastpageofdoc}}}}

\input{Introduction}
Kind Regards,
John

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Proble switching between page numbering styles

Post by frabjous »

Probably you just need to put a \clearpage command in between \listoftables and \pagenumbering{arabic} so that the latter command takes effect on the beginning of the new page rather than the bottom of the page before.

It's impossible to test, however, since you did not provide a compiliable MWE, as per board rules. (See the avoidable mistakes post as well.)
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Proble switching between page numbering styles

Post by meho_r »

Please, read Board rules and how to build a Minimal working example (MWE). Snippets of code, \input and \include commands etc. aren't useful here. For example, from the code you posted people here have no idea which document class you're using, there are no sectioning commands, nothing to be generated by LOF and LOT... Please prepare a MWE which is compilable and which shows your problem clearly, so people here do not have to guess and build an example by themselves (which is pretty annoying when answering a large number of questions, time-consuming and energy-wasting).

For your question, you should separate all those parts with \clearpage command set at least just before the command for redefining page numbering:

Code: Select all

...
\clearpage
\pagenumbering{roman}
\setcounter{page}{1}
...
EDIT: Beaten by the ninja-master frabjous :D
captainslow
Posts: 2
Joined: Wed Jul 07, 2010 7:28 pm

Re: Proble switching between page numbering styles

Post by captainslow »

Thanks for the answers guys-that worked perfectly!

Apologies for causing annoyance/inconvenience by not providing a MWE (admittedly I had not read the rules :oops: ) but I had tried to pare my problem down, but without extensive entries in the list of contents/figures/tables the problem did not neccesarily reproduce. I did want (nor am I allowed) to disclose the content of the article/report so I was hoping from the snippet of code you could suggest what I could try-hence my long-ish discription of the problem in the hope of users understanding it.

Of course if none of your immediate suggestions had worked I would have set to work creating about 10-15 dummy figure captions and 3 pages of contents....
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Proble switching between page numbering styles

Post by localghost »

captainslow wrote:[…] I did want (nor am I allowed) to disclose the content of the article/report so I was hoping from the snippet of code you could suggest what I could try-hence my long-ish discription of the problem in the hope of users understanding it.

Of course if none of your immediate suggestions had worked I would have set to work creating about 10-15 dummy figure captions and 3 pages of contents. […]
A MWE can be generated without the actual content of your document [1]. Now that the problem seems to be solved, please please mark the topic as solved (see Board Rules).

[1] View topic: Avoidable mistakes


Best regards
Thorsten
Post Reply