I have prepared a cover page and the first chapter of my dissertation. Both of these are in different tex files.
I read that in order to have everything in a master file you need to use the include command. It does not work for me so far.
Here is the minimal example.
% cover_page.tex
\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%
%%%%%%%%%%%%%%%%%%%%%% TITLE, AUTHOR FOLLOWS %%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{\textbf{{\huge Proposal}} \\[8pt] Essays on ...}
\author{by Me}
\date{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT BEGINS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\maketitle
\thispagestyle{empty} % no number in the first page
\vspace{3cm}
\begin{center}
Advisor:
\end{center}
\vspace{2.5cm}
\begin{minipage}[c]{14.5cm}
\centering Proposal
\end{minipage}
\vspace{3cm}
\begin{minipage}[c]{14.5cm}
\centering Department \\
University \\
\end{minipage}
\vspace{2.5cm}
\begin{center}
\date{A month}
\end{center}
\newpage
\thispagestyle{empty}
\begin{center}
\begin{tabular}{lllll}
Advisor & \hspace{2cm} & \hspace{1cm} & Me & \hspace{2cm} \\[25pt]
\cline{1-2}\cline{4-5}
\textit{Signature} & & & \textit{Signature} & \\[25pt]
\cline{1-2}\cline{4-5}
\textit{Date} & & & \textit{Date} & \\
\end{tabular}
\end{center}
\end{document}
Now let us move on chapter_1.tex
\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\title{My title}
\author{PSK}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT BEGINS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\maketitle
\thispagestyle{empty} % no number in the first page
\newpage
Some stuff here
\end{document}
And last, but not least the master file:
\documentclass{article}
\begin{document}
\include{cover_page.tex}
\include{chapter_1.tex}
\end{document}
\includeand\inputjust take the content of the.texfile being\included or\inputand more or less put it on that line of the master.texfile, so you should not be repeating things like\documentclass,\title,\author, etc.. – Adam Liter Apr 03 '14 at 02:03preamble. Sub files should have only the content (at present the content within your\begin{document}and\end{documentin the sub files). – Apr 03 '14 at 02:15\includeing should not have\documentclass,\usepackage,\title,\author,\date,\begin{document}, or\end{document}. They should only have content. – Adam Liter Apr 03 '14 at 02:18include{file.tex}, but rather\include{file}+ what it was mentioned before. Thank you so much. – Pantelis Kazakis Apr 03 '14 at 02:42