GeneralPage Number and Top Margin

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Saima
Posts: 4
Joined: Tue Dec 18, 2012 11:30 am

Page Number and Top Margin

Post by Saima »

Hi,
I have two issues in my thesis.
  1. At the start of each Chapter, page number should be displayed.
  2. The "REFERENCES" top margin should be 1.5in, which here with me is 2in now (as all chapter title have 2in).

Code: Select all

\documentclass[12pt]{book}
\pagestyle{plain}
\usepackage{hyperref}
\usepackage{titlesec}
\setcounter{secnumdepth}{3} % for adding subsubsection number
\setcounter{tocdepth}{3} % for table of contents
\usepackage{amsmath, amssymb, amsthm}
\usepackage{multirow}
\usepackage{color, colortbl}
\usepackage{tikz}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{epstopdf}
\usepackage[none]{hyphenat}
\usepackage{caption}
\setlength{\captionmargin}{14pt}

\usepackage{mathptmx}%\renewcommand\rmdefault{stb}
{geometry}
\usepackage[a4paper]{geometry}
\geometry{left = 1.35in, right = 0.85in, top= 0.85in, bottom= 1.25in}
\usepackage{setspace}
\renewcommand{\baselinestretch}{1.5}
\tikzstyle{line} = [draw, -latex', auto]
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%
decorations.pathreplacing,decorations.pathmorphing,shapes,%
matrix,shapes.symbols}
%\usepackage{graphics}
\usepackage{epsf,graphicx}
\renewcommand{\bibname}{References}
\titleformat{\chapter}[display]
{\textsc \normalfont \center }{ \MakeUppercase {\chaptertitlename}\ \thechapter}{5pt}{\center \MakeUppercase}
\titlespacing*{\chapter}{0pt}{20pt}{36pt}
\usepackage{titlesec}
\titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
\tolerance =1
\emergencystretch =\maxdimen
\hyphenpenalty = 1000
\hbadness = 10000
\begin{document}
\pagenumbering{roman}
\include{Title}

\include{Abstract}

\include{Acknowledgement}

\tableofcontents
\listoftables
\listoffigures
\renewcommand{\contentsname}{TABLE OF CONTENTS }
\renewcommand{\listfigurename}{\centering \normalsize LIST OF FIGURES}
\renewcommand{\listtablename}{\centering \normalsize LIST OF TABLES }
\chapter*{LIST OF ABBREVIATIONS}
\addcontentsline{toc}{section}{LIST OF ABBREVIATIONS}
\clearpage
\pagenumbering{arabic}
\include{Chapter1}
\include{Chapter2}
\include{Chapter3}
\include{Chapter4}
\include{Chapter5}

\bibliographystyle{ieeetr}
\bibliography{myref}
\include{Publications}
\end{document}
Last edited by Stefan Kottwitz on Tue Dec 18, 2012 2:57 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.

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

Page Number and Top Margin

Post by Stefan Kottwitz »

Hi Saima,

welcome to the board!

The answer is a bit late. Perhaps you could raise the chance to get a solution by the readers by adding more problem details and less things which aren't relevant.

Are you still working on your thesis? Any open issue?
  1. When I add a chapter to this code frame, there's a page number displayed, because chapter start pages have plain page style.
  2. This can be fixed by using \newgeometry from the geometry package. Of course there's always a workaround, but I did not try with the non-compilable code. Such as adding negative space with \vspace - not to recommend, but as a quick fix to get it done.
Stefan
LaTeX.org admin
Saima
Posts: 4
Joined: Tue Dec 18, 2012 11:30 am

Re: Page Number and Top Margin

Post by Saima »

Thank you Stefan for your kind reply.

1. With me the first page of each chapter is not displaying the page number.

and
2. I used the
\newgeometry for that page it worked fine but for the next pages I again want to change the geomtry of 1 inc. i.e, I want to change the geometry of first page of my references to 1.5 and next pages of references with the top maging of 1 inc.

Thanks
Saima
User avatar
Stefan Kottwitz
Site Admin
Posts: 10347
Joined: Mon Mar 10, 2008 9:44 pm

Page Number and Top Margin

Post by Stefan Kottwitz »

  1. I tested your code. You include chapters, however you did not post such a file. So I cannot see what happens in that file. When I used a \chapter command in your code, the page was numbered with an arabic number in the center of the page footer. Also I could see (roman) page numbers in your lists of figures and tables, done by \chapter*. To ensure that we can verify and fix the problem, better post a Infominimal working example, which means a compilable code which shows the problem, such as a reduced copy of your document. Similar to above, but compilable. Well, it would be better to remove non-relevant parts such as loading as loading multirow, algorithm, ... investing some minutes to write and post a good digestible example highly improves chances that readers use their time to check and to fix. ;-)
  2. You could use \newgeometry again or \restoregeometry. However it can be tricky in automatically generated page ranges. Perhaps this helps:

    Code: Select all

    \usepackage{afterpage}% in the preamble
    ...
    \afterpage{\newgeometry{...}}% at the beginning of the bibliography
Stefan
LaTeX.org admin
Saima
Posts: 4
Joined: Tue Dec 18, 2012 11:30 am

Re: Page Number and Top Margin

Post by Saima »

Hi Stefan.
How can I send you a zip file containg an example of chapter and references to use with the code?
regards

Saima
User avatar
Stefan Kottwitz
Site Admin
Posts: 10347
Joined: Mon Mar 10, 2008 9:44 pm

Page Number and Top Margin

Post by Stefan Kottwitz »

You don't need to send it to me. The purpose of the public forum is to publicly solve problems, so users with a similar problem can find the solution, via forum search or google, for example.

You can attach example files to a forum post. There's an Upload attachment link below the text edit field. The better you prepare an example, the quicker we would have a solution. ;-) If code allows to verify a problem, it's nearly a guarantee that it will be solved.

Stefan
LaTeX.org admin
Saima
Posts: 4
Joined: Tue Dec 18, 2012 11:30 am

Page Number and Top Margin

Post by Saima »

Hi,
1. kindly see the MscThesis.pdf, where I want to display the page number on each chapter first page (here I need to display "3" on the Chapter1 first page).

the page margings are set as

Code: Select all

\geometry{left = 1.35in, right = 0.85in, top= 0.85in, bottom= 1.25in}
where it gives the margins on hardcopy A4 page as left=1.5in, right = 1, top = 1 and bottom = 1in (which is actually my requiremnt,so its fine)
And all Chapter's first page top mrgin is 2in. {May be it is due to this code, i did not understand this}

Code: Select all

\titleformat{\chapter}[display]
{\textsc \normalfont \center }{ \MakeUppercase {\chaptertitlename}\ \thechapter}{5pt}{\center \MakeUppercase}
\titlespacing*{\chapter}{0pt}{20pt}{36pt}
2. Now the BIBILIOGRAPHY first page is also cosidered as a new chapter and thats why giving a top = 2in, while I need it to top = 1.5in.

please find the files in zip in attachment.

Regards

Saima
Attachments
MScthesis.zip
(108.51 KiB) Downloaded 140 times
Last edited by cgnieder on Thu Jan 10, 2013 11:39 am, edited 1 time in total.
Post Reply