This related to this question:
How to merge several tex files so that they have one table of contents/List of tables & figures
I have been trying to get the solution by Jean Mentz to work, it's nearly there but I can't seem to get the table of contents to work?
I've tried it as:
\addtocontents{toc}{Chapter One}
\input{Introduction.tex}
which gives the contents page below with overlapping entries on the first line. Note that Chapter One does not appear anywhere apart from the table of contents.
Doing it as
\chapter{Chapter One}
\input{Introduction.tex}
Means that only abstract appears on the contents page and chapter one just appears as regular text before abstract in the document. It almost seems like the chapter command is not being recognized?
\documentclass{article}
\usepackage{fancyvrb}
\DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}
\DefineVerbatimEnvironment{example}{Verbatim}{fontsize=\small}
\usepackage{natbib}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{bm}
\usepackage{grffile}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{longtable}
\usepackage{graphicx}
\usepackage{url}
\usepackage{graphics}
\usepackage{titlesec}
\def\UrlBreaks{\do\/\do-}
\usepackage[%
font=small,
labelfont=bf,
figurewithin=section,
tablewithin=section,
tableposition=top
]{caption}
\numberwithin{equation}{section}
\makeatletter
\def\env@matrix{\hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
\array{*\c@MaxMatrixCols l}}
\makeatother
\begin{document}
\input{title.tex}
\tableofcontents
\clearpage
\addtocontents{toc}{Chapter One}\input{Introduction.tex}
\end{document}
article
does not have a\chapter
command. If you need chapters, usereport
orbook
instead. Is there some reason for you to usearticle
rather thanreport
orbook
?article
is not really appropriate for a thesis - it is intended for, well, articles. – cfr Sep 19 '14 at 20:49amsbook
so I would probably suggestbook
. (I only used the AMS version because I used stuff I got from graduate students in the maths department. I would have usedbook
otherwise.) – cfr Sep 19 '14 at 20:53