# webdestroya/thesis

Fetching contributors…
Cannot retrieve contributors at this time
308 lines (179 sloc) 28.4 KB
 % Chapter 1 \chapter{Chapter Title Here} % Write in your own chapter title \section{Welcome and Thank You} Welcome to this \LaTeX{} Thesis Template'', a beautiful and easy to use template for writing a thesis using the \LaTeX{} typesetting system. If you are writing a thesis (or will be in the future) and its subject is technical or mathematical (though it doesn't have to be), then creating it in \LaTeX{} is highly recommended as a way to make sure you can just get down to the essential writing without having to worry over formatting or wasting time arguing with your word processor. \LaTeX{} is easily able to professionally typeset documents that run to hundreds or thousands of pages long. With simple mark-up commands, it automatically sets out the table of contents, margins, page headers and footers and keeps the formatting consistent and beautiful. One of its main strengths is the way it can easily typeset mathematics, even \emph{heavy} mathematics. Even if those equations are the most horribly twisted and most difficult mathematical problems that can only be solved on a super-computer, you can at least count on \LaTeX{} to make them look stunning. \subsection{Examples of \LaTeX{} Typeset eBooks} You can see (and download and read) examples of eBooks typeset by \LaTeX{} in a small library here:\\ \href{http://www.sunilpatel.co.uk/typesetting.html}{\texttt{http://www.sunilpatel.co.uk/typesetting.html}} The books are available for you to download for free. They were originally plain text files but were quickly and easily converted into beautifully typeset and well presented eBooks through \LaTeX{} for you to enjoy. \section{Learning \LaTeX{}} \LaTeX{} is not a WYSIWYG (What You See is What You Get) program, unlike word processors such as Microsoft Word or Corel WordPerfect. Instead, a document written for \LaTeX{} is actually a simple, plain text file that contains \emph{no formatting}. You tell \LaTeX{} how you want the formatting in the finished document by writing in simple commands amongst the text, for example, if I want to use \emph{italic text for emphasis}, I write the $\backslash$\texttt{emph}\{\}' command and put the text I want in italics in between the curly braces. This means that \LaTeX{} is a mark-up'' language, very much like HTML. \subsection{A (not so short) Introduction to \LaTeX{}} If you are new to \LaTeX{}, there is a very good eBook -- freely available online as a PDF file -- called, The Not So Short Introduction to \LaTeX{}''. The book's title is typically shortened to just lshort''. You can download the latest version (as it is occasionally updated) from here:\\ \href{http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf}{\texttt{http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf}} It is also available in several other languages. Find yours from the list on this page:\\ \href{http://www.ctan.org/tex-archive/info/lshort/}{\texttt{http://www.ctan.org/tex-archive/info/lshort/}} It is recommended to take a little time out to learn how to use \LaTeX{} by creating several, small test' documents. Making the effort now means you're not stuck learning the system when what you \emph{really} need to be doing is writing your thesis. \subsection{A Short Math Guide for \LaTeX{}} If you are writing a technical or mathematical thesis, then you may want to read the document by the AMS (American Mathematical Society) called, A Short Math Guide for \LaTeX{}''. It can be found online here:\\ \href{http://www.ams.org/tex/amslatex.html}{\texttt{http://www.ams.org/tex/amslatex.html}}\\ under the Additional Documentation'' section towards the bottom of the page. \subsection{Common \LaTeX{} Math Symbols} There are a multitude of mathematical symbols available for \LaTeX{} and it would take a great effort to learn the commands for them all. The most common ones you are likely to use are shown on this page:\\ \href{http://www.sunilpatel.co.uk/latexsymbols.html}{\texttt{http://www.sunilpatel.co.uk/latexsymbols.html}} You can use this page as a reference or crib sheet, the symbols are rendered as large, high quality images so you can quickly find the \LaTeX{} command for the symbol you need. \subsection{\LaTeX{} on a Mac} The \LaTeX{} package is available for many systems including Windows, Linux and Mac OS X. The package for OS X is called MacTeXÓ and it contains all the applications you need Ð bundled together and pre-customised Ð for a fully working \LaTeX{} environment and workßow. MacTeX includes a dedicated \LaTeX{} IDE (Integrated Development Environment) called TeXShop'' for writing your \texttt{.tex}' files and BibDesk'': a program to manage your references and create your bibliography section just as easily as managing songs and creating playlists in iTunes. To learn more about using \LaTeX{} on the Mac system, read the guide at:\\ \href{http://www.sunilpatel.co.uk/texhelp.html}{\texttt{http://www.sunilpatel.co.uk/texhelp.html }} \section{Getting Started with this Template} If you are familiar with \LaTeX{}, then you can familiarise yourself with the contents of the \href{http://www.sunilpatel.co.uk/files/Thesis\%20Template.zip}{Zip file} and the directory structure and then place your own information into the \texttt{Thesis.cls}' file. Section \ref{FillingFile} on page \pageref{FillingFile} tells you how to do this. Make sure you read section \ref{ThesisConventions} about thesis conventions to get the most out of this template and then get started with the \texttt{Thesis.tex}' file straightaway. If you are new to \LaTeX{} it is recommended that you carry on reading through the rest of the information in this document. \subsection{Latest Version} This thesis template you have downloaded is version 1.2 and you can always find the latest version of this template online at:\\ \href{http://www.sunilpatel.co.uk/thesistemplate.html}{\texttt{http://www.sunilpatel.co.uk/thesistemplate.html}} \subsection{List of Changes} \subsubsection*{Version 1.2 (March 2008)} This is version 1.2 and contains more corrections, improved advice on figures, an additional section for users on Mac systems and a major correction for those wishing to use US Letter sized paper for their thesis. \subsubsection*{Version 1.1.2 (August 2007)} This is version 1.1.2 and contains trivial (language and spelling) corrections. \subsubsection*{Version 1.1.1 (May 2007)} This is version 1.1.1 and corrects (updates) several hyperlinks that have changed. The file \texttt{lstpatch.sty}'' is also included as some \TeX{} distributions do not include it. \subsubsection*{Version 1.1 (April 2007)} This is version 1.1, released shortly after 1.0. It contains \emph{lots} of general text corrections (spelling, punctuation and grammar) and includes a link to a page containing a list of common \LaTeX{} math symbols, available at:\\ \href{http://www.sunilpatel.co.uk/latexsymbols.html}{\texttt{http://www.sunilpatel.co.uk/latexsymbols.html}} \subsubsection*{Version 1.0 (March 2007)} This is the first version, released to the public in March 2007. \subsection{About this Template} This \LaTeX{} Thesis Template is originally based and created around a \LaTeX{} style file created by Steve R.\ Gunn from the University of Southampton (UK), department of Electronics and Computer Science. You can find his original thesis style file at his site, here:\\ \href{http://www.ecs.soton.ac.uk/~srg/softwaretools/document/templates/}{\texttt{http://www.ecs.soton.ac.uk/$\sim$srg/softwaretools/document/templates/}} My thesis originally used the \texttt{ecsthesis.cls}' from his list of styles. However, I knew \LaTeX{} could still format better. To get the look I wanted, I modified his style and also created a skeleton framework and folder structure to place the thesis files in. This Thesis Template consists of that modified style, the framework and the folder structure. All the work that has gone into the preparation and groundwork means that all you have to bother about is the writing. Some of the modifications made to the original template include: \begin{itemize} \item Addition of the, Declaration of Authorship' page \item Optimised page layout for one-sided printing \item Better page headers (changed from the default headers) \item Full bibliography information (with \texttt{natbib}' and \texttt{unsrtnat}') that numerically sorts and compresses multiple references and also includes the URL field (with an active link) and DOI information if supplied \item Change of font size and line spacing to increase readability \item Added, List of Symbols' page \item Added, funny quote' page \end{itemize} Before you begin using this template you should ensure that its style complies with the thesis style guidelines imposed by your institution. As this template is based on the style for the University of Southampton (UK), it can definitely be used without modification for Southampton PhD theses. In most cases this template style and layout will be suitable. If it is not, it may only require a small change to bring the template in line with your institution's recommendations. \section{What this Template Includes} \subsection{Folders} This template comes as a single \href{http://www.sunilpatel.co.uk/files/Thesis\%20Template.zip}{Zip file} that expands out to many files and folders. The folder names are mostly self-explanatory: \textbf{Appendices} -- this is the folder where you put the appendices. Each appendix should go into its own separate \texttt{.tex}' file. \textbf{Chapters} -- this is the folder where you put the thesis chapters. A thesis usually has about seven chapters, though there is no hard rule on this. Each chapter should go in its own separate \texttt{.tex}' file and they usually are split as: \begin{itemize} \item Chapter 1: Introduction to the thesis topic \item Chapter 2: Background information and theory \item Chapter 3: (Laboratory) experimental setup \item Chapter 4: Details of experiment 1 \item Chapter 5: Details of experiment 2 \item Chapter 6: Discussion of the experimental results \item Chapter 7: Conclusion and future directions \end{itemize} This chapter layout is specialised for the experimental sciences. \textbf{Figures} -- this folder contains the all figures for the thesis. These are the final images that will go into the thesis document. \textbf{Primitives} -- this is the folder that contains scraps, particularly because one final image in the Figures' folder may be made from many separate images and photos, these source images go here. This keeps the intermediate files separate from the final thesis figures. \subsection{Files} Included are also several files, most of them are plain text and you can see their contents in a text editor. Luckily, many of them are auxiliary files created by \LaTeX{} or BibTeX and which you don't need to bother about: \textbf{Bibliography.bib} -- this is an important file that contains all the bibliographic information and references that you will be citing in the thesis for use with BibTeX. You can write it manually, but there are reference manager programs available that will create and manage it for you. Bibliographies in \LaTeX{} are a large subject and you may need to read about BibTeX before starting with this. \textbf{Thesis Todo List.txt} -- this is a Todo list that provides a simple way to track the thesis progress and also helps you see what parts need attention. Inside is a structured layout for you to enter all this information. Do not try to fill it out all at once, but write the tasks in as you come across them i.e.\ write an entry for a figure that needs creating only when you refer to or write about it (and hence need to place it) in the thesis text. \textbf{Thesis.cls} -- this is an important file. It is the style file that tells \LaTeX{} how to format the thesis. You will also need to open this file in a text editor and fill in your own information (such as name, department, institution). Luckily, this is not too difficult and is explained in section \ref{FillingFile} on page \pageref{FillingFile}. \textbf{Thesis.pdf} -- this is your beautifully typeset thesis (in the PDF file format) created by \LaTeX{}. \textbf{Thesis.tex} -- this is an important file. This is the file that you tell \LaTeX{} to compile to produce your thesis as a PDF file. It contains the framework and constructs that tell \LaTeX{} how to layout the thesis. It is heavily commented so you can read exactly what each line of code does and why it is there. After you put your own information into the \texttt{Thesis.cls}' file, go to this file and begin filling it in -- you have now started your thesis! \textbf{vector.sty} -- this is a \LaTeX{} package, it tells \LaTeX{} how to typeset mathematical vectors. Using this package is very easy and you can read the documentation on the site (you just need to look at the \texttt{vector.pdf}' file):\\ \href{http://www.ctan.org/tex-archive/macros/latex/contrib/vector/}{\texttt{http://www.ctan.org/tex-archive/macros/latex/contrib/vector/}} \textbf{lstpatch.sty} -- this is a \LaTeX{} package required by this LaTeX template and is included as not all \TeX{} distributions have it installed by default. You do not need to modify this file. Files that are \emph{not} included, but are created by \LaTeX{} as auxiliary files include: \textbf{Thesis.aux} -- this is an auxiliary file generated by \LaTeX{}, if it is deleted \LaTeX{} simply regenerates it when you run the main \texttt{.tex}' file. \textbf{Thesis.bbl} -- this is an auxiliary file generated by BibTeX, if it is deleted, BibTeX simply regenerates it when you run the main tex file. Whereas the \texttt{.bib}' file contains all the references you have, this \texttt{.bbl}' file contains the references you have actually cited in the thesis and is used to build the bibliography section of the thesis. \textbf{Thesis.blg} -- this is an auxiliary file generated by BibTeX, if it is deleted BibTeX simply regenerates it when you run the main \texttt{.tex}' file. \textbf{Thesis.lof} -- this is an auxiliary file generated by \LaTeX{}, if it is deleted \LaTeX{} simply regenerates it when you run the main \texttt{.tex}' file. It tells \LaTeX{} how to build the List of Figures' section. \textbf{Thesis.log} -- this is an auxiliary file generated by \LaTeX{}, if it is deleted \LaTeX{} simply regenerates it when you run the main \texttt{.tex}' file. It contains messages from \LaTeX{}, if you receive errors and warnings from \LaTeX{}, they will be in this \texttt{.log}' file. \textbf{Thesis.lot} -- this is an auxiliary file generated by \LaTeX{}, if it is deleted \LaTeX{} simply regenerates it when you run the main \texttt{.tex}' file. It tells \LaTeX{} how to build the List of Tables' section. \textbf{Thesis.out} -- this is an auxiliary file generated by \LaTeX{}, if it is deleted \LaTeX{} simply regenerates it when you run the main \texttt{.tex}' file. So from this long list, only the files with the \texttt{.sty}', \texttt{.bib}', \texttt{.cls}' and \texttt{.tex}' extensions are the most important ones. The other auxiliary files can be ignored or deleted as \LaTeX{} and BibTeX will regenerate them. \section{Filling in the \texttt{Thesis.cls}' File}\label{FillingFile} You will need to personalise the thesis template and make it your own by filling in your own information. This is done by editing the \texttt{Thesis.cls}' file in a text editor. Open the file and scroll down, past all the $\backslash$\texttt{newcommand}\ldots' items until you see the entries for \texttt{University Name}', \texttt{Department Name}', etc\ldots. Fill out the information about your group and institution and ensure you keep to block capitals where it asks you to. You can also insert web links, if you do, make sure you use the full URL, including the \texttt{http://}' for this. The last item you should need to fill in is the Faculty Name (in block capitals). When you have done this, save the file and recompile \texttt{Thesis.tex}'. All the information you filled in should now be in the PDF, complete with web links. You can now begin your thesis proper! \section{The \texttt{Thesis.tex}' File Explained} The \texttt{Thesis.tex} file contains the structure of the thesis. There are plenty of written comments that explain what pages, sections and formatting the \LaTeX{} code is creating. Initially there seems to be a lot of \LaTeX{} code, but this is all formatting, and it has all been taken care of so you don't have to do it. Begin by filling out your information for the title page. For the thesis declaration, your institution may insist on something different than the text given. If this is the case, just replace what you see with what is required. Then comes a page which contains a funny quote. You can put your own, or quote your favourite scientist, author, person, etc\ldots Make sure to put the name of the person who you took the quote from. Next comes the acknowledgements. On this page, write about all the people who you wish to thank (not forgetting parents, partners and your advisor/supervisor). The contents pages, list of figures and tables are all taken care of for you and do not need manually creating or editing. The next set of pages are optional and can be deleted since they are for a more technical thesis: Insert a list of abbreviations you have used in the thesis, then a list of the physical constants and numbers you refer to and finally, a list of mathematical symbols used in any formulae. Making the effort to fill these tables means the reader has a one-stop place to refer to instead of searching the internet and references to try and find out what you meant by certain abbreviations or symbols. The list of symbols is split into the Roman and Greek alphabets. Whereas the abbreviations and symbols ought to be listed in alphabetical order (and this is \emph{not} done automatically for you) the list of physical constants should be grouped into similar themes. The next page contains a one line dedication. Who will you dedicate your thesis to? Finally, there is the section where the chapters are included. Uncomment the lines (delete the \texttt{\%}' character) as you write the chapters. Each chapter should be written in its own file and put into the Chapters' folder and named \texttt{Chapter1}', \texttt{Chapter2}, etc\ldots Similarly for the appendices, uncomment the lines as you need them. Each appendix should go into its own file and placed in the Appendices' folder. After the preamble, chapters and appendices finally comes the bibliography. The bibliography style (called \texttt{unsrtnat}') is used for the bibliography and is a fully featured style that will even include links to where the referenced paper can be found online. Do not under estimate how grateful you reader will be to find that a reference to a paper is just a click away. Of course, this relies on you putting the URL information into the BibTeX file in the first place. \section{Thesis Features and Conventions}\label{ThesisConventions} To get the best out of this template, there are a few conventions that you may want to follow. One of the most important (and most difficult) things to keep track of in such a long document as a thesis is consistency. Using certain conventions and ways of doing things (such as using the Todo list) makes the job easier. Of course, all of these are optional and you can adopt your own method. \subsection{Printing Format} This thesis template is designed for single sided printing as most theses are printed and bound this way. This means that the left margin is always wider than the right (for binding). Four out of Þve people will now judge the margins by eye and think, I never noticed that before.''. The headers for the pages contain the page number on the right side (so it is easy to flick through to the page you want) and the chapter name on the left side. The text is set to 11 point and a line spacing of 1.3. Generally, it is much more readable to have a smaller text size and wider gap between the lines than it is to have a larger text size and smaller gap. Again, you can tune the text size and spacing should you want or need to. The text size can be set in the options for the $\backslash$\texttt{documentclass}' command at the top of the \texttt{Thesis.tex}' file and the spacing can be changed by setting a different value in the $\backslash$\texttt{setstretch}' commands (scattered throughout the \texttt{Thesis.tex}' file). \subsection{Using US Letter Paper} The paper size used in the template is A4, which is a common Ð if not standard Ð size in Europe. If you are using this thesis template elsewhere and particularly in the United States, then you may have to change the A4 paper size to the US Letter size. Unfortunately, this is not as simple as replacing instances of \texttt{a4paper}' with \texttt{letterpaper}'. This is because the final PDF file is created directly from the \LaTeX{} source using a program called \texttt{pdfTeX}' and in certain conditions, paper size commands are ignored and all documents are created with the paper size set to the size stated in the configuration file for pdfTeX (called \texttt{pdftex.cfg}'). What needs to be done is to change the paper size in the conÞguration file for \texttt{pdfTeX} to reflect the letter size. There is an excellent tutorial on how to do this here: \\ \href{http://www.physics.wm.edu/~norman/latexhints/pdf_papersize.html}{\texttt{http://www.physics.wm.edu/$\sim$norman/latexhints/pdf\_papersize.html}} It may be sufficient just to replace the dimensions of the A4 paper size with the US Letter size in the \texttt{pdftex.cfg} file. Due to the differences in the paper size, the resulting margins may be different to what you like or require (as it is common for Institutions to dictate certain margin sizes). If this is the case, then the margin sizes can be tweaked by opening up the \texttt{Thesis.cls} file and searching for the line beginning with, $\backslash$\texttt{setmarginsrb}' (not very far down from the top), there you will see the margins speciÞed. Simply change those values to what you need (or what looks good) and save. Now your document should be set up for US Letter paper size with suitable margins. \subsection{References} The \texttt{natbib}' package is used to format the bibliography and inserts references such as this one.\citep{Reference3} The options used in the \texttt{Thesis.tex}' file mean that the references are listed in numerical order as they appear in the text. Multiple references are rearranged in numerical order\citep{Reference2, Reference1} and multiple, sequential references become reformatted to a reference range.\citep{Reference2, Reference1, Reference3} This is done automatically for you. To see how you use references, have a look at the \texttt{Chapter1.tex}' source file. References should come \emph{after} the punctuation mark if there is one (such as a comma or full stop). On the other hand, footnotes\footnote{Such as this footnote, here down at the bottom of the page.} come \emph{before} the punctuation mark. You can swap these around but the most important thing is to keep the convention consistent throughout the thesis. Footnotes themselves should be full, descriptive sentences (beginning with a capital letter and ending with a full stop). To see how \LaTeX{} typesets the bibliography, have a look at the very end of this document (or just click on the reference number links). \subsection{Figures} There will hopefully be many figures in your thesis (that should be placed in the Figures' folder). The way to insert figures into your thesis is to use a code template like this: \begin{verbatim} \begin{figure}[htbp] \centering \includegraphics{./Figures/Electron.pdf} \rule{35em}{0.5pt} \caption[An Electron]{An electron (artist's impression).} \label{fig:Electron} \end{figure} \end{verbatim} Also look in the source file. Putting this code into the source file produces the picture of the electron that you can see in the figure below. Sometimes figures don't always appear where you write them in the source. The placement depends on how much space there is on the page for the figure. Sometimes there is not enough room to fit a figure directly where it should go (in relation to the text) and so \LaTeX{} puts it at the top of the next page. Positioning figures is the job of \LaTeX{} and so you should only worry about making them look good! Figures usually should have labels just in case you need to refer to them (such as in figure \ref{fig:Electron}). The $\backslash$\texttt{caption}' command contains two parts, the first part, inside the square brackets is the title that will appear in the List of Figures', and so should be short. The second part in the curly brackets should contain the longer and more descriptive caption text. The $\backslash$\texttt{rule}' command is optional and simply puts an aesthetic horizontal line below the image. If you do this for one image, do it for all of them. The \LaTeX{} Thesis Template is able to use figures that are either in the PDF or JPEG file format. It is recommended that you read this short guide on how to get the best out of figures in \LaTeX{}, available here:\\ \href{http://www.sunilpatel.co.uk/texhelp5.html}{\texttt{http://www.sunilpatel.co.uk/texhelp5.html}} Though it is geared more towards users of Mac and OS X systems, much of the advice applies to creating and using figures in general. It also explains why the PDF file format is preferred in figures over JPEG. \subsection{Typesetting mathematics} If your thesis is going to contain heavy mathematical content, be sure that \LaTeX{} will make it look beautiful, even though it won't be able to solve the equations for you. The Not So Short Introduction to \LaTeX{}'' (available \href{http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf}{here}) should tell you everything you need to know for most cases of typesetting mathematics. If you need more information, a much more thorough mathematical guide is available from the AMS called, A Short Math Guide to \LaTeX{}'' and can be downloaded from:\\ \href{ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf}{\texttt{ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf}} There are many different \LaTeX{} symbols to remember, luckily you can find the most common symbols \href{http://www.sunilpatel.co.uk/latexsymbols.html}{here}. You can use the web page as a quick reference or crib sheet and because the symbols are grouped and rendered as high quality images (each with a downloadable PDF), finding the symbol you need is quick and easy. You can write an equation, which is automatically given an equation number by \LaTeX{} like this: \begin{verbatim} \begin{equation} E = mc^{2} \label{eqn:Einstein} \end{equation} \end{verbatim} This will produce Einstein's famous energy-matter equivalence equation: \begin{equation} E = mc^{2} \label{eqn:Einstein} \end{equation} All equations you write (which are not in the middle of paragraph text) are automatically given equation numbers by \LaTeX{}. If you don't want a particular equation numbered, just put the command, $\backslash$\texttt{nonumber}' immediately after the equation. \section{Sectioning and Subsectioning} You should break your thesis up into nice, bite-sized sections and subsections. \LaTeX{} automatically builds a table of Contents by looking at all the $\backslash$\texttt{chapter}$\{\}$', $\backslash$\texttt{section}$\{\}$' and $\backslash$\texttt{subsection}$\{\}$' commands you write in the source. The table of Contents should only list the sections to three (3) levels. A $\backslash$\texttt{chapter}$\{\}$' is level one (1). A $\backslash$\texttt{section}$\{\}$' is level two (2) and so a $\backslash$\texttt{subsection}$\{\}$' is level three (3). In your thesis it is likely that you will even use a $\backslash$\texttt{subsubsection}$\{\}$', which is level four (4). Adding all these will create an unnecessarily cluttered table of Contents and so you should use the $\backslash$\texttt{subsubsection$^{*}\{\}$}' command instead (note the asterisk). The asterisk ($^{*}$) tells \LaTeX{} to omit listing the subsubsection in the Contents, keeping it clean and tidy. \section{In Closing} You have reached the end of this mini-guide. You can now rename or overwrite this pdf file and begin writing your own `\texttt{Chapter1.tex}' and the rest of your thesis. The easy work of setting up the structure and framework has been taken care of for you. It's now your job to fill it out! If you use this Thesis template and this mini-guide helps you, please let me know\footnote{Email: \href{mailto:web@sunilpatel.co.uk}{web@sunilpatel.co.uk} all comments and suggestions, questions and errata are welcome.}. Good luck and have lots of fun! \begin{flushright} Sunil Patel: \href{http://www.sunilpatel.co.uk}{www.sunilpatel.co.uk} \end{flushright}