Writing PHD Thesis Using LATEX
Writing PHD Thesis Using LATEX
html
Contents
• Introduction
• Getting Started
• Splitting a Large Document into Several Files
• Excluding Files
• \input and \include
• Generating a Bibliography
• Back-References
• Troubleshooting
• Formatting
• Double Spacing
• Changing the Title Page
• Verbatim Text
• Tabbing
• Theorems and Algorithms
Links to related topics in the UKTUG FAQ are displayed like this: [What is TeX?]
Getting Started
If you have been told to use a particular class file, use that one, otherwise I recommend that you use the
report or scrreprt class file[Replacing the standard classes]. Before you start your document,
consider first what kind of structure it should have. Unless you have been told otherwise, I recommend
that you start out with a skeletal document that looks something like the following:
\documentclass[a4paper]{report}
\begin{document}
\maketitle
\pagenumbering{roman}
\tableofcontents
\listoffigures
\listoftables
\chapter*{Acknowledgements}
\begin{abstract}
\end{abstract}
\pagenumbering{arabic}
\chapter{Introduction}
\label{ch:intro}
\chapter{Technical Introduction}
\label{ch:techintro}
\chapter{Method}
\label{ch:method}
\chapter{Results}
\label{ch:results}
\chapter{Conclusions}
\label{ch:conc}
\bibliographystyle{plain}
\bibliography{thesis}
\end{document}
however I haven't yet created the bibliography database thesis.bib. I will cover this later, but you
will still be able to run the document through LaTeX. If you haven't started yet, go ahead and try this.
Creating a skeletal document can have an amazing psychological effect on some people: for very little
effort it can produce a document several pages long, which can give you a sense of achievement which
can help give you sufficient momentum to get started2.1.
If you are using the scrreprt class you can use the commands \frontmatter, \mainmatter
and \backmatter to delineate the various logical divisions of your document. These commands are
also defined in some other classes, such as book and memoir.
Footnotes
... started2.1
but of course, it's not guaranteed to work with everyone.
\documentclass[a4paper]{report}
\begin{document}
\maketitle
\pagenumbering{roman}
\tableofcontents
\listoffigures
\listoftables
\chapter*{Acknowledgements}
\begin{abstract}
\end{abstract}
\pagenumbering{arabic}
\include{intro}
\include{techintro}
\include{method}
\include{results}
\include{conc}
\bibliographystyle{plain}
\bibliography{thesis}
\end{document}
File intro.tex:
\chapter{Introduction}
\label{ch:intro}
File techintro.tex:
\chapter{Technical Introduction}
\label{ch:techintro}
File method.tex:
\chapter{Method}
\label{ch:method}
File results.tex:
\chapter{Results}
\label{ch:results}
File conc.tex:
\chapter{Conclusions}
\label{ch:conc}
If you only want to work on, say, the Method and the Results chapters, you can place the following
command in the preamble:
\includeonly{method,results}
Subsections
• Excluding Files
• \input and \include
Excluding Files
There is also a command called \excludeonly defined in the excludeonly package which
performs the reverse of \includeonly.
and you had another file called mydoc.tex which contained the following:
\documentclass{article}
\begin{document}
\input{myfile}
\end{document}
Whereas
\include{<filename>}
does more than simply read the contents of the file called <filename>.tex. Firstly, an associated
auxiliary file is created called <filename>.aux. This file contains all the cross-referencing information
(produced by \label and \cite) that occurs in <filename>.tex. This means that any labels in the
files that have been excluded (either by not being listed in \includeonly or by being listed in
\excludeonly) can still be referenced in other parts of the document.
Secondly, \clearpage is issued, then the file name is checked to determine if it is in the included
list. If it is, the file contents will then be read and the cross-referencing information will be written to
<filename>.tex, otherwise the file contents will be ignored. At the end of the file, another
\clearpage is issued. This is why it makes sense to only use \include where the included file
contains an entire chapter (including \chapter and corresponding \label commands.)
Changing the Document Style
It is possible to redefine \chapter, \section etc in order to change the heading style for your
document. I recommend that you first write your thesis, and then worry about changing the document
style; the ability to do this is one of the advantages of using LaTeX over a word processor. Remember
that writing your thesis is more important than the layout. Whilst it may be that your school or
department may insist on a certain style, it should not take precedence over the actual task of writing.
Some class files, such as the KOMA script classes (which include scrreprt mentioned earlier) and
the memoir class provide commands to help you modify the document style. There are also packages
available to help you modify the appearance of chapter and section headings.[The style of section
headings] Alternatively, you may prefer to write your own class or package which will produce a
document that conforms to your school's guidelines (perhaps you have friends who may also benefit
from this.)
If you want to know how a particular class or package will enable you to modify the document style,
then you should read the user guide for that class or package. In this tutorial I shall illustrate how you
can create your own style which will be based on the report class. Note that if you want to redefine
commands such as \chapter and \section, using the methods described below, it is better to
create a class or package rather than putting the commands directly in your document[Learning to write
LaTeX classes and packages]. There are two main reasons for this: firstly, some of the commands
involved use an @ character which behaves differently depending on whether or not it occurs in a class/
package or in a normal .tex file, and secondly, if you place all these commands in your main
document, you may confuse the spell checker or word count application4.1[How many words have you
written?].
So, should you create a package or a class file? Packages should be designed to be independent of the
class file. For example, the graphicx package works irrespective of whether you are using the
report, article, slide etc class file. If the commands or environments that you want to define
are somehow dependent on a particular class file, then you should create a new class file that is based
on the one you want. If you are redefining chapter or section styles, then this is dependent on the
overall document style, that is, it's dependent on the class file. So, you should create a new class file
that modifies the existing one, rather than creating a package.
Let's have an example. If you want to create a new class called, say, mythesis, you will need to
create a file called mythesis.cls, and the start of your file should look something like:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mythesis}
Next you need to specify what to do with any options passed to this class file. Since we don't need to
define any new options for this example, we can simply pass all options on to the report class file:
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
The contents of this new class file should be inserted between the \LoadClass{report} and
\endinput commands. You will then need to modify your source code, thesis.tex, so that it
uses this new class file:
\documentclass[a4paper]{mythesis}
If the class file is only intended to conform to a specific university or school's guidelines, it makes
more sense for your new class file to set the paper size to a fixed size. For example, a European
university may insist on A4 paper, in which case the paper size is no longer an option. In this case you
can either specify the paper size as an option to \LoadClass:
\LoadClass[a4paper]{report}
or you can load the geometry package, in which case the following line should go after
\LoadClass{report}4.2:
\RequirePackage[a4paper]{geometry}
Either way, you no longer need the a4paper option in your document:
\documentclass{mythesis}
If you need to set additional page layout parameters such as the margin widths, then it is better to use
the geometry package. For example, to set the paper size to A4 with 1 inch margins do:
\RequirePackage[a4paper,margin=1in]{geometry}
See the geometry package documentation for further details.[Changing the margins in LaTeX]
Footnotes
... application4.1
for information on counting the number of words in your document, see the documentation for
the cmpreprt class file
... \LoadClass{report}4.2
Note that in a class or package you should use \RequirePackage instead of \usepackage
Subsections
• Modifying Object Specific Text
• Changing the Section Headings
• Changing the Chapter Headings
• Adding to the Table of Contents
• Defining a New Page Style
So, suppose you want your figures and tables to be labelled Fig. and Tab. instead of Figure and Table,
then you could add the following lines to mythesis.cls:
\renewcommand{\figurename}{Fig.}
\renewcommand{\tablename}{Tab.}
<indent>
This should be a length, specifying the indentation from the left margin.
<beforeskip>
The absolute value of the <beforeskip> specifies how much vertical distance to leave before the
heading. If <beforeskip> is negative, the first paragraph following the section heading will not be
indented.
<afterskip>
The absolute value of the <afterskip> specifies how much vertical distance to leave after the
heading. If <afterskip> is negative, the text following the sectioning command will appear on the
same level as the section heading.
<style>
The <style> are the declarations required to set the style of the heading (e.g. \itshape for an
italic heading.) Note that the last command in <style> may be a command which takes a single
argument, but all the others must be declarations.
As an example, suppose you want to change the section headings so that they appear in a large italic
font, you could do something like:
\renewcommand{\section}{\@startsection
{section}% % the name
{1}% % the level
{0mm}% % the indent
{-\baselineskip}% % the before skip
{0.5\baselineskip}% % the after skip
{\normalfont\large\itshape}} % the style
As mentioned above, the final command within the <style> argument may be a command which takes
an argument, so you could also do something like:
\renewcommand{\section}{\@startsection
{section}% % the name
{1}% % the level
{0mm}% % the indent
{-\baselineskip}% % the before skip
{0.5\baselineskip}% % the after skip
{\normalfont\large\MakeUppercase}} % the style
which would convert the section heading to uppercase. See A Guide to LaTeX [2] for further
information.
There is a counter called secnumdepth that controls what level the sections have numbers. The
levels correspond to those shown in Table 4.2. By default this value is 2, so only parts, chapters,
sections and subsections have associated numbers. You can use \setcounter to change the value of
secnumdepth. So, for example, if you want the \paragraph command to produce a number, do
\settocounter{secnumdepth}{4}
The first argument to \secdef tells LaTeX what to do if the unstarred version is used, and the second
argument tells LaTeX what to do if the starred version is used. So the command
\chapter{Introduction}
will use the command \@schapter. The commands \@chapter and \@schapter use the
commands \@makechapterhead and \@makeschapterhead, respectively, to format the
chapter heading, so if you want to change the chapter format, you will need to redefine the commands
\@makechapterhead and \@makeschapterhead. The easiest way to do this is to look for the
code for these commands in report.cls and copy them over to your new class file, mythesis,
described earlier, and edit the appropriate formatting commands.
For example, suppose you want a line to appear above and below the chapter heading, and have the
chapter heading appear in small capitals, you could do:
\renewcommand{\@makechapterhead}[1]{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\hrule % horizontal line
\vspace{5pt}% % add vertical space
\ifnum \c@secnumdepth >\m@ne
\huge\scshape \@chapapp\space \thechapter % Chapter number
\par\nobreak
\vskip 20\p@
\fi
\interlinepenalty\@M
\Huge \scshape #1\par % chapter title
\vspace{5pt}% % add vertical space
\hrule % horizontal rule
\nobreak
\vskip 40\p@
}}
\renewcommand{\@makeschapterhead}[1]{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\hrule % horizontal line
\vspace{5pt}% % add vertical space
\interlinepenalty\@M
\Huge \scshape #1\par % chapter title
\vspace{5pt}% % add vertical space
\hrule % horizontal line
\nobreak
\vskip 40\p@
}}
You can download the file mythesis.cls which includes all the examples covered so far in this chapter.
<type>
This is the type of object you are adding to the contents. e.g. chapter, section, figure.
<text>
This is the text that should go in the contents.
For example, the bibliography is generated using a starred version of the \chapter command, so it
doesn't get added to the table of contents. To add it to the table of contents, you can do
\addcontentsline{toc}{chapter}{\bibname}
The counter tocdepth controls the section level depth in the table of contents. The levels
corresponding to the sections are shown Table 4.2.
The report class file sets tocdepth to 2, which means that only the parts, chapters, sections and
subsections will be entered into the table of contents. You can use \setcounter to change the value
of tocdepth. For example, to also include the subsubsections, paragraphs and subparagraphs, do[The
format of the Table of Contents, etc.]:
\setcounter{tocdepth}{5}
Note that if you are using the default oneside option to the report class file, only the \@oddhead
and \@oddfoot commands will have any effect. If you want the odd and even numbered pages to be
different, you must remember to use the twoside option4.4. It is also possible to customise page
styles using the fancyhdr package. See A Guide to LaTeX [2] for an example.
Unless you are told otherwise, I recommend that you use the headings page style for your thesis.
Footnotes
...LaTeX4.3
most of the standard class files, including report, also define the page styles headings and
myheadings
... option4.4
this generally isn't appropriate for a thesis
Generating a Bibliography
When you are writing a large document such as a PhD thesis, I strongly recommend that you use
BibTeX rather than typing up the bibliography in a thebibliography environment. If you use
BibTeX:
1. Only the references that you cite are included in the bibliography. (Examiners tend to fault
uncited references5.1.)
2. References are displayed in a consistent manner.
3. Entries can be sorted in order of citation or alphabetically.
4. The style can easily be changed by simply using a different bibliography style file.
Recall that the example file had the lines:
\bibliographystyle{plain}
\bibliography{thesis}
The command
\bibliographystyle{<style>}
indicates which BibTeX style file (.bst) to use without the extension. The above example uses
plain.bst. The command
\bibliography{<database>}
indicates which database (.bib) to use. The above example uses the database thesis.bib, which
we will need to create. Since the document currently doesn't have any \cite commands, and
thesis.bib does not yet exist, the DVI file does not yet have a bibliography.
There are many bibliography styles, but the basic ones are:[Choosing a bibliography style]
abbrv
Entries sorted alphabetically with abbreviated first names, months and journal names.
alpha
Entries sorted alphabetically with the citation represented by abbreviated author surname and
year instead of a number.
plain
Entries sorted alphabetically, with the citation represented by a number.
unsrt
Entries sorted according to citation with the citation represented by a number.
See A Guide to LaTeX [2] or The LaTeX Companion [1] for information about other bibliography
styles, and check with your supervisor to see if there is a particular style you should be using.
Entries in the bibliography database should have the following form[Creating a BibTeX bibliography]:
@<entry type>{<keyword>,
<field name> = "<text>",
.
.
.
<field name> = "<text>"
}
where <entry type> indicates the type of entry (e.g. book or article). Standard entry types are listed in
Table 5.1.
Within an entry, <keyword> is a short label that is used to cite this work with the \cite command. If
you have written bibliographies with the thebibliography environment, it's the same as the
argument to \bibitem. There then follows a comma-separated list of fields of the form <field name>
= <value>. The <field name> indicates what kind of field it is, e.g. title, author. Table 5.2 lists
the standard fields. Note that some bibliography styles may define additional non-standard fields, such
as email or url.[URLS in BibTeX bibliographies] See A Guide to LaTeX [2] or The LaTeX
Companion [1] for information about other fields not listed in Table 5.2.
Table 5.2: Standard BiBTeX fields
address Publisher/Institution's address
author Author names
booktitle Title of book where only a part of the book is being cited
chapter Chapter or section number
edition The edition of the book
howpublished How a non-standard work was published
institution The institute sponsoring the work
journal The name of the journal
month The month the work was published
note Any additional information
number The number of the journal, technical report etc
organization Organization sponsoring conference or manual
pages Page number or page range
publisher Publisher's name
school Academic institution where thesis was written
series Name of a series
title The title of the work
type The type of technical report
volume The volume number.
The required and optional fields for the standard entry types are listed in Table 5.3. If an entry has a
field that is neither required nor optional, BibTeX will ignore it. This means that you can have a field
called, say, abstract, which will be ignored by the standard bibliography styles, but will be included
if you use a bibliography style that has an abstract field. So you can store additional information in
the database which won't appear in the bibliography.
BibTeX uses the European assumption[BibTeX sorting and name prefixes] that names are composed of
forenames, an optional ``von'' part which starts with a lower case letter, a surname and an optional ``jr''
part. In order to enable BibTeX to correctly identify these components, names must be entered in one
of the following formats:
• <forenames> <von> <surname>
• <von> <surname>, <forenames>
• <von> <surname>, <jr>, <forenames>
Examples (using a style that converts forenames to initials[Transcribed initials in BibTeX]):
Entry Output ("abbrv" style)
"Alex Thomas von Neumann" A.T. von Neumann
"John Chris {Smith Jones}" J.C. Smith Jones
"van de Klee, Mary-Jane" M.-J. van de Klee
"Smith, Jr, Fred John" F.J. Smith, Jr
"Maria {\uppercase{d}e La} Cruz" M. De La Cruz
Compare the last example with: "Maria De La Cruz" which would produce: M. D. L. Cruz,
which is incorrect. Let's analyse this last example in more detail: BibTeX always expects the ``von''
part to start with a lower case letter, but De and La both start with an upper case letter, so BibTeX will
assume that these form part of the forenames. However, BibTeX will ignore any LaTeX commands
such as \uppercase in \uppercase{d}e since it assumes that the command is an accent
command[Accents in bibliographies]. So when it parses \uppercase{d}e it will skip
\uppercase and look at the following letter. In this case it is d which is lower case, so from
BibTeX's point of view the word \uppercase{d}e starts with a lower case letter, so it is therefore
the ``von'' part. You can either do the same with the ``La'' part, or, as in the above example, you can
place it in the same group as \uppercase{d}e. If the names in your bibliography don't look correct,
then it is likely that you haven't followed the correct name format in your .bib file. (Note that this
also applies to the names in the editor field.)
Multiple authors should be separated by the keyword and[BibTeX doesn't understand lists of names].
Here is an example using the book entry:
@book{goossens97,
author = "Goossens, Michel and Rahtz, Sebastian and
Mittelbach, Frank",
title = "The \LaTeX\ graphics companion: illustrating
documents with \TeX\ and {PostScript}",
publisher = "Addison Wesley Longman, Inc",
year = 1997
}
In this example, the <keyword> is goossens97, so you cite the entry using the command
\cite{goossens97}. The standard bibliography styles usually convert titles to lower case, so the
name PostScript is enclosed in curly braces to prevent this from happening.
Note that curly braces {} can be used instead of double quotes. The above example can just as easily
be written:
@book{goossens97,
author = {Goossens, Michel and Rahtz, Sebastian and
Mittelbach, Frank},
title = {The \LaTeX\ graphics companion: illustrating
documents with \TeX\ and {PostScript}},
publisher = {Addison Wesley Longman, Inc},
year = 1997
}
Numbers (such as the year 1997) don't need to be delimited with quotes or braces. So you can have
pages = 10
Bibliography styles always have three-letter abbreviations for months: jan, feb, mar, etc. These
should be used instead of typing them in explicitly, as their format depends on the bibliography style.
These abbreviations should be entered without quotes. e.g.:
@inproceedings{talbot97,
author = "Talbot, Nicola and Cawley, Gavin",
title = "A fast index assignment algorithm for
robust vector quantisation of image data",
booktitle = "Proceedings of the I.E.E.E. International
Conference on Image Processing",
address = "Santa Barbara, California, USA",
month = oct,
year = 1997
}
The following is an example of a bibliography database (you can download it if you want):
@book{goossens97,
author = "Goossens, Michel and Rahtz, Sebastian and
Mittelbach, Frank",
title = "The \LaTeX\ graphics companion: illustrating
documents with \TeX\ and {PostScript}",
publisher = "Addison Wesley Longman, Inc",
year = 1997
}
@inproceedings{talbot97,
author = "Talbot, Nicola L. C. and Cawley, Gavin C.",
title = "A fast index assignment algorithm for
robust vector quantisation of image data",
booktitle = "Proceedings of the I.E.E.E. International
Conference on Image Processing",
address = "Santa Barbara, California, USA",
month = oct,
year = 1997
}
@article{cawley96,
author = "Cawley, Gavin C. and Talbot, Nicola L. C.",
title = "A fast index assignment algorithm for vector
quantization over noisy transmission channels",
journal = "I.E.E. Electronic Letters",
number = 15,
volume = 32,
pages = "1343--1344",
month = jul,
year = 1996
}
@incollection{wainwright93,
author = "Wainwright, Robert B.",
title = "Hazards from {Northern} Native Foods",
booktitle = "\emph{Clostridium botulinum}: Ecology and
Control in Foods",
chapter = 12,
pages = "305--322",
editor = "Hauschild, Andreas H. W. and Dodds,
Karen L.",
publisher = "Marcel Dekker, Inc",
year = 1993
}
Once you have set up your bibliography database, you will need to first LaTeX your document, then
call BibTeX and then LaTeX your document twice to get all the cross references up to date. If you are
using TeXnicCenter, when you create a new project, click on the `Uses BiBTeX' option, and it will
automatically call BibTeX when you click on the build icon. If you are using a command prompt, then
if your file is called, say, thesis.tex, you will need to type the following commands[``Normal'' use
of BibTeX from LaTeX]:
latex thesis
bibtex thesis
latex thesis
latex thesis
Note that you are specifying the auxiliary file when calling BibTeX, without the extension. You can
have a bibliography database that has a different name from your LaTeX file, but you use the name of
the auxiliary file5.2 when calling BibTeX. For example, if your thesis is saved in the file thesis.tex
and your bibliography database is saved in the file ref.bib, then you still need to do:
latex thesis
bibtex thesis
latex thesis
latex thesis
In fact, you can use multiple bibliography databases (which isn't the same as having multiple
bibliographies in your document.[Multiple bibliographies?]) Suppose your references are defined in the
files ref1.bib and ref2.bib, then you need to specify both databases in thesis.tex:
\bibliography{ref1}
\bibliography{ref2}
If you have references which you find yourself frequently using, such as your own publications, you
may prefer to keep a .bib file containing these references in a central location, such as in your local
texmf tree. If you are using a UNIX-like operating system, this will typically be in
~/texmf/bibtex/bib/. If you are using Windows, this may be in the folder c:\localtexmf\
bibtex\bib\ but check your TeX installation documentation. If you do this, remember to refresh
the TeX database[Installing things on a (La)TeX system].
Illustrations of some of the common bibliography styles are shown in Figures 5.1, 5.2, 5.3, 5.4, 5.5, 5.6
and 5.7. Note that the apalike bibliography style requires the apalike package.
Figure 5.1: abbrv bibliography style
Figure 5.2: acm bibliography style
Figure 5.3: alpha bibliography style
Figure 5.4: ieeetr bibliography style
Figure 5.5: plain bibliography style
Figure 5.6: unsrt bibliography style
Figure 5.7: apalike bibliography style (requires apalike package)
Footnotes
... references5.1
When your examiners read through your thesis, they can check off each citation they encounter
against your bibliography. When they reached the end of the thesis, they can then look through
the bibliography for unchecked entries. One or two will appear the result of carelessness, whereas
a large quantity will look like padding and may lead the examiners to suspect a certain amount of
duplicity on your part.
... file 5.2
This will typically have the same base name as your main document file, but may be different if
you are using a bibliography managing package such as bibunits.
Subsections
• Back-References
• Troubleshooting
Back-References
The backref package supplied with the hyperref bundle will place a comma-separated list of
section or page numbers on which the work was cited at the end of each item in the bibliography.
[References from the bibliography to the citation] Each bibliography item in the thebibliography
environment must be separated by a blank line, but as BibTeX does this automatically, you only need
to worry about it if you are creating your thebibliography environment without the aid of
BibTeX.
The list of numbers will by default refer to the page numbers in which the corresponding \cite
commands are located, but this can be changed to the section numbers by passing the options ref to
the backref package. If you are using the hyperref package, then the backref package will be
loaded if you use the hyperref package options backref or backref=section.
The backref package uses the command \backref to control the format of the list of back-
references. Without the hyperref package, the list of back-references has an introductory text
supplied by \backrefpagesname or \backrefsectionsname. See the backref package
documentation for further detail.
The PDF version of this document illustrates the use of this package in the bibliography.
Troubleshooting
• BibTeX writes the thebibliography environment to a .bbl file, which is then input into
the document by \bibliography. If you have made a LaTeX error in the .bib file, this
error will be copied to the .bbl file. If you have corrected the error in the .bib file, but you
are still getting an error when you LaTeX your document, try deleting the .bbl file.
• Remember to use double quotes or braces to delimit the field names in your .bib file.
• Remember to put a comma at the end of each field (except the last).
• It is better to only use alphanumerical characters in the keywords. Some punctuation characters
such as - should be fine, but spaces are not recommended, and commas should definitely be
avoided.
• The LaTeX comment symbol (%) is not a comment character in a .bib file.
• If you have entered a field in the .bib file, but it doesn't appear in the bibliography, check to
make sure that the field is required or optional for that type of entry, and check the spelling.
• Check the log file (.blg) generated by BibTeX for messages.
Formatting
Subsections
• Double Spacing
• Changing the Title Page
• Verbatim Text
• Tabbing
• Theorems and Algorithms
Double Spacing
Double spacing is usually frowned upon in the world of modern typesetting, however it is usually a
requirement when you are writing a PhD thesis as it gives the examiners extra space to write
comments.
Double spacing can either be achieved using the setspace package, or by redefining the value of
\baselinestretch.[Double-spaced documents in LaTeX] The value depends on the font size (see
Table 6.1). To switch back to single spacing set \baselinestretch back to 1.
For example, if you are using 12pt font, you will need the following line:
\renewcommand{\baselinestretch}{1.66}
It is however better to use the setspace package which provides the declarations
\singlespacing, \onehalfspacing and \doublespacing.
Verbatim Text
There may be times when you want to include text exactly as you have typed it into your source code.
For example, you may want to include a short segment of computer code[Code listings in LaTeX]. This
can be done using the verbatim environment. For example:
\begin{verbatim}
#include <stdio.h>
int main()
{
printf{"Hello World\n"};
return 1;
}
\end{verbatim}
would produce the following output:
The contents of a file can be included verbatim using the command[Including a file verbatim in
LaTeX]:
\verbatiminput{<filename>}
defined in the verbatim package. For example:
\verbatiminput{helloW.c}
where helloW.c is the filename (remember to use a forward slash / as a directory divider, even if
you are using Windows).
Note: it is not usually appropriate to have reams of listings in your thesis. It can annoy an examiner if
you have included every single piece of code you have written during your PhD, as it comes across as
padding to make it look as though your thesis is a lot larger than it really is. (Examiners are not easily
fooled, and it's best not to irritate them as it is likely to make them less sympathetic towards you.) If
you want to include listings in your thesis, check with your supervisor first to find out whether or not it
is appropriate.
Tabbing
The tabbing environment lets you create tab stops so that you can tab to a particular distance from
the left margin. Within the tabbing environment, you can use the command \= to set a tab stop, \> to
jump to the next tab stop, \< to go back a tab stop, \+ to shift the left border by one tab stop to the
right, \- to shift the left border by one tab stop to the left. In addition, \\ will start a new line and
\kill will set any tabs stops defined in that line, but will not typeset the line itself.[Accents
misbehave in tabbing]
Examples:
1. This first example sets up three tab stops:
\begin{tabbing}
Zero \=One \=Two \=Three\\
\>First tab stop\\
\>A\>\>B\\
\>\>Second tab stop
\end{tabbing}
\begin{theorem}
If $\lambda$ is an eigenvalue of $\mathbf{B}$ with
eigenvector $\vec{\xi}$, then $\lambda^n$ is an
eigenvalue of $\mathbf{B}^n$ with eigenvector $\vec{\xi}$.
\end{theorem}
\begin{theorem}
If $\lambda$ is an eigenvalue of $\mathbf{B}$ with
eigenvector $\vec{\xi}$, then $\lambda^n$ is an
eigenvalue of $\mathbf{B}^n$ with eigenvector $\vec{\xi}$.
\end{theorem}
\begin{theorem}[Eigenvector Powers]
If $\lambda$ is an eigenvalue of $\mathbf{B}$ with
eigenvector $\vec{\xi}$, then $\lambda^n$ is an
eigenvalue of $\mathbf{B}^n$ with eigenvector $\vec{\xi}$.
\end{theorem}
4. In this example an algorithm structure is created. The commands \hfill\par are used to
prevent the tabbing environment from running into the algorithm title.
\newtheorem{algorithm}{Algorithm}
\begin{algorithm}[Gauss-Seidel Algorithm]
\hfill\par
\begin{tabbing}
1. \=For $k=1$ to maximum number of iterations\\
\>2. For \=$i=1$ to $n$\\
\>\>Set
\begin{math}
x_i^{(k)} =
\frac{b_i-\sum_{j=1}^{i-1}a_{ij}x_j^{(k)}
-\sum_{j=i+1}^{n}a_{ij}x_j^{(k-1)}}%
{a_{ii}}
\end{math}
\\
\>3. If $\|\vec{x}^{(k)}-\vec{x}^{(k-1)}\| < \epsilon$,
where $\epsilon$ is a specified stopping criteria, stop.
\end{tabbing}
\end{algorithm}
The last example doesn't look right, as algorithms tend to be displayed in an upright font not an
italic font[Typesetting pseudocode in LaTeX]. The package amsthm extends the functionality
of \newtheorem and provides three theorem styles:
plain
Title and number in bold, body in italic (default).
definition
Title and number in bold, body in normal font.
remark
Title and number in italic, body in normal font.
\begin{algorithm}[Gauss-Seidel Algorithm]
\hfill\par
\begin{tabbing}
1. \=For $k=1$ to maximum number of iterations\\
\>2. For \=$i=1$ to $n$\\
\>\>Set
\begin{math}
x_i^{(k)} =
\frac{b_i-\sum_{j=1}^{i-1}a_{ij}x_j^{(k)}
-\sum_{j=i+1}^{n}a_{ij}x_j^{(k-1)}}%
{a_{ii}}
\end{math}
\\
\>3. If $\|\vec{x}^{(k)}-\vec{x}^{(k-1)}\| < \epsilon$,
where $\epsilon$ is a specified stopping criteria, stop.
\end{tabbing}
\end{algorithm}
boxed
The body of the float is placed in a box, and the caption is printed below the box.
ruled
The caption is printed at the top with a rule above and below it, and there is a rule at the end of
the float.
\begin{algorithm}
\caption{Gauss-Seidel Algorithm}
\label{alg:GS}
\begin{tabbing}
1. \=For $k=1$ to maximum number of iterations\\
\>2. For \=$i=1$ to $n$\\
\>\>Set
\begin{math}
x_i^{(k)} =
\frac{b_i-\sum_{j=1}^{i-1}a_{ij}x_j^{(k)}
-\sum_{j=i+1}^{n}a_{ij}x_j^{(k-1)}}{a_{ii}}
\end{math}
\\
\>3. If $\|\vec{x}^{(k)}-\vec{x}^{(k-1)}\| < \epsilon$,
where $\epsilon$ is a specified stopping criteria, stop.
\end{tabbing}
\end{algorithm}
The following line can then go after the list of figures and list of tables:
\listof{algorithm}{List of Algorithms}
Subsections
• Generating an Index
• Troubleshooting
• Generating a Glossary
• Defining Glossary Entries
• Displaying Terms in the Document
• Displaying the Glossary
• Generating the Glossary Files
Generating an Index
If you want to generate an index, you will need the command[Generating an index in (La)TeX]
\makeindex
in the preamble. The command
\index{<entry>}
is used to index <entry> at that point in the document. For example, the following code:
Eigenvectors\index{eigenvector} are defined \ldots
and place the entry `eigenvector' in the .idx file with the associated page number.
Note that if you don't use \makeindex in the preamble, no .idx file will be created and \index
will ignore its argument.
The package makeidx provides the command
\printindex
which should be placed at the point in the document where you want your index to appear.
Provided you have used \makeindex and \index, once you have LaTeXed your document, there
will be a file with the extension .idx containing all the indexing information as a series of
\indexentry commands. This command is not defined by LaTeX, so you should not input the
.idx file into your document. The .idx file needs to be processed by an external application such as
makeindex to create a file which contains all the LaTeX commands necessary to typeset the index.
This new file has the extension .ind, and it is this file which is input by \printindex on the next
LaTeX run.
If you are using TeXnicCenter you will need to select ``uses makeindex'' when you create a new
project, if you are using a command prompt, you will need to do:
latex filename.tex
makeindex filename.idx
latex filename.tex
(where filename is the base name of your source file, e.g. thesis) If you are also using BibTeX,
you will need to do:
latex filename.tex
bibtex filename
makeindex filename.idx
latex filename.tex
latex filename.tex
It's a good idea to have sub-entries within an index, to assist the reader. For example, you may want to
index the term ``matrix'', but your document may mention many different types of matrices, such as
diagonal, block or singular. In which case it would be better to index the term matrix for general
occurrences, and have sub-entries indexing specific types of matrices, so that the matrix entry in the
index would look something like:
matrix, 4, 10, 22-24
diagonal, 12
block, 20, 24
singular, 33
A sub-entry can be generated using the ! character. So the above can be generated using the following
commands:
Preamble: \makeindex
Page 4: \index{matrix}
Page 10: \index{matrix}
Page 12: \index{matrix!diagonal}
Page 20: \index{matrix!block}
Page 22: \index{matrix}
Page 23: \index{matrix}
Page 24: \index{matrix}
Page 24: \index{matrix!block}
Page 33: \index{matrix!singular}
End of Doc: \printindex
Note that the same entries on pages 22, 23 and 24 have been turned into a page range 22-24. For larger
page ranges, you can specify the start of the page range by appending |( to the end of the index entry
and the end of the page range by appending |) to the end of the index entry. For example:
Preamble: \makeindex
Page 4: \index{matrix}
Page 10: \index{matrix}
Page 12: \index{matrix!diagonal}
Page 20: \index{matrix!block}
Page 22: \index{matrix|(}
Page 24: \index{matrix!block}
Page 30: \index{matrix|)}
Page 33: \index{matrix!singular}
End of Doc: \printindex
would produce the following output in the index:
matrix, 4, 10, 22-30
diagonal, 12
block, 20, 24
singular, 33
An index entry can refer to another entry using |see{<reference>}7.1. For example,
\index{singular matrix|see{matrix, singular}}
The format of the page number can be changed using |<style> where <style> is the name of a
formatting command without the backslash. Suppose in the above example, the term ``matrix'' is
defined on page 10, then you may want the page number to appear in bold to indicate that this is a
primary reference. The command \textbf produces bold text, so you would need to append |
textbf to the index entry7.2. For example, the code:
Preamble: \makeindex
Page 4: \index{matrix}
Page 10: \index{matrix|textbf}
Page 12: \index{matrix!diagonal}
Page 20: \index{matrix!block}
Page 22: \index{matrix|(}
Page 24: \index{matrix!block}
Page 30: \index{matrix|)}
Page 33: \index{matrix!singular}
End of Doc: \printindex
would produce the following output in the index:
matrix, 4, 10, 22-30
diagonal, 12
block, 20, 24
singular, 33
Note that if you want to apply more than one formatting command, say you want the number to be bold
and italic, then you should define a new command with one argument which will set the argument in
that font, for example:
\newcommand{\textbfit}[1]{\textit{\bfseries #1}}
and then use this command name (without the backslash) in the \index command. (It is possible to
do, say \index{matrix|itshape\textbf}, but since \itshape is a declaration, it will set
the rest of your index in that shape, until counteracted by another font changing command. You
definitely must not do something along the lines of \index{matrix|textit\textbf} since this
will be equivalent to \textit{\textbf}{<page number>} which will of course produce an
error from LaTeX since it is syntactically incorrect.)
The application makeindex sorts the index according to the entries specified, so the word ``matrix''
would come before the word ``modulus'', but $\mu$ will be sorted on the characters $, \, m, u and
then $, so would come before ``matrix''. This may not be appropriate, so it is possible to specify
how to sort the entry and how to format the entry separately using the @ character:
\index{mu@$\mu$}
In this case the sorting is performed on the string mu, so it will appear after the word ``modulus'', but it
will appear in the index as . For more information about generating an index see the LaTeX user's
guide [3], The LaTeX Companion [1] or A Guide to LaTeX [2].
Footnotes
...reference}7.1
This in fact tells makeindex to use the command \see{<reference>} which uses
\seename to typeset the word ``see''. The babel package will redefine this so that it uses the
relevant translation, or you can redefine \seename using \renewcommand
... entry7.2
The argument to the formatting command will be the page number. In fact, \see takes two
arguments, the first is the redirection text which you must supply within the argument of
\index (as shown in the example) and the second argument is the page number which \see
ignores
Subsections
• Troubleshooting
Troubleshooting
• My index hasn't appeared.
1. Make sure you have the command \printindex at the place where you want the
index to appear (this command is defined in the makeidx package).
2. Make sure you have the command \makeindex in the preamble.
3. Make sure you LaTeX the document, then run makeindex, then LaTeX the document
again.
4. Check makeindex's log file (which has the extension .ilg by default) for error
messages.
• I want to index the character ", @, ! or | but it's not working.
If you want any of these symbols in your index, you will need to prepend the character with the
double quote symbol ". For example:
\index{"@}
Check to make sure the sort argument to each of the corresponding \index commands is the
same, pay particular attention to spaces as makeindex will treat the following entries
differently:
\index{identity matrix}
\index{identity matrix}
LaTeX however, treats multiple spaces the same as a single space, so the text will appear the
same in the index.
• LaTeX says that the command \printindex is undefined.
You have forgotten to load the makeidx package.
Generating a Glossary
There are a number of packages available to assist creating a glossary, these include makeglos
(analogous to makeidx), nomencl, glossaries7.3, glosstex and gloss. The first three use
LaTeX in conjunction with makeindex, glosstex uses LaTeX in conjunction with makeindex
and glosstex whilst gloss uses LaTeX in conjunction with BibTeX. This document only describes
glossaries. If you are interested in using the others, you should read their accompanying
documentation.
The glossaries package has the advantage over makeglos and nomencl in that you don't have
to worry about escaping makeindex's special characters as they are dealt with internally. The
glossary information is set using keys and you can override the default plural form for plurals that
aren't formed by appending the letter ``s'' to the singular form. In addition, you can specify alternative
text for the first time the term is used in the document, and you can also define an associated symbol.
This guide gives a brief overview of the glossaries package. For further details you will need to
read the package documentation.
Footnotes
...glossaries7.3
The glossaries package has replaced the now obsolete glossary package
description
A brief description of this term (to appear in the glossary)
text
How this entry will appear in the document text where the singular form is required. If this key is
omitted, the value of the name key is used.
first
How this entry will appear in the document text the first time it is used, where the first use
requires the singular form. If this field is omitted, the value of the text key is used.
plural
How this entry will appear in the document text where the plural form is required. If this key is
omitted, the value is obtained by appending the letter ``s'' to the value of the text key.
firstplural
How this entry will appear in the document text the first time it is used, where the first use
requires the plural form. If this field is omitted, the value is obtained by appending the letter ``s''
to the value of the first key.
symbol
This key is provided to allow the user to specify an associated symbol, but most glossary styles
ignore this value. If omitted, the value is set to \relax.
sort
This value indicates how makeindex should sort this entry. If omitted, the value is given by the
name key.
type
This is the glossary type to which this entry belongs. If omitted, the main glossary is assumed.
For example, the following defines the term ``set'' and assigns a brief description. The term is given the
label set. This is the minimum amount of information you must give:
\newglossaryentry{set}% the label
{name=set, % the term
description={a collection of objects} % a brief description
}
The following example uses the vertical bar symbol | which is one of makeindex's special
characters, but the glossaries package deals with it behind the scenes, so I don't need to do
anything special:
\newglossaryentry{card}% the label
{name=cardinality, % the term
description={the number of objects within a set}, % brief description
symbol={\ensuremath{|\mathcal{S}|}} % the associated symbol
}
The plural of the word ``matrix'' is ``matrices'' not ``matrixs'', so the term needs the plural form set
explicitly:
\newglossaryentry{matrix}% the label
{name=matrix, % the term
description={a rectangular table of elements}, % brief description
plural=matrices % the plural
}
If you are using the hyperref or html package, you will need to use one of the \hyper<xx>
commands that are defined by the glossaries package, such as \hyperbf, if you want to
retain a hyperlink. If you instead use \textbf you will lose the hyperlink. See the
glossaries documentation for further details.
counter
This specifies which counter to use for the associated number in the glossary entry. This is
usually the page number, but can be changed to, say, the section in which the term is used.
hyper
This is a boolean key which can be used to enable/disable the hyperlink to the relevant entry in
the glossary. Note that setting hyper=true will only have an effect if hyperlinks are supported
(through loading the hyperref or html packages.)
\gls[<options>]{<label>}[<insert>]
This is the same as \glslink except that the link text is determined from the value of the text or
first keys supplied when the term was defined by \newglossaryentry. The first optional
argument is the same as that for \glslink. The final optional argument <insert> allows you to insert
some additional text into the link text. By default, this will append <insert> to the end of the link text.
One of the examples above defined a new glossary entry labelled matrix. Suppose in my document I
want to write, say, ``the matrix's dimensions are given by and '', then I can do:
the \gls{matrix}['s] dimensions are given by $n$ and $m$
The text ``matrix's'' will appear as a link. Of course, you can simply do:
the \gls{matrix}'s dimensions are given by $n$ and $m$
If there are no hyperlinks (you haven't loaded hyperref or html) then there will be no noticeable
difference between the two lines of code above7.4. If you do have hyperlinks enabled then the second
way will look a little odd if you use the colorlinks hyperref option, and will look ugly if you
use the default boxed link style.
\Gls[<options>]{<label>}[<insert>]
This is like \gls except that the first letter of the link text is converted to upper case in the event that
the term appears at the start of a sentence.
\GLS[<options>]{<label>}[<insert>]
This is like \gls except that the entire link text is converted to upper case. This is less useful as you
shouldn't use this command in titles or page headers in the same way that you shouldn't put commands
such as \index in similar places. If you want a glossary term to appear in a heading or title you
should use
\glsdisplaytext{<label>}
This produces the value assigned with the text key when the entry was defined, but it does not add
any information to the glossary nor does it generate a hyperlink. There are also analogous commands \
Glsentrytext (make the first letter upper case), \glsentryfirst (the value assigned with
first key) and \Glsentryfirst (as previous, but makes the first letter upper case.)
\glspl[<options>]{<label>}[<insert>]
This is analogous to \gls but produces the plural form as specified by either the plural or
firstplural keys. Again there are analogous commands
\Glspl[<options>]{<label>}[<insert>]
\GLSpl[<options>]{<label>}[<insert>]
The same caveats above apply here. If you want plural forms in headings then use
\glsentryplural{<label>} or \Glsentryplural{<label>}, which are analogous to
\glsentrytext and \Glsentrytext, or\glsentryfirstplural{<label>} or
\Glsentryfirstplural{<label>}, which are analogous to \glsentryfirst and
\Glsentryfirst.
You can add a line to the glossary without generating text using
\glsadd[<options>]{<label>}
The optional argument is the same as that for \glslink except that the hyper key has no meaning
since no text is generated by the command.
If you want to add all the entries you have defined for a given glossary, you can do so using
\glsaddall[<glossary list>]
If you have defined additional glossaries, you can specify to add only those entries which belong to the
glossaries listed in <glossary list>.
Footnotes
... above7.4
assuming you haven't changed the way in which the inserted text is added.
Displaying the Glossary
To display the glossary, you can either use
\printglossary[<options>]
or
\printglossaries
at the point where you want the glossaries to appear. It is simpler to use just \printglossaries
which will display the glossaries in the order in which they were defined, otherwise you will need to
specify a separate \printglossary for each glossary.
The optional argument to \printglossary is a <key>=<value> list of options, where the following
keys are defined:
type
The value of this key specifies which glossary to display. If omitted the main glossary is
assumed.
title
The glossary's title (overriding the title specified when the glossary was defined.)
toctitle
The title for the table of contents (if the toc package option is used.)
style
The glossary style to use for this glossary. There are many predefined styles available, check the
glossaries documentation for details.
Remember that if you use the acronym package option, your document will have at least two
glossaries, so if you don't use \printglossaries you would need to do
\printglossary[type=acronym]
If you have specified the acronym package option you will also need to do:
makeindex -s thesis.ist -t thesis.alg -o thesis.acr thesis.acn
If you have created any additional glossaries, you will need to do something similar for each additional
glossary. This is fairly cumbersome, so the glossaries package comes with a Perl script which will
automate this process for you. All you have to do is specify the name of the auxiliary file without the
extension, and makeindex will be called the required number of times with the necessary settings.
If you want to add any extra information to the start or end of the glossary, you can redefine the
commands \glossarypreamble and \glossarypostamble. The latest version of the
glossaries package can be downloaded from CTAN or from
http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/. The glossaries
package has a FAQ available at
http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/.
You can download for an example of how to create a list of acronyms or you can download for an
example of how to create a glossary containing symbols.
which indicates that the figure can be placed ``here'' (h), at the top of a page (t), at the bottom
of the page (b) or on a page solely consisting of floats (p). If you just use the h placement
specifier then you are stating: ``I want it here and nowhere else!'' If TeX can't put it exactly
here, then you have given no alternative place to put it, and it won't get placed anywhere, unless
a \clearpage command is issued, at which point all remaining unprocessed floats will be
dumped at that point. If you are determined that an image must be placed exactly here then it
should not be placed in a floating environment.
2. Try increasing the amount of text in the chapter. Remember that you should never simply print
all the figures and tables in a results chapter without discussing them to some extent.
3. If all else fails, try using the \clearpage command. This forces all unprocessed floats to be
processed immediately, and start a new page. This may result in the page ending prematurely, if
you wish to avoid this, you can use the afterpage package, and use the command:
\afterpage{\clearpage}
Footnotes
... work9.1
I gather this is not the case in some other countries, where the viva is more informal, and the
decision to pass or fail you has already been made before your viva.
... up-to-date9.2
Having said that, I know someone who submitted an article to a journal, and it took three and a
half years before the reviewers came back with comments. In the end, the author withdrew the
manuscript because by that time the topic was out of date.
... equations9.3
When I was a PhD student, I was once rendered speechless when asked to provide a graphical
illustration of an equation involving a quadruple summation that had no graphical meaning from
my point of view. Perhaps this was a drawback of being a mathematician doing a PhD in an
electronics department.
... charts9.4
The sole purpose of 3D pie charts or bar charts appears to be to look pretty and impress people
who have no understanding of mathematics.
... it 9.5
but don't expect your supervisor to actually write your thesis!
... Dr Gavin Cawley9.6
School of Computing Sciences, University of East Anglia
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it
is not allowed.
Preamble
The purpose of this License is to make a manual, textbook, or other functional and useful document
``free'' in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially. Secondarily, this License
preserves for the author and publisher a way to get credit for their work, while not being considered
responsible for modifications made by others.
This License is a kind of ``copyleft'', which means that derivative works of the document must
themselves be free in the same sense. It complements the GNU General Public License, which is a
copyleft license designed for free software.
We have designed this License in order to use it for manuals for free software, because free software
needs free documentation: a free program should come with manuals providing the same freedoms that
the software does. But this License is not limited to software manuals; it can be used for any textual
work, regardless of subject matter or whether it is published as a printed book. We recommend this
License principally for works whose purpose is instruction or reference.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have printed covers) of the Document,
numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose
the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the
front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly
identify you as the publisher of these copies. The front cover must present the full title with all words
of the title equally prominent and visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve the title of the Document and
satisfy these conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit legibly, you should put the first ones
listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than 100, you must either
include a machine-readable Transparent copy along with each Opaque copy, or state in or with each
Opaque copy a computer-network location from which the general network-using public has access to
download using public-standard network protocols a complete Transparent copy of the Document, free
of added material. If you use the latter option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus
accessible at the stated location until at least one year after the last time you distribute an Opaque copy
(directly or through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of the Document well before redistributing
any large number of copies, to give them a chance to provide you with an updated version of the
Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under the conditions of sections 2
and 3 above, provided that you release the Modified Version under precisely this License, with the
Modified Version filling the role of the Document, thus licensing distribution and modification of the
Modified Version to whoever possesses a copy of it. In addition, you must do these things in the
Modified Version:
A.
Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and
from those of previous versions (which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version if the original publisher of
that version gives permission.
B.
List on the Title Page, as authors, one or more persons or entities responsible for authorship of
the modifications in the Modified Version, together with at least five of the principal authors of
the Document (all of its principal authors, if it has fewer than five), unless they release you from
this requirement.
C.
State on the Title page the name of the publisher of the Modified Version, as the publisher.
D.
Preserve all the copyright notices of the Document.
E.
Add an appropriate copyright notice for your modifications adjacent to the other copyright
notices.
F.
Include, immediately after the copyright notices, a license notice giving the public permission to
use the Modified Version under the terms of this License, in the form shown in the Addendum
below.
G.
Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given
in the Document's license notice.
H.
Include an unaltered copy of this License.
I.
Preserve the section Entitled ``History'', Preserve its Title, and add to it an item stating at least the
title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there
is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and
publisher of the Document as given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J.
Preserve the network location, if any, given in the Document for public access to a Transparent
copy of the Document, and likewise the network locations given in the Document for previous
versions it was based on. These may be placed in the ``History'' section. You may omit a network
location for a work that was published at least four years before the Document itself, or if the
original publisher of the version it refers to gives permission.
K.
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve the Title of the
section, and preserve in the section all the substance and tone of each of the contributor
acknowledgements and/or dedications given therein.
L.
Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles.
Section numbers or the equivalent are not considered part of the section titles.
M.
Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified
Version.
N.
Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any
Invariant Section.
O.
Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or appendices that qualify as Secondary
Sections and contain no material copied from the Document, you may at your option designate some or
all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the
Modified Version's license notice. These titles must be distinct from any other section titles.
You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of
your Modified Version by various parties-for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a
Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by)
any one entity. If the Document already includes a cover text for the same cover, previously added by
you or by arrangement made by the same entity you are acting on behalf of, you may not add another;
but you may replace the old one, on explicit permission from the previous publisher that added the old
one.
The author(s) and publisher(s) of the Document do not by this License give permission to use their
names for publicity for or to assert or imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this License, under the terms
defined in section 4 above for modified versions, provided that you include in the combination all of
the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant
Sections of your combined work in its license notice, and that you preserve all their Warranty
Disclaimers.
The combined work need only contain one copy of this License, and multiple identical Invariant
Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same
name but different contents, make the title of each such section unique by adding at the end of it, in
parentheses, the name of the original author or publisher of that section if known, or else a unique
number. Make the same adjustment to the section titles in the list of Invariant Sections in the license
notice of the combined work.
In the combination, you must combine any sections Entitled ``History'' in the various original
documents, forming one section Entitled ``History''; likewise combine any sections Entitled
``Acknowledgements'', and any sections Entitled ``Dedications''. You must delete all sections Entitled
``Endorsements''.
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents released under this
License, and replace the individual copies of this License in the various documents with a single copy
that is included in the collection, provided that you follow the rules of this License for verbatim
copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute it individually under this
License, provided you insert a copy of this License into the extracted document, and follow this
License in all other respects regarding verbatim copying of that document.
8. TRANSLATION
Translation is considered a kind of modification, so you may distribute translations of the Document
under the terms of section 4. Replacing Invariant Sections with translations requires special permission
from their copyright holders, but you may include translations of some or all Invariant Sections in
addition to the original versions of these Invariant Sections. You may include a translation of this
License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you
also include the original English version of this License and the original versions of those notices and
disclaimers. In case of a disagreement between the translation and the original version of this License
or a notice or disclaimer, the original version will prevail.
If a section in the Document is Entitled ``Acknowledgements'', ``Dedications'', or ``History'', the
requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as expressly provided for
under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void,
and will automatically terminate your rights under this License. However, parties who have received
copies, or rights, from you under this License will not have their licenses terminated so long as such
parties remain in full compliance.
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with ... Texts.''
line with this:
with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being
LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other combination of the three, merge
those two alternatives to suit the situation.
If your document contains nontrivial examples of program code, we recommend releasing these
examples in parallel under your choice of free software license, such as the GNU General Public
License, to permit their use in free software.
Bibliography
1
``The LaTeX Companion'', Michel Goossens, Frank Mittelbach and Alexander Samarin,
Addison-Wesley (1994).
2
``A Guide to LaTeX2e: document preparation for beginners and advanced users'', Helmut Kopka
and Patrick W. Daly, Addison-Wesley (1995).
3
``LaTeX : a document preparation system'', Leslie Lamport, 2nd ed. Addison-Wesley (1994).
4
The TeX Archive. http://www.tex.ac.uk/