Text FormattingTable of Content

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
drame
Posts: 6
Joined: Sun Aug 22, 2010 3:44 pm

Table of Content

Post by drame »

Hi Everyone, I have the following problem and I was wondering if anyone can help me solve it:
I am working in Scientific workplace and attached is my latex code. My table of content keeps appearing on the first page, I ideally want it to appear after the Abstract section on a new page. Please help.

Regards,
Bouba

Code: Select all

\documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage[nohead]{geometry}
\usepackage[singlespacing]{setspace}
\usepackage[bottom]{footmisc}
\usepackage{indentfirst}
\usepackage{endnotes}
\usepackage{placeins}
\usepackage{graphicx}
\usepackage{rotating}

\setcounter{MaxMatrixCols}{10}
%TCIDATA{OutputFilter=Latex.dll}
%TCIDATA{Version=5.50.0.2953}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{LastRevised=Sunday, August 22, 2010 14:24:45}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}

\DeclareGraphicsExtensions{.eps}
\newtheorem{theorem}{Theorem}
\newtheorem{acknowledgement}{Acknowledgement}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conclusion}[theorem]{Conclusion}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{proposition}{Proposition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{summary}[theorem]{Summary}
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\makeatletter
\def\@biblabel#1{\hspace*{-\labelsep}}
\makeatother
\geometry{left=1in,right=1in,top=1.00in,bottom=1.0in}
\widowpenalty=1000
\clubpenalty=1000
\input{tcilatex}
\begin{document}

\title{Master Dissertation Boubacar Drame}

\thispagestyle{empty}

\begin{center}
\FRAME{ftbpF}{5.3167in}{1.7061in}{0pt}{}{}{nottslogo.bmp}{\special{language
"Scientific Word";type "GRAPHIC";display "USEDEF";valid_file "F";width
5.3167in;height 1.7061in;depth 0pt;original-width 6.8642in;original-height
2.6401in;cropleft "0";croptop "1";cropright "1";cropbottom "0";filename
'J:/nottslogo.bmp';file-properties "XNPEU";}}\bigskip

University of Nottingham\\[5mm]
L14010 Dissertation\\[5mm]
Summer Term 2010\\[15mm]
\end{center}

\vspace{2cm}

\begin{center}
{\LARGE A Bayesian Estimation of Greenwood et all (1988) }\\[10mm]

by Drame\\[3mm]
Dissertation Supervisor: C\\[27mm]
\end{center}

\vspace{3cm}

\noindent This 
\newpage \sloppy

\onehalfspacing
\pagebreak \doublespacing

\begin{center}
{\LARGE A Bayesian Estimation of Greenwood et all (1988) }

{\LARGE \bigskip }

Drame

\bigskip
\end{center}

Abstract\qquad This paper uses Bayesian inference 
\begin{center}
\bigskip
\end{center}

Keywords\qquad Bayesian Estimation - Bayesian Model Comparison - Markov
Chain Monte Carlo (MCMC) - Metropolis-Hasting Algorithm - Gibbs Sampling -
Stochastic singularity - Variance decomposition.

\tableofcontents
\newpage


\textit{...the g.}

\begin{quote}
Alan Greenspan (2004)\bigskip
\end{quote}

% ------- Content Begin ---------

\section{Introduction}

\setcounter{page}{1}
performance of MCMC methods by analysing convergence diagnostic results.
\newpage
\section{DSGE Model Estimations}
In order to .
\subsection{Frequentists and Bayesians}
Classical statistical

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

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Table of Content

Post by meho_r »

Hi and welcome.

First thing you really should do is to read thoroughly Board Rules. Failing to follow those most basic instructions reduces greatly your chance to get a quick and relevant answer.

Now, you have placed \tableofcontents command before \newpage command in the code above, so it is natural that it doesn't appear on the next page. Switch places of these two commands to achieve desired behaviour.
drame
Posts: 6
Joined: Sun Aug 22, 2010 3:44 pm

Re: Table of Content

Post by drame »

Hi,

Thank you for the prompt reply. I just did what you suggested, but I get the same problem. Perhaps the problem could be with scientific workplace?
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Table of Content

Post by meho_r »

I couldn't compile your original code so I had to comment out lines 52, 60–64, then I added \newpage commands before and after \tableofcontents command (lines 108–110) to separate TOC completely from the text before and after it. Please, try to compile this code:

Code: Select all

\documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage[nohead]{geometry}
\usepackage[singlespacing]{setspace}
\usepackage[bottom]{footmisc}
\usepackage{indentfirst}
\usepackage{endnotes}
\usepackage{placeins}
\usepackage{graphicx}
\usepackage{rotating}

\setcounter{MaxMatrixCols}{10}
%TCIDATA{OutputFilter=Latex.dll}
%TCIDATA{Version=5.50.0.2953}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{LastRevised=Sunday, August 22, 2010 14:24:45}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}

\DeclareGraphicsExtensions{.eps}
\newtheorem{theorem}{Theorem}
\newtheorem{acknowledgement}{Acknowledgement}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conclusion}[theorem]{Conclusion}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{proposition}{Proposition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{summary}[theorem]{Summary}
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\makeatletter
\def\@biblabel#1{\hspace*{-\labelsep}}
\makeatother
\geometry{left=1in,right=1in,top=1.00in,bottom=1.0in}
\widowpenalty=1000
\clubpenalty=1000
%\input{tcilatex}
\begin{document}

\title{Master Dissertation Boubacar Drame}

\thispagestyle{empty}

\begin{center}
%\FRAME{ftbpF}{5.3167in}{1.7061in}{0pt}{}{}{nottslogo.bmp}{\special{language
%"Scientific Word";type "GRAPHIC";display "USEDEF";valid_file "F";width
%5.3167in;height 1.7061in;depth 0pt;original-width 6.8642in;original-height
%2.6401in;cropleft "0";croptop "1";cropright "1";cropbottom "0";filename
%'J:/nottslogo.bmp';file-properties "XNPEU";}}\bigskip

University of Nottingham\\[5mm]
L14010 Dissertation\\[5mm]
Summer Term 2010\\[15mm]
\end{center}

\vspace{2cm}

\begin{center}
{\LARGE A Bayesian Estimation of Greenwood et all (1988) }\\[10mm]

by Drame\\[3mm]
Dissertation Supervisor: C\\[27mm]
\end{center}

\vspace{3cm}

\noindent This 
\newpage \sloppy

\onehalfspacing
\pagebreak \doublespacing

\begin{center}
{\LARGE A Bayesian Estimation of Greenwood et all (1988) }

{\LARGE \bigskip }

Drame

\bigskip
\end{center}

Abstract\qquad This paper uses Bayesian inference 
\begin{center}
\bigskip
\end{center}

Keywords\qquad Bayesian Estimation - Bayesian Model Comparison - Markov
Chain Monte Carlo (MCMC) - Metropolis-Hasting Algorithm - Gibbs Sampling -
Stochastic singularity - Variance decomposition.


\newpage
\tableofcontents
\newpage


\textit{...the g.}

\begin{quote}
Alan Greenspan (2004)\bigskip
\end{quote}

% ------- Content Begin ---------

\section{Introduction}

\setcounter{page}{1}
performance of MCMC methods by analysing convergence diagnostic results.
\newpage
\section{DSGE Model Estimations}
In order to .
\subsection{Frequentists and Bayesians}
Classical statistical
\end{document}
BTW, the code you provided doesn't conform to Minimal Working Example guidelines, which complicates the problem. I suggest you read these guidelines, reduce your code and remove all unnecessary parts. Then it'll be much easier to solve the problem.
drame
Posts: 6
Joined: Sun Aug 22, 2010 3:44 pm

Re: Table of Content

Post by drame »

I just compiled the codes you sent me, it compiled fine in Scientific workplace (SW) but the content page appears first again on the first page.

NB: I am really sorry if I have failed to meet some of the requirements of your forum, I am quite new to using latex this way as I usually use SW, thus I am not familiar with some of the terminologies. However, I will do my best to comply with the rules.

Regards,
Bouba
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Table of Content

Post by meho_r »

Well, that is very strange indeed. Back to a most basic example. Please compile this code:

Code: Select all

\documentclass{article}

\begin{document}

\section{A test section}
Some text\ldots

\subsection{A test subsection}
Some text\ldots

\newpage

\tableofcontents

\newpage

And here's the text that should come on the page after the one containing TOC.

\end{document}
The result is in the attachment. If you get a different result even with this example, then let us know how do you compile your document (which procedure do you use, which buttons do you press etc.)
Attachments
Test.pdf
(37.75 KiB) Downloaded 206 times
drame
Posts: 6
Joined: Sun Aug 22, 2010 3:44 pm

Re: Table of Content

Post by drame »

Same problem. I am using scientific workplace, and inside scientific workplace, under the tab Typeset I choose Preview PDF and get the PDF. But the content page appears first. This is indeed strange as you said.
drame
Posts: 6
Joined: Sun Aug 22, 2010 3:44 pm

Re: Table of Content

Post by drame »

To be more specific about what I am getting, I have attached the pdf. Many thanks.
Attachments
Untitled1.pdf
(12.16 KiB) Downloaded 213 times
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Table of Content

Post by meho_r »

I'm pretty sure this is SW-related issue. Unfortunately, I'm not using Windows nor Mac OS X, so I cannot inspect the problem closely. You may try to search SW's help files or check on its User Forum to see if anyone can give you an advice how to solve this problem. Also check the preferences of the application.

Another way could be to use some other LaTeX editor like TeXWorks, Texmaker, or put the code in a file with .tex extension and run pdflatex on it directly from Command Prompt (assuming you're using Windows).
drame
Posts: 6
Joined: Sun Aug 22, 2010 3:44 pm

Re: Table of Content

Post by drame »

I will try the SW forum as well. Thank you so much for your help and useful advice.

Regards,
Bouba
Post Reply