Page LayoutPage numbering in ToC , LoT, LoF and References

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
maranatha
Posts: 13
Joined: Tue May 03, 2011 9:08 pm

Page numbering in ToC , LoT, LoF and References

Post by maranatha »

Hello
I was about to finish my thesis and I couldn't make the following parts the same as the university guide line(which is in PDF :) )
  1. All page numbers should be on the top center of each page. I was successful in other parts of the thesis except at the beginning of ToC, LoF, LoT and References page in which the page numbers appear on the bottom center of the page.
  2. Exceptionally the first pages of ToC, LoF, LoT and References parts have bigger top margin than the others and I cant manage it to reduce with vertical spacing commands.
  3. In the list of References, References have to be separated by a blank line.
Below is a minimized part of my main *.tex file.

Code: Select all

\documentclass[a4paper,12pt, oneside, openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[round]{natbib}
\usepackage[OT1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[top=3.5cm, bottom=3cm, left=3cm, right=3cm, textwidth = 15cm ]{geometry}

\renewcommand*{\contentsname}{TABLE OF CONTENTS}
\renewcommand*{\listfigurename}{LIST OF FIGURES}
\renewcommand*{\listtablename}{LIST OF TABLES}
\renewcommand*{\bibname}{REFERENCES}

\begin{document}
  \tableofcontents
  \clearpage
  \listoffigures
  \addcontentsline{toc}{section}{LIST OF FIGURES}  
  \clearpage
  \listoftables
  \addcontentsline{toc}{section}{LIST OF TABLES}

  %Bibilography
  \setlength{\bibhang}{1cm} 
  \setlength{\itemsep}{1.5cm}
  \renewcommand*{\bibname}{\normalfont \normalsize REFERENCES}
  \bibliographystyle{plainnat}
  \bibliography{mybib}
  \addcontentsline{toc}{section}{\hspace*{1cm}REFERENCES}
\end{document}
Last edited by maranatha on Sun May 08, 2011 2:40 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.

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

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

Page numbering in ToC , LoT, LoF and References

Post by Stefan Kottwitz »

Hi Maranatha,

the code doesn't show the problem, I tested it.
  1. I don't see any page number in the top center of a page.
  2. The margins look normal, there's not much to compare.
  3. There's no list of references to be seen.
It's just explaining that it's hard to verify if the example is so minimal that it doesn't show the problem. Though it's good that you posted the example.

Let's see what we could do for now.

The first page of ToC, LoF, LoT and References have "plain" page style. This can be redefined, it can be changed using features of the used package. If you use fancyhdr, \fancypagestyle{plain}{} would help. Or the quick fix in the preamble

Code: Select all

\makeatletter
\let\ps@plain\ps@fancy
\makeatother
of if you use page style headings

Code: Select all

\makeatletter
\let\ps@plain\ps@headings
\makeatother
Perhaps the header spacing is better then. Otherwise I need further information. Btw. the titlesec package is great to do spacing and customization for headings in general.

Stefan
LaTeX.org admin
maranatha
Posts: 13
Joined: Tue May 03, 2011 9:08 pm

Page numbering in ToC , LoT, LoF and References

Post by maranatha »

Hello Stefan

Thank you for the help. Sorry that my code didnt show the problem. I put different commands at different time to bring the school template. And I cant well know which commands are affecting and which are not. When I fix something then I mess another thing. I just thought it wouldnt be fair for readers to put the main.tx file in here.

The following code is some how full. The pages numbers are still on the bottom center of the pages. This happens only for the first page of TOC, LOC, LOT. If these tables are more than one the page numbers are on the top center of the page.

Code: Select all

\documentclass[a4paper,12pt, oneside, openany]{book}
\usepackage[utf8]{inputenc}
\usepackage{layout}
\usepackage[english,finnish]{babel}	% hyphenation
\usepackage[OT1]{fontenc}
\usepackage{amssymb,amsmath}
\numberwithin{equation}{section}
\numberwithin{figure}{section}
\numberwithin{table}{section}
\usepackage[utf8]{inputenc}
\usepackage[usenames,dvipsnames]{color}
\usepackage{setspace}			% row spacing
\usepackage{multirow}
\usepackage{colortbl}
\usepackage{amsbsy}
\usepackage[all]{xy}
\usepackage[pdftex]{graphicx}		
\usepackage{ifpdf}
\usepackage{float}                 
\renewcommand{\textfraction}{0}		
\renewcommand{\topfraction}{2}    	
\renewcommand{\bottomfraction}{2} 	
\renewcommand{\arraystretch}{1.5}	
\newcommand{\tableheader}[1]{\emph{#1}}
\newcommand{\paraheader}[1]{\textbf{#1}}
\newcommand{\urltext}[1]{\texttt{#1}}
\newcommand{\tablecaption}[1]{\caption{#1}\vspace{4mm}}  
\renewcommand{\thesection}{\arabic{section}} 
 \usepackage{titlesec}
 \titleformat{\section}{\normalsize}{\thesection}{1em}{}
 \titleformat{\subsection}{\normalsize}{\thesubsection}{1em}{}
 \titleformat{\subsubsection}{\normalsize}{\thesubsubsection}{1em}{}
\usepackage{mathpazo}
\usepackage[top=3.5cm, bottom=3cm, left=3cm, right=3cm, textwidth = 15cm ]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\chead{\thepage}
\lhead{}
\rhead{}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\headrulewidth}{0pt}
\usepackage[hang,small,bf]{caption}
\usepackage[round]{natbib}
\begin{document}
\selectlanguage{english}
\thispagestyle{empty}
\begin{flushleft}
\bf MY UNIVERSITY\\
\vspace{1cm}
\bf FACULTY OF TECHNOLOGY\\
\vspace{1cm}
\bf TELECOMMUNICATIONS ENGINEERING \\
\end{flushleft}
\vspace{2.5cm}
\begin{flushleft}
 MY NAME
\end{flushleft}
\clearpage
\selectlanguage{english}
\onehalfspacing
\pagenumbering{arabic}
\setcounter{page}{2}
\onehalfspacing
\begin{spacing}{1.5}
\renewcommand*{\contentsname}{\hspace*{0.45cm} \normalsize \normalfont \hspace*{-0.2cm} \vspace*{-1cm} TABLE OF CONTENTS}
\renewcommand*{\listfigurename}{\hspace*{0.45cm} \normalsize \normalfont \hspace*{-0.2cm}  \vspace*{-1cm} LIST OF FIGURES}
\renewcommand*{\listtablename}{\hspace*{0.45cm} \normalsize \normalfont \hspace*{-0.18cm}  \vspace*{-1cm} LIST OF TABLES}
\setcounter{tocdepth}{3}%---------------------------------------------------------
\setcounter{secnumdepth}{3}
\tableofcontents
\clearpage
\listoffigures
\addcontentsline{toc}{section}{LIST OF FIGURES}  
\clearpage
\listoftables
\clearpage
\addcontentsline{toc}{section}{LIST OF TABLES}
\parskip 18pt                     
\section{This is Section 1}
\subsection{This is subsection 1.1}
\section{This is section 2}
\subsection{This is subsection 2.1}
\setlength{\bibhang}{1cm}
\renewcommand*{\bibname}{\normalfont \normalsize REFERENCES}
\bibliographystyle{plainnat}
\bibliography{mybib}
\addcontentsline{toc}{section}{\hspace*{1cm}REFERENCES}
\clearpage
\end{spacing}
\end{document}
Sorry it is a bit long.
maranatha
Posts: 13
Joined: Tue May 03, 2011 9:08 pm

Page numbering in ToC , LoT, LoF and References

Post by maranatha »

Hi again,
For the first problem the following code in the preamble solved it.

Code: Select all

\makeatletter
\let\ps@plain\ps@fancy
\makeatother
But I still cant understand why TOC,LOF,LOT and References do not have the same margin with the rest of my chapters even though I used the following package and options in the preamble.

Code: Select all

\usepackage[top=3.5cm, bottom=3cm, left=3cm, right=3cm, textwidth = 15cm ]{geometry}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10329
Joined: Mon Mar 10, 2008 9:44 pm

Re: Page numbering in ToC , LoT, LoF and References

Post by Stefan Kottwitz »

Hi maranatha,

good to see that a part is solved. Regarding the margins, I expect I will have time to deal with it in the late evening today.

Stefan
LaTeX.org admin
maranatha
Posts: 13
Joined: Tue May 03, 2011 9:08 pm

Re: Page numbering in ToC , LoT, LoF and References

Post by maranatha »

Hello Stefan
Good to hear that you will get back to my problem.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10329
Joined: Mon Mar 10, 2008 9:44 pm

Page numbering in ToC , LoT, LoF and References

Post by Stefan Kottwitz »

I see you are using the book document class. However, you don't use chapters, but TOC, LOF etc. do, and chapter headings are different. This explains the different spacing.

Just try using article instead of book in the first line to see that.

Stefan
LaTeX.org admin
maranatha
Posts: 13
Joined: Tue May 03, 2011 9:08 pm

Re: Page numbering in ToC , LoT, LoF and References

Post by maranatha »

Hello Stefan, that was a good solutions for that specific part. But when I changed the documentclass to article all lists in the TOC appear in BOLD which is not desired. I tried to override the BOLD using \normalfont command but it didnt help.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10329
Joined: Mon Mar 10, 2008 9:44 pm

Page numbering in ToC , LoT, LoF and References

Post by Stefan Kottwitz »

maranatha wrote:But when I changed the documentclass to article all lists in the TOC appear in BOLD which is not desired.
Should section headings be bold? Or also medium (not bold)?
The lists headings are section headings in the article class and chapter headings in the book class, that's why they are treated this way.

Stefan
LaTeX.org admin
maranatha
Posts: 13
Joined: Tue May 03, 2011 9:08 pm

Re: Page numbering in ToC , LoT, LoF and References

Post by maranatha »

Hello Stefan
Sections, subsections...every heading in the body should NOT be in bold and they should not be listed in BOLD also on the TOC.
Post Reply