LaTeX is a document markup language and preparation system for the TeX typesetting program. That may mean something or nothing to you, but the important part is this: almost any document that you produce over the course of your MPhil or PhD will have to be written in LaTeX. Whilst it takes some getting used to, this really is a good thing as it was born with typesetting scientific papers as its main objective.

LaTeX‽ Help!

If you’re new to LaTeX don’t worry. If you’re using one of the school’s computers it will most likely be on there, and if it isn’t for any reason, speak to Mike Finney and he’ll sort you out. The column on the right hand side is equipped with two helpful boxes. The first is a list of the best LaTeX tutorials on the web; the second a list of links to LaTeX software. Further, there’s usually a LaTeX lecture or two towards the start of the first term should you need a little guidance.

Thesis submission requirements

Even if you don’t type a single line of LaTeX during research, when it comes to submitting your MPhil or PhD thesis there are very strict typesetting guidelines to which your thesis should adhere. Theses which do not meet these requirements risk being rejected. All is not lost however, your friends in the School of Mathematics are here for you, and we’ve got your back.

The simplest guideline is that it’s certainly expected by the department that your thesis is typeset using LaTeX. Beyond that, there are numerous small rules that the university changes frequently. Of course, to test that your information-finding skills are sufficient for a research degree, the rules appear on a different webpage every time. Here you can find the current rules and regulations for theis presentation.

For more information about the process of thesis submission and examination go here. Don’t forget to fill in your intent to submit forms 3 months before you submit – those details can be found here.

To help you through the typesetting part, Lawrence (wongtl) has produced something of a LaTeX odyssey, containing everything you need for a successful PhD. Except the maths. But that’s simple enough.

So, with much thanks, here are the sample files and explanatory documents (all files can be downloaded as a .zip here):

The following links are to those style (.sty) files referenced in the Lawrence’s Manual:

Lawrence’s exhaustive manual and its source are completely in line with the guidelines as they stand, to the best of our knowledge. For the slightly lazier, there is a skeleton LaTeX file suitable for forming the base of a Birmingham theses. The file was created by Claire Watson and updated by Richard Barraclough, then Matthew Badger who added the example chapter, appendix and bibliography files. The packages were up to date and available on Babbage at the time of writing (May 2009) except for ntheorem. There are still a few unresolved issues in this file, so be careful:

  • There is no space between paragraphs which some people don’t like. This is set using setlength{parskip}{0.25in} and package parskip, but it doesn’t work very well.
  • The first line of every paragraph is indented. This is adjusted with setlength{parindent}{0pt}.
  • The package ntheorem is used to produce a proper proof environment that automatically puts the end of proof mark (a square) in the right place, even if you end a proof with a displayed equation.

Place these files in the same folder and compile the skeleton file (the chapter and appendix files won’t compile on their own).

LaTeX Word Count

Whilst the concept of a “word count” is usually pretty irrelevant in mathematics, the university does unfortunately have certain regulations that apply to all theses and these include an upper limit to the number of words your thesis may have. For an MPhil mode B (which is almost everyone taking the mathematics MPhil course) it’s 15,000 words, for an MPhil mode A (which includes MPhil Qual theses and anybody who’s somehow ended up taking a mathematics MPhil without any taught modules) it’s 30,000 words and for a PhD it’s 50,000 words. To be clear, these are upper limits and it has been emphasised in the past by the university that most research theses are shorter. This is particularly true in mathematics, where short elegant methods are usually better than long complicated ones and length is no reflection on substance. There is no lower limit.

There are certain special allowances for higher limits when your subject matter makes this appropriate. You should probably know if this affects you, but if in doubt, talk to your supervisor.

Unfortunately, it’s not enough just to be confident that you’re under the limit, as the university requires you to declare the number of words in your thesis on submission. While I’m sure it’s expected that this will be slightly approximate, it’s best to be as accurate as possible, and this is where a wonderful little script called “TeXCount” comes in.

TeXCount is a Perl script that will count the number of words in a LaTeX document for you whilst successfully ignoring formulae, formatting information and suchlike and adding in the right number of words for commands like \begin{theorem}. It’s the most accurate program of its kind that I’m aware of and certainly seems to be more precise than word-counters that are built into some LaTeX editors.

If you know all about Perl scripts and what to do with them, then just download the script here and run it with your TeX file as a command line argument (use the “-inc” command if you have included files in your thesis, use “-v” and “-html” and send the output to a file if you want details). Be aware that the requirements ask that your count should exclude “supplementary material such as tables, diagrams, appendices, references, the bibliography and any bound published material”, so you may need to make a copy of your .tex file for word-counting purposes, taking out these elements (though TeXCount should ignore references by itself).

Note that the version of TeXCount you’re downloading here has been modified by Andrew Bailey to increase its accuracy. At the moment, this just extends to increasing the number of environments and macros that it knows how to handle.

If you don’t know anything about Perl scripts, here are some simple step-by-step instructions for running TeXCount on Babbage. Obviously, replace “thesis.tex” with whatever the name of your actual .tex (main) file is:

  • If you need to take out “supplementary material” of the form mentioned above, make a copy of your thesis .tex file(s) and remove the necessary parts from the copied files.
  • Download the program and place it and your (copied) thesis .tex file(s) in your home directory. This is not the same as your “My Documents” directory: it’s usually accessible as “Z:\” through “My Computer” on school computers.
  • Open PuTTy (pre-installed on school computers, easily found on the web if you don’t have it) or your favourite SSH program. In “Host name”, type and hit “Open”.
  • Type in your school username and password when prompted.
  • If this is the first time you’ve used TeXCount, type the command: chmod 700
  • Type the following command if your thesis consists of only one file: perl -v -html thesis.tex > wordcount.html
  • If your thesis consists several files with “thesis.tex” the “main” one, instead type: perl -inc -v -html thesis.tex > wordcount.html
  • Wait a few moments until the next line comes up ready for input on your terminal window. It could take a few minutes to do the count.
  • If you look at your home directory again, you’ll find a new HTML file, wordcount.html. Double click on it to open it up with your web browser. The word count will be right at the bottom. The colouring on your thesis TeX code shows you precisely what has been counted.

If you really can’t figure this out, there’s a web version of the script here, though I wouldn’t recommend it as it’s unlikely to handle large files (like theses!) well, it’s likely to be much slower and it does mean sending your entire thesis across the web for (potentially) somebody to look at, allowing them to steal all your mathematical secrets!

Full details on the TeXCount script are available here.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s