# Examples of the use of eethesis.cls

## Page-styles

Page-styles are the basic definitions of page layout. With page-styles, you can pretty much do anything you want (though it will not always look good!), switching between styles at any point in your documents.

LaTeX has a number of styles already defined, including:

• empty – no page number, header or footer
• plain – a centred page number, but no header or footer

eethesis defines some more:

• romanpage – a page number is placed at the bottom right-corner, in roman-numerals. There is no header or footer
• generalpage – a page number is placed at the bottom right-corner, in (normal) arabic-numerals. There is no header or footer
• headedpage – a page number is placed at the bottom right-corner, in arabic-numerals. There is a simple header (the user can define the contents) but no footer
• eeplain – a centred page number, but no header or footer (i.e. the same as plain)

eeplain exists so that the plain style can be redefined as empty or romanpage, depending on whether the front-matter is listed. This is needed particularly when the table of contents etc. run over multiple pages, due to how the respective commands are defined.

generalpage (default) or headedpage are for the main text, whilst front- and back-matter can be either empty or romanpage (independent of each other). eeplain is in case someone really wants plain: under NO circumstances should the user attempt to use plain, as we redefine it internally as required.

## Thesis Class Options

There are many options available to override the formatting of documents created using eethesis.cls. These are explained below. More information may also be found in the documentation for eethesis.cls (see the downloads page).

### Formatting Rules

• optimal – this is the default setting and takes the requirements of the University of Birmingham and modifies them according to our own preconceptions so that the document "looks good"(!)
• strict – this is our attempt at applying the requirements exactly. It should be noted that this is only our understanding of the requirements and not endorsed by the University in any way: use this at your own risk! :-)

The main differences are summarised in the following table.

Optimal Strict
Paragraphs separated by vertical space Paragraphs not separated by vertical space
Paragraphs are not indented Paragraphs are indented

The differences are very small and are really a question of personal preference. There are methods of achieving a mixture of the two styles – e.g., the noindent option (see later).

### Line Spacing

There are four options here:

1. optimalline – this is the default for both strict and optimal and is set at 1.3 times normal spacing;
2. double – this is twice the normal spacing;
3. single – this is ‘normal’ spacing – not so hot for embedding equations;
4. linehalf – this is the ‘minimum’ spacing of 1.5 often specified by those who have no passion for typography.

### Type of Formatting

There are three options in this category: phdthesis, fypreport and progressreport. phdthesis is for any thesis. fypreport is intended for dissertation-level reports (e.g. Final Reports of Final Year Projects), although it is appropriate for other reports during projects. progressreport is for the progress reports required at different stages throughout a Ph.D. or project.

The main differences are the layout of title-page and inclusion of front-matter. NOTE: one of these options MUST be specified in the \documentclass declaration or an error will be generated.

### Front- and Back-matter

There are two areas in which the front-matter (i.e. text such as abstracts and listings like the contents) can be controlled. The first, listfrontmatter, allows textual front-matter (e.g. abstract, dedication, acknowledgements) appear in the table of contents, should you so desire it.

The other area determines whether listings such as the contents actually appear in the document. The options are:

hidetitle, hidetoc, hidelof and hidelot remove the title-page, ‘Contents’, ‘List of Figures’ and ‘List of Tables’ respectively from the document, whilst showlol includes the ‘List of Listings’. They are all independent of each other. These are provided for draft versions or for reports where a type of object (e.g. figures) may not be used. Obviously, if you use figures, tables, etc., the final document should include corresponding listings, in addition to the title-page and contents.

The back-matter is much simpler – there is only one option, listbackmatter, which determines whether the back-matter is listed in the contents.

There are also some commands relating to the front- and back-matter (see later).

### Compilation

There are two options in this category:

preview is intended for whilst the document is being written and is therefore faster than finalbuild. It achieves this by removing the front-matter completely, optimising graphics inclusion for speed and changing the formatting of various parts of the document. It is expected that this option will be used for proof-reading during the early stages only.

### Miscellaneous

• footnoteline – this places a line above any footnotes on the page;
• footnotenumbers – this changes the numbering of footnotes from a set of symbols to superscript numbers;
• footnotesperpage – this resets the footnote counter after every chapter instead of every page;
• noindent – this means the start of paragraphs are not indented, even in strict mode;
• nopackages – this prevents the inclusions of the ‘convenience’ packages, such as the AMS packages; and changes the mode of custom_shortcuts.

## Commands and Environments

### Title Page Commands

It was decided that, in the hope that this may be found useful to more people, we would parameterise as much as possible within the code, so that control of certain aspects of the document could be ‘safely’ passed to users (i.e. they would not need to modify the class file in any way). Some of the font selection and formatting was dealt with in this manner. The other main area was the information to be used on the title page, which is dealt with here. All of the commands listed below should appear in the preamble (i.e. before \begin{document}) of your document if used. These commands supplement the standard \author{}, \title{} and \date{} commands.

Any of these items can be removed by including the appropriate command in the preamble, or in my_formatting, with no contents (e.g. \reporttype{}), if they are not required.

### Front- and Back-matter Commands

The front-matter commands are:

The \changeeeXXXname commands are best used in my_formatting.

The back-matter commands are:

• \eethesisbackmatter – this tells eethesis that the back-matter has started (required so that the page-style can be properly formatted);
• \extrabackmatter{heading} – this command can be used as many times as required, in order to insert other things (e.g., a list of mathematical symbols used) into the back-matter, in a similar manner to the \chapter{} command i.e., followed by the required text (note the difference with \extrafrontmatter{}{} command);
• \eethesisbib{your commands} – this command allows the user to control the name of the Bibliography and is required for compatibility purposes with babel; it is reflected in how it is listed in the Contents, when used with the listbackmatter option;
• \changeeebibname{new heading} – this allows the author to change the heading of the Bibliography (e.g. to ‘References’).

\changeeebibname{} is compatible with the listbackmatter option (i.e. the change in name will appear in the table of contents, if so desired).

Most of the text must come within the following environment:

\begin{document}
...
\end{document}

However, the title, author and date (if required) for the titlepage must be set in the preamble (unless set globally in my_formatting), i.e. between:

\documentclass[phdthesis,strict]{eethesis}
...
% preamble
...
\begin{document}

The same is true for the additional frontmatter sections (i.e. abstract, acknowledgements, dedication and sections introduced with the \extrafrontmatter command). The skeleton.tex file gives an example of this.

The end of the main document will look similar to this:

% Main document
...
% Start back-matter
\eethesisbackmatter
\extrabackmatter{List of Symbols}
% Symbols listed and formatted as user desires
...
% Bibliography -- BibTeX version
\eethesisbib{\bibliography{myBibFile}}
\end{document}

If you do not use BibTeX, preferring to use the LaTeX environment thebibliography directly, the end looks like this:

...
% Bibliography -- non-BibTeX version
\eethesisbib{%
\begin{thebibliography}
% Some \bibitem entries
...
\end{thebibliography}} % Note second '}'
\end{document}

### Miscellaneous Commands

The eethesis class also defines a command to ensure compatibility with the chappg package. This package allows pages to be numbered by chapter. The command, \thesisuseschappg, must be included after inclusion of the chappg package. The authors suggest the use of my_formatting for this task.

This raises another issue; namely, the use of \part{} divisions. Though the division of a thesis into parts may be rare, this is possible; the design decision with eethsis is that parts are normally included in the table of contents and the pages numbered sequentially. However, if chppg is used, no page number is given, though the part name still appears in the TOC. To achieve this behaviour, the command \eeaddcontentsline{ext}{type}{text} has been defined; it behaves like the standard \addcontentsline{ext}{type}{text} but hides the page number in the TOC listing.

Also included in my_formatting are the commands, provided by eethesis, that allow the user to customise the fonts etc. used in the document. This includes the fonts used in the listings (contents, etc. ). It is our strongest recommendation that they are only used from within my_formatting. See later and my_formatting for more information.

### A Simple Environment for Chapter-Quotations

Some people like the idea of including pretentious or pithy quotations at the start of each chapter of their document. Although there are already packages available for this task (e.g. epigraph), for various reasons we decided to create a new environment.

The usage is as follows:

\begin{chapterquote}{Author}
The actual quotation goes here.
\end{chapterquote}

A simple example would be:

\chapter{How to Write Good Code\label{chpGoodCode}}
\begin{chapterquote}{Donald Knuth}
Beware of the above code, I have only proved that it works, not tested it.
\end{chapterquote}

## The custom_shortcuts Package

### Overview and Options

custom_shortcuts has an interesting relationship with eethesis. In some cases, custom_shortcuts depends on eethesis; in others, it is the opposite way around. For example, eethesis uses some abbreviations declared in custom_shortcuts, whilst some macros defined in custom_shortcuts are dependent on packages (the AMS packages, plus latexsym, mathrsfs and mathscinet) that may or may not be included in eethesis.

This relationship resulted in a set of options to control the mode of operation of custom_shortcuts. The default is eethesis, which means that all macros are defined assuming normal (i.e. our default) use with eethesis. The second is standalone, which assumes the user is not using eethesis and therefore includes the relevant packages it expects from eethesis. The final option is noams, which assumes the AMS packages (i.e., all those listed above) are not loaded and therefore defines some commands differently.

### Cross-referencing Commands

LaTeX contains powerful cross-referencing facilities for within documents, using the \label, \ref and \pageref commands. \label{tag} marks an ‘object’ (e.g. figure or section of the document) with the label ‘tag’, \ref{tag} returns the number corresponding to ‘tag’ and \pageref{tag} returns the page number corresponding to ‘tag’. We have grouped together commands that make use of the \ref command to produce preformatted references for the various objects within a document that may be referenced.

All multiple cross-referencing commands (i.e. those prefixed with m) also have an optional argument for modifying the separating characters. So, for example, we could use \meqnref[--]{eqnRef1}{eqnRef5} or even \meqnref[ and ]{eqnRef1}{eqnRef2} to refer to lists of equations.

### Useful Abbreviations

Abbreviations sometimes have rules as to their appearance, e.g. the spacing following 'e.g.' is not a double space that would follow the full-stop at the end of a sentence.

• \beng – B.Eng. for Bachelor of Engineering;
• \meng – M.Eng. for Master of Engineering;
• \msc – M.Sc. for Master of Science;
• \mphil – M.Phil. for Master of Philosophy;
• \phd – Ph.D. for Doctor of Philosophy.
• \ie – i.e. for any document;
• \eg – e.g. for any document;
• \nb – N.B. for any document;
• \etc – etc. for any document;
• \ca – ca. for any document referring to dates (e.g. ‘ca. 1900’);
• \cf – cf. for the bibliography/references section of any document (‘compare’);
• \etal – et al. for the bibliography/references section of any document (‘and others’);
• \opcit – op. cit. for the bibliography/references section of any document (‘in the work previously quoted’);
• \ibid – ibid. for the bibliography/references section of any document (‘in the same place as the previous reference’);
• \typ – typ. (typically) for any technical document.

### Technical Macros

These are mainly Mathematical, but also include notations common in Electronic Engineering.

Miscellaneous shortcuts and macros are:

• \hydrogen – for type-setting 1H;
• \carbon – for type-setting 13C;
• \keyword – for quickly type-setting keywords;
• \url – for quickly type-setting web addresses;
• \invivo – the Latin in vivo;
• \invitro – the Latin in vitro;
• \latin{} – for type-setting Latin;
• \tblhead{} – for type-setting row and/or column headers in tables (defaults to slanted in current font, plus additional space below line);
• \replaceme{} – for marking-up text for revision in future drafts.

It should be noted that a subset of the mathematical abbreviations and commands can only be used in math-mode, mainly as they are of no use on their own, requiring mathematical expressions to make any sense. These include the vector product commands, the conjugate commands, the differential commands and the logic and set theory commands (except for the \logic{} macro). The units, other maths. macros, Big-O notation and miscellaneous items can be used in any mode. In addition, the following commands will differ in result depending on the mode of operation (i.e. whether the AMS packages are used, which is the case for this documentation): the sets of numbers; the real and imaginary operators; the trig. operators; the Fourier, Laplace and Expectation operators; and the \vect{}, \vr{} and \mx{} commands. For more information, see the eethesis documentation.

## Using my_formatting

The my_formatting file is specific to this class. It provides a means to change the formatting, without putting messy preamble in your beautiful context-only document. Some of this formatting can be changed by modifying commands provided by us; other changes may be achieved by the inclusion of other packages (check the list of incompatible packages first). Some packages will provide extra commands for use in the document proper; others have a wider effect on the document format and so any commands used should also (in general) be placed in my_formatting.

The main purpose of my_formatting is to allow the user to change the fonts from the defaults provided by eethesis.cls, thus removing the need for modification of the class by users. Commands are also provided to over-ride the names of the various listings (e.g. change ‘Table of Contents’ to ‘Contents’, or ‘Bibliography’ to ‘References’). There are also commands related to adding a header to the page style (in general, this requires insertion of a command into the main document – see the notes in my_formatting for more details).

To use this package you just need to create the file my_formatting.sty in a place where LaTeX can see it (e.g. your project directory). Our example version comes with the distributions available from this site.

It should also be noted that the order of font-changing commands may be important. It is probably best just to copy the example given here and un-comment and change the lines that apply. See the downloads and links pages for other sources of information on fonts in LaTeX.

### An example: changing the style of chapter headings

In the my_formatting.sty file, the commands are all commented and show the default. For chapter headings, this is:

%\renewcommand{\chaptertitlefont}[1]{\centering\sffamily\bfseries\LARGE\MakeTextUppercase{#1}}

So, if you wanted the chapter headers huge, right-justified and in italic roman characters without making them upper-case, the line in my_formatting will become:

\renewcommand{\chaptertitlefont}[1]{\raggedleft\rmfamily\itshape\Huge #1}

### my_formatting and chappg

Additional packages may be included in my_formatting for use in the document. It is suggested that my_formatting may act as a central location for including extra packages, keeping the main document uncluttered.

One package that is given as an example is chappg. This package allows the page-numbering to be re-set at the start of each chapter. The inclusion of the package and use of relevant commands can be found in my_formatting. It should be noted that chappg is slightly unusual, in that eethesis defines a command that must be used to ensure compatibility.

Robert Foster and Greg Reynolds. We are not responsible for the content of external pages. There is no warranty for any file that may be downloaded from this page. Last updated 2007/11/04.