WARNING: This is a saved old version of the thesis format, as of 21-Dec-2005. Please refer to the newest version HERE.

LaTeX template for computer science theses at Dalhousie

The LaTeX template for CS thesis is based on version 2.2 of the thesis template for theses in Mathematics. The math template was developed by Clyde Clements and Steven Matheson. The basic usage of the CS template is the same as for the math one. See instructions at www.mscs.dal.ca/~clyde/dalthesis or the basic simple.tex starter file to get started and for the regular bells and whistles.

Declare your supervisor with a \supervisor{} statement and each reader with a \reader{} statement. If you have co-supervisors, declare each of them with a separate \supervisor{} statement and the template will designate them as co-supervisors.

The basic template allows you to not print out the front pages if you include a \nofront command in your file. You can omit specific parts with the /notitlepage, \nosignaturepage, \nopermissionpage \nodedicationpage, \notableofcontents, \nolistoftables, \nolistoffigures, or \nobib commands. You can also declare a "draft" version of the thesis with the \draft command.

We have added some tags to the CS thesis template to identify a CS degree:

Use one of these designations before your \frontmatter call and it will define the appropriate abbreviations for your thesis.

The CS thesis file relies on some additional style files. All of them should be available on the CS systems shortly. Until then, place copies of the files in the directory with your thesis on UNIX systems as a UNIX "install". If you are using LaTeX on your local system, you may need to install the style files there.

Basic files needed are:

Simple.tex (pdf) is a sample basic thesis (you also need its bibliography file simple.bib).

The rest of this page provides information on including different features in your thesis like a glossary, tables, or figures. They are all presented as changes to simple.tex. Taking a UNIX "diff" between simple.tex and the example will show you the items that change to use the given feature. The set of all example files is available as one tar file or one zip file that includes a makefile on how to convert each one into a dvi file.

There is also a more complicated example (tar file or zip file) (pdf)as a tar file that includes all of the features mentioned below. It also divides the thesis into several smaller files where you shouldn't have to change much in the root file. When creating a thesis, I recommend that you organize parts of your thesis as smaller files...don't write the whole thing in one big file!


The Faculty of Graduate Studies has approved the format in this template. The checking is against their thesis regulations as of February 25, 2005. No matter what, students are responsible for ensuring that their final thesis conforms to the FGS regulations, especially since LaTeX will often let the author override some aspect of the template within their own text.

This template is provided as an example of something that FGS will accept. Students are welcome to make their thesis look as they want, whether by using their own template or by modifying this one. Always have your thesis format checked by FGS before trying to submit the final copy of your thesis.

Examples of parts to a thesis


This example uses two sub-packages: graphicx and subfigure. graphicx is a standard package that gives you everything you need for figures. The subfigure package is used here to place more than one picture (each with their own caption) within one figure.

Diff with "simple.tex" (< means a line was removed, > means that a line was added):

%diff simple.tex  simple.figures.tex 
> %Figures -- these packages let you do some extra things with figures.
> \usepackage[dvips]{graphicx}
> \usepackage{subfigure}
< \nolistoffigures
> Every dissertation should consider having nice figures like Figure~\ref{fig-steiner_growth}.
> \begin{figure}
>   \centering
>      {\includegraphics[height = 3.0 in]{samplefig}}
>   \caption{\label{fig-steiner_growth} Growth patterns for Steiner
>     graph versus original lattice. Note the logarithmic scale.}
> \end{figure}
> Sometimes it is useful to group figures together. 
> Figure~\ref{fig-partial_compare} is an example of using the subfigure style.
> \begin{figure}
>   \centering
>   \subfigure[Caption A]{\includegraphics[width = 2.75 in]{samplefig}}\qquad
>   \subfigure[Caption B]{\includegraphics[width = 2.75 in]{samplefig}}\qquad
>   \subfigure[Caption C]{\includegraphics[width = 2.75 in]{samplefig}}\qquad
>   \subfigure[Caption D]{\includegraphics[width = 2.75 in]{samplefig}}
>   \caption{\label{fig-partial_compare}Relative weight reduction for the
>   schedule trees produced on subsets of size (a) 10\% (b) 25\% (c)
>   50\% (d) 75\%. The baseline in this case is chosen as the
>   smaller of (i) a sort of the raw data set for each view or (ii)
>   computation of the full cube.}
> \end{figure}


Tables have native support in LaTeX. This one uses a tabular inner environment to give a pretty layout to the data.

Diff with "simple.tex" (< means a line was removed, > means that a line was added):

%diff simple.tex  simple.tables.tex 
< \nolistoftables
> Tables are native to LaTeX.  Table~\ref{tab-steiner_growth} shows a
> tabular environment within a table.
> \begin{table}[tbh]
> \centering
> \begin{tabular}{|r|r|r|r|r|}
>     \hline
>     Dimensions & Lattice Nodes & Lattice Edges & Steiner Nodes & Steiner Edges \\
>     \hline \hline
>     3 & 8 & 12 & 16 & 117 \\
>     \hline
>     4 & 16 & 32 & 65 & 1948 \\
>     \hline
> \end{tabular}
>  \caption{\label{tab-steiner_growth}Growth patterns for Steiner
>     graph versus original lattice in tabular form. }
> \end{table}


This example uses two sub-packages: algorithm and algorithmic. There are other algorithm packages that exist that you might consider too. The algorithms don't appear in any table of contents unless you enclose them in a figure environment.

Diff with "simple.tex" (< means a line was removed, > means that a line was added):

%diff simple.tex  simple.algorithm.tex 
> % Algorithms
> \usepackage{algorithmic}
> \usepackage{algorithm}
> \begin{algorithm}
>  \caption{Add Non Essential Views}
>  \label{alg-add_non_essential_views}
>  \begin{algorithmic}[1]
>     \INPUT A tree $E$ consisting of the selected group-bys, and a
>     guiding graph $G$. Also used are auxiliary variables $BP$
>     (best plan) and $CP$ (current plan).
>     \OUTPUT Reduced tree $R$.
>     \COMMENT{Add nodes from $G - R$ to $E$ as long as the total
>     cost improves}
>     \REPEAT
>         \STATE clear $BP$
>         \FOR{every $v \: in \: G - R$}
>             \STATE clear $CP$
>             \STATE $CP.node = v$
>             \STATE {\sf FindBestParent(R, CP)}
>             \STATE {\sf FindBestChildren(R, CP)}
>             \IF{ {\em CP.benefit\/} $>$ {\em BP.benefit\/} }
>                 \STATE $BP = CP$
>             \ENDIF
>         \ENDFOR
>         \IF{ {\em BP.benefit\/} $> 0$}
>             \STATE add $BP.node$ to $R$ and update $R$ accordingly
>         \ENDIF
>     \UNTIL{ {\em BP.benefit\/} $<= 0$}
>  \end{algorithmic}
> \end{algorithm}


This example defines one theorem in the file. It uses the "theorem" style package as well as a home-grown proof environment provided by Norbert Zeh.

Diff with "simple.tex" (< means a line was removed, > means that a line was added):

diff simple.tex simple.theorem.tex
> %Theorem
> \usepackage{nzproof,theorem}
> \newtheorem{theorem}{Theorem}
> \newtheorem{proposition}{Proposition}
> \newtheorem{lemma}{Lemma}
> \newtheorem{definition}{Definition}
> \newtheorem{observation}{Observation}
> \newtheorem{corollary}{Corollary}
> \newtheorem{problem}{Problem}
> Theorem~\ref{theorem-greatest} is a sample theorem.  You could equally well
> make it a lemma, definition, proposition, observation, corollary, or problem.
> \begin{theorem}
>     \label{theorem-greatest}
>     This is the greatest theorem!
> \end{theorem}
> \begin{pf}
>     Trivial. Just admire it obvious correctness!  Sometimes you just have to 
>     make things short enough that people believe the result right away.
>     Then there are other times like this one where you're waiving your hands 
>     wildly and hoping that nobody notices...but they always do.
>     Ending here, if I leave a blank line before the endproof line then the 
>     box appears on a separate line.  If I leave no line, like now, the box 
>     comes at the end of this line.
> \end{pf}
> Or, you can do a proof sketch:
> \begin{ps}
>     Just waive your hands around and make it look convincing.
> \end{ps}
> Another alternative is to give a label to your proof, which can also be
> done to proof sketches:
> \begin{pf}[Theorem~\ref{theorem-greatest}]
> This is a delated proof to a result stated earlier in the text.
> \end{pf}


This example creates a glossary. You need to run the makeindex (or makeidx) program to generate the glossary. The command is a bit more involved. For a file called foo, issue

  makeindex -s foo.ist -o foo.gls foo.glo
after having run LaTeX once on the file.

In a thesis, the location of the glossary is dictated by the Faculty of Graduate Studies: between the absctract and the acknowledgements.

Diff with "simple.tex" (< means a line was removed, > means that a line was added):

% diff simple.tex simple.glossary.tex
< \documentclass[12pt]{dalcsthesis}
> \documentclass[12pt,glossary]{dalcsthesis}
< \end{abstract}
< \begin{acknowledgements}
> \end{abstract}
> \printglossary
> \begin{acknowledgements} 
< preparation,
< methodology,
< forethought,
> preparation\glossary{name={Preparation},description={Getting ready to do something}},
> methodology\glossary{name={Methodoloty},description={The way to do something methodically}},
> forethought\glossary{name={Forethought},description={Thinking ahead}},
< analysis
> analysis\glossary{name={Analysis},description={Looking back at what you did to see what did or didn't work}}
> Once you latex once, you must issue the command \\
> ``makeindex -s simple.glossary.ist -o simple.glossary.gls simple.glossary.glo''
> \\to create the actual glossary and then re-latex the document.

Page Margins

As Clyde Clements mentions in the math version of the thesis template, you may print the thesis generated by this template and get incorrect margins. Known reasons are

Once the DVI file is generated, this template is no longer in control. The version that was approved by graduate studies was generated to a postscript file and then printed directly to a printer with the lpr command.

The easiest way to tell if your margins are correct after printing is to measure where the page number appears at the bottom of a page. The template is designed to print it between 0.5 inches and 0.75 inches from the bottom of the page. If the margin is bigger than that then your method of printing the dvi file has shrunk the margins.

Random (but still important) thesis information


The CS template arose out of the efforts of many people. Particular thanks go to the following contributors:

Update history

Updated: July 1, 2005