General ⇒ Page numbering
-
- Posts: 6
- Joined: Thu Apr 10, 2008 9:20 am
Page numbering
I don't know if this has been answered before
1. In my thesis, how do I get the arabic numbering for the front matter (abstract, acknowledgment, contents etc.) to be on right hand corner instead of bottom centered? The chapter numbering is fine with the start of each chapter having the number bottom centered and the remaining page numbers at the right hand corner.
2. I have entire thesis set to double space but my MATLAB code in my appendix section got double spaced too. Is there a way to not have it double spaced and retain the code look?
I have the attached the tex and cls file as a zip. Thanks!
1. In my thesis, how do I get the arabic numbering for the front matter (abstract, acknowledgment, contents etc.) to be on right hand corner instead of bottom centered? The chapter numbering is fine with the start of each chapter having the number bottom centered and the remaining page numbers at the right hand corner.
2. I have entire thesis set to double space but my MATLAB code in my appendix section got double spaced too. Is there a way to not have it double spaced and retain the code look?
I have the attached the tex and cls file as a zip. Thanks!
- Attachments
-
- Thesis.zip
- (7.63 KiB) Downloaded 502 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

Page numbering
No one else would possibly be using that bizarre thesis class, and so I doubt it...wintermute01 wrote:I don't know if this has been answered before
That thesis class is using fancyhdr is an old deprecated way. So you'll have to do some strange things yourself.wintermute01 wrote:1. In my thesis, how do I get the arabic numbering for the front matter (abstract, acknowledgment, contents etc.) to be on right hand corner instead of bottom centered? The chapter numbering is fine with the start of each chapter having the number bottom centered and the remaining page numbers at the right hand corner.
- Get rid of ALL of your fancyhdr related commands. Stop trying to play with the headers and footers yourself. You'll be fighting with the thesis class.
- Add to your preamble (e.g., after your \hypersetup line).
Code: Select all
\lhead[\fancyplain{\thepage}{}]{} \rhead[]{\fancyplain{\thepage}{}} \cfoot{\fancyplain{}{\thepage}} \pagestyle{fancyplain}
- Addafter your \mainmatter command.
Code: Select all
\pagestyle{fancy}
A MINIMAL working example would be helpful. I don't know what you mean by "code look."wintermute01 wrote:2. I have entire thesis set to double space but my MATLAB code in my appendix section got double spaced too. Is there a way to not have it double spaced and retain the code look?
You can just turn on single spacing around your MATLAB code. Perhaps that's best.
Otherwise, use the listings package to include your MATLAB code. It already has Matlab defined as a language.
-
- Posts: 6
- Joined: Thu Apr 10, 2008 9:20 am
Re: Page numbering
Hi Ted,
Thanks for the input. The thesis template is not mine. I'm using the template from this site http://www.sunilpatel.co.uk/thesistemplate.php, I've been tweaking the settings by trial and error and with the website author's help. I'm still a beginner LATex user...
I tried to comment out the fancy hdr commands and use your commands but the tex file wouldn't compile. I couldn't really figure out what was going wrong. All I need is for the preliminary pages are numbered consecutively in lower case Roman numerals placed in the upper right-hand corner. The first page to be numbered will be the first page following the title page, and it will be number ii. the Abstract page is assigned a number but the number is not typed.
I was able to solve the MATLAB problem by using the singlespace command and the verbatim command. Using lstlistings converts variables like delta in the code to a delta symbol.
Thanks.
Thanks for the input. The thesis template is not mine. I'm using the template from this site http://www.sunilpatel.co.uk/thesistemplate.php, I've been tweaking the settings by trial and error and with the website author's help. I'm still a beginner LATex user...

I tried to comment out the fancy hdr commands and use your commands but the tex file wouldn't compile. I couldn't really figure out what was going wrong. All I need is for the preliminary pages are numbered consecutively in lower case Roman numerals placed in the upper right-hand corner. The first page to be numbered will be the first page following the title page, and it will be number ii. the Abstract page is assigned a number but the number is not typed.
I was able to solve the MATLAB problem by using the singlespace command and the verbatim command. Using lstlistings converts variables like delta in the code to a delta symbol.
Thanks.
Page numbering
Make sure you have the chapter include pages commented out if those chapter files don't exist. You might want to consider using the import or chapterfolder packages to make including files from within those chapters easier.wintermute01 wrote:I tried to comment out the fancy hdr commands and use your commands but the tex file wouldn't compile.
That behavior makes no sense.wintermute01 wrote:Using lstlistings converts variables like delta in the code to a delta symbol.
See the attached NewThesis.zip. I've modified your attachment so that the numbering is as you wish. I also added a MATLAB example that uses listings that does NOT replace "delta" with the delta symbol. If you have trouble building, respond with the error messages that LaTeX produces.
- Attachments
-
- NewThesis.zip
- Modification of Thesis.zip for proper numbering and MATLAB inclusion.
- (7.95 KiB) Downloaded 328 times
-
- Posts: 6
- Joined: Thu Apr 10, 2008 9:20 am
Page numbering
Hi Ted,
Your updated tex and sty files helped! The symbol conversion was being caused by using the mcode.sty from here: http://www.mathworks.com/matlabcentral/ ... tType=File. Once I looked at lstset I saw this: which I commented out and now the code prints out correctly with no symbol replacement
I applied your pagehdr styles and the numbering is correct for the preamble section except:
1. Title Page is counted but not numbered. Which means the page after the title page should be ii. Right now the page after the title page is set to i. What page counter should I set?
2. The first page of each chapter should have the page number bottom centered and consecutive pages in that chapter have the numbers on the top right.
It's probably confusing. I have attached my updated tex and cls files along with the manual and template for reference.
Thanks!
Your updated tex and sty files helped! The symbol conversion was being caused by using the mcode.sty from here: http://www.mathworks.com/matlabcentral/ ... tType=File. Once I looked at lstset I saw this:
Code: Select all
%
% the following is for replacing some matlab relations like >= or ~=
% by the corresponding LaTeX symbols, which are much easier to read ...
literate=%
{~}{{$\neg$}}1 % \neg
{<=}{{\tiny$\leq$}}1 % \leq
{>=}{{\tiny$\geq$}}1 % \geq
{~=}{{\tiny$\neq$}}1 % \neq
{delta}{{\tiny$\Delta$}}1% \Delta
I applied your pagehdr styles and the numbering is correct for the preamble section except:
1. Title Page is counted but not numbered. Which means the page after the title page should be ii. Right now the page after the title page is set to i. What page counter should I set?
2. The first page of each chapter should have the page number bottom centered and consecutive pages in that chapter have the numbers on the top right.
It's probably confusing. I have attached my updated tex and cls files along with the manual and template for reference.
Thanks!
-
- Posts: 6
- Joined: Thu Apr 10, 2008 9:20 am
Re: Page numbering
Hey guys,
Can somebody help me please?!
I'm really desperate as the submission deadline is tomorrow and I'm working on some final corrections.
I don't want to miss it because of some stupid pagination. I have spent days trying to modify it without no luck.
It's only the preamble section (i.e. Title Page, Acknowledgments, Contents, Lists, Abstract) that is having the problem. The Chapters are fine. Please look at my previous post for the attachment.
1. My title page should be included in pagination but shouldn't be numbered. Currently the Acknowledgment page is numbered "i" for some strange reason when it should be page "ii".
2. All page numbers in the preamble section (Title Page, Acknowledgments, Contents, Lists, Abstract) should go into the right hand corner.
Just two minor things to solve and I could be done! Help!
I have tried every documentation and I'm brain dead from looking at the same document for 9 hours straight...
Thanks in advance for any help.
Can somebody help me please?!
I'm really desperate as the submission deadline is tomorrow and I'm working on some final corrections.

It's only the preamble section (i.e. Title Page, Acknowledgments, Contents, Lists, Abstract) that is having the problem. The Chapters are fine. Please look at my previous post for the attachment.
1. My title page should be included in pagination but shouldn't be numbered. Currently the Acknowledgment page is numbered "i" for some strange reason when it should be page "ii".
2. All page numbers in the preamble section (Title Page, Acknowledgments, Contents, Lists, Abstract) should go into the right hand corner.
Just two minor things to solve and I could be done! Help!
I have tried every documentation and I'm brain dead from looking at the same document for 9 hours straight...
Thanks in advance for any help.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Page numbering
Hi,
1. change the page counter, for instance
directly after \maketitle.
2. here's a replacement for your fancyhdr code inside the preamble:
After \mainmatter change the plain style:
Let me know if it works or if you need further advice.
Stefan
1. change the page counter, for instance
Code: Select all
\setcounter{page}{2}
2. here's a replacement for your fancyhdr code inside the preamble:
Code: Select all
\fancyhf{}
\rhead{\thepage}
\fancypagestyle{plain}{}
\pagestyle{fancy}
Code: Select all
\fancypagestyle{plain}{\fancyhf{}\cfoot{\thepage}}
Stefan
LaTeX.org admin
-
- Posts: 6
- Joined: Thu Apr 10, 2008 9:20 am
Re: Page numbering
Holy ^&*#! It did!!! Hooray!!!
I had just figured out about setting the counter to 2 before seeing your reply.
And yes the hdr styles worked. Finally! Some peace of mind.
Thanks a bunches Stefan! You saved the day. Now I can actually work all night on those last minute corrections.
Thanks for this forum. You guys are awesome!
I had just figured out about setting the counter to 2 before seeing your reply.
And yes the hdr styles worked. Finally! Some peace of mind.
Thanks a bunches Stefan! You saved the day. Now I can actually work all night on those last minute corrections.
Thanks for this forum. You guys are awesome!

Page numbering
wintermute01 wrote:1. Title Page is counted but not numbered. Which means the page after the title page should be ii. Right now the page after the title page is set to i. What page counter should I set?
Code: Select all
\setcounter{page}{2}
Because of the awkward documentclass you have chosen, this change is less straightforward than it would be otherwise. See the attached NewThesis2.zip for a working example. As you'll see, the most important code is right after \mainmatter:wintermute01 wrote:2. The first page of each chapter should have the page number bottom centered and consecutive pages in that chapter have the numbers on the top right.
Code: Select all
\lhead[\fancyplain{}{\thepage}]{}
\rhead[]{\fancyplain{}{\thepage}}
\cfoot{\fancyplain{\thepage}{}}
\pagestyle{fancy}
- Attachments
-
- NewThesis2.zip
- Updated working example.
- (7.99 KiB) Downloaded 372 times