Insert title page into table of contents
The following seems to adhere to your request (mildly different from Guido's answer):
\documentclass[12pt,letterpaper]{report}
%for split boxes and title page
\usepackage{array}% http://ctan.org/pkg/array
%for title page
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
%for double spacing in abstract
\usepackage{setspace}% http://ctan.org/pkg/setspace
\begin{document}
\pagenumbering{roman}
\thispagestyle{empty}
% --- begin title.tex
%\begin{titlepage}
\addcontentsline{toc}{chapter}{\protect\numberline{}The title of my thesis}% Add title to ToC
\begin{center}
\vspace*{1in}
\MakeUppercase{The Title of}\\[12pt]
\MakeUppercase{My Thesis}\\
% ----------------------------------------------------------------
\vspace{1.5cm}
by\\[12pt]
Nathan G. Glenn\\[14pt]
% ----------------------------------------------------------------
\vspace{2cm}
Submitted to Brigham Young University in partial fulfillment of\\[12pt] graduation requirements for University Honors \\[5pt]
\vfill
% ----------------------------------------------------------------
Linguistics Department\\[12pt]
Some University\\[12pt]
{November 2012}
\vfill
\begin{tabbing}%
\hspace{3in}\= \kill % set up one tab position
\centering\arraybackslash Advisor: My Advisor \> Honors Representative: My Rep\\[12pt]
\centering\arraybackslash Signature: \hspace{0.5cm}\makebox[1.8in]{\hrulefill} \> Signature: \hspace{0.5cm} \makebox[1.8in]{\hrulefill}
\end{tabbing}
\end{center}
%\end{titlepage}
% --- end title.tex
\clearpage
% --- begin abstract.tex
\begin{center}
\vspace*{1in}
ABSTRACT\\[36pt]
\addcontentsline{toc}{chapter}{\protect\numberline{}My abstract}% Add abstract to ToC
\MakeUppercase{The Title of}\\[12pt]
\MakeUppercase{My Thesis}\\[36pt]
Nathan G. Glenn\\[12pt]
Linguistics Department\\[12pt]
Bachelor of Arts\\[36pt]
\end{center}
\doublespacing
Is the page number arabic like it should be?
\singlespacing
% --- end abstract.tex
\clearpage
\pagenumbering{arabic}
{
\makeatletter
\let\@oldstarttoc\@starttoc
\renewcommand{\@starttoc}{%
\addcontentsline{toc}{chapter}{\protect\numberline{}\contentsname}% Add ToC to ToC
\@oldstarttoc
}
\tableofcontents
\makeatother
}
\chapter{Title and Abstract Should Appear Above Me in the ToC}
\chapter{Introduction}
\chapter{LitReview}
\end{document}
Instead of using the titlepage
environment, I've used \pagenumbering{roman}
and \thispagestyle{empty}
, to remove the page numbering. For each of the title, abstract and contents, I've added a \addtocontents{toc}{chapter}{...}
which sets the entry in the ToC similar to that of the chapters. This can be changed, of course.
Also, instead of loading the etoolbox
package and patching \tableofcontents
, a localized redefinition of \@starttoc
is sufficient to add the ToC to the ToC itself.
You have to move the \pagenumbering{arabic}
after \tableofcontents
otherwise the page number for the abstract and the table of contents will be in arabic numerals and not roman.
Eventually, you might add a line \addtocounter{page}{1}
after \end{titlepage}
(titlepage
resets the counter of the page at the end to 1, so the nex page after it is page 1)>
To add the title page and abstract to the content you can add the line
\addcontentsline{toc}{chapter}{<TEXT>}
somewhere in the title page file and at the beginning of the abstract file. Replace <TEXT>
with whatever appropriate for the context.
For the table of contents, you can use the etoolbox
package to patch it
\usepackage{etoolbox}
\patchcmd{\tableofcontents}
{\@starttoc}
{\addcontentsline{toc}{chapter}{\contentsname}\@starttoc}
{}
{}
Try this:
\documentclass[12pt,letterpaper]{report}
%for split boxes and title page
\usepackage{array}
%for title page
\usepackage{graphicx}
%for double spacing in abstract
\usepackage{setspace}
\usepackage{filecontents}
\begin{filecontents}{title.tex}
\thispagestyle{empty}
\begin{center}
\vspace*{1in}
\MakeUppercase{The Title of}\\[12pt]
\MakeUppercase{My Thesis}\\
\end{center}
\end{filecontents}
\begin{filecontents}{abstract.tex}
\begin{center}
\vspace*{1in}
\chapter*{ABSTRACT}
\MakeUppercase{The Title of}\\[12pt]
\MakeUppercase{My Thesis}\\[36pt]
Nathan G. Glenn\\[12pt]
Linguistics Department\\[12pt]
Bachelor of Arts\\[36pt]
\end{center}
\doublespacing
Is the page number arabic like it should be?
\singlespacing
\end{filecontents}
\newenvironment{romanpages}
{\setcounter{page}{1}\renewcommand{\thepage}{\roman{page}}}
{\cleardoublepage\renewcommand{\thepage}{\arabic{page}}\setcounter{page}{1}}
\begin{document}
\begin{romanpages}
\input{title}
\addcontentsline{toc}{chapter}{Title}
\input{abstract}
\addcontentsline{toc}{chapter}{Abstract}
\end{romanpages}
\pagenumbering{arabic}
\setcounter{page}{1}
\tableofcontents
\chapter{Title and Abstract Should Appear Above Me in the ToC}
\chapter{Introduction}
\chapter{LitReview}
\end{document}
I have added a new environment called roman pages. Also, I have added \addcontentsline
command to include title and abstract. Also, add \thispagestyle{empty}
in title.tex
to suppress the page number.