Astro-ThesisTeX

(latest update: 3-20-03, by C. Danforth) Writing a doctoral thesis is painful enough without the added frustration of LaTeX! Many astrophysics grad students are familiar with writing papers using the AASTeX package--an add-on to LaTeX published by the American Astronomical Society and the format of choice for most astronomical journals. JHU and most universities have strict formatting requirement for official disertations. Fortunately, there is a very useful package to put your generic LaTeX document into the approved thesis format (double spacing, margins that are just so, title pages, and all the rest). Unfortunately, the thesis package and AASTeX are incompatible and result in much bloodshed, angry words and general bad juju. Generations of grad students have coped with these technical difficulties through a mixture of hand-me-down code, vague rumors and experimentation.

Hopefully this document will make life easier for everyone...

Please note: This code is no longer supported (if indeed it ever was). I am very pleased that so many people have found it useful over the past five years, but I have moved on and can't afford the considerable effort required to keep it current with the latest versions of LaTeX and/or AASTeX. If nothing else, I hope that the solutions here will give you a place to start. If you run across a specific problem and find a solution you'd like to share, please send it to me and I'll be happy to incorporate your suggestions in the FAQ.

I wish you the best of luck!

Charles



Preliminaries

First things first: do you know how to use LaTeX? If not, much of this will be quite cryptic and not terribly useful.

Learning LaTeX: As always, the best way to learn is by example. Norman Matloff has created a nice page of introductory notes with simple examples and links to lots of resources. There's another nice primer and lexicon maintained by David Wilkins.

Familiar with LaTeX? Great! How about AASTeX? AASTeX is just a package of routines to optimize LaTeX for the astronomical community. There are loads of handy symbols, formatting options, bibliography tools, and other handy goodness. Moving on...


The Thesis Class and the files you'll need

Now for the actual thesis writing. You'll need the JHU Thesis style file written by Ian Goh. He has written
a nice bit of documentation which you need to read. Be sure to download the thesis class definition file (thesis.cls) and one or more the point size files (jhu10.clo, jhu11.clo, jhu12.clo) and save them in your local directory where you will be working. The files are also located on Ian's website http://engspec2.cer.jhu.edu/~ian/jhuthesis/new/v03.1/. There are various tags accepted by the thesis class pertaining to what kind of degree you're getting (PhD, MA, MS, etc) and the type of document (Dissertation, Essay, etc).

Writing Your Thesis in Eight Easy Steps

Time to start your thesis. There are several parts which I will go through in order.
  1. Preamble

    Every LaTeX document starts with a preamble where various styles, margins, and other options are defined. Every preamble starts with a document class and in this case you'll want something like \documentclass[10pt]{thesis}. This tells LaTeX to read the 'thesis.cls' class file to learn about margins, formatting and various other conventions different from normal LaTeX. In the example above, I'm using 10pt type, but you can change this to 11pt or 12pt.

    There are other lines in the preamble which install various other functionality. We'll deal with these later.

    The final line of the preamble is \begin{document} which matches an \end{document} at the end, the last line in your file. All your text, figures, tables and so forth will go between these two lines and are described below.

  2. Title Page

    \title and \author are pretty self explanatory. Next comes a line defining what kind of document it is. This can be any one of the following: \thesis, \essay, \dissertation; you'll probably want the last. Next comes what kind of degree you're getting: \masterarts, \masterscience, or \doctorphilosophy. Including the line \copyrightnotice puts in a line about how it's copywritten to you (whether or not you've actually filed the copyright paperwork is a separate matter). You'll also need to specify \degreemonth{} and \degreeyear{}. The command \maketitle turns the above information into a nice-looking title-page.

  3. Front Matter

    Next comes the front matter (tables of contents, abstracts, tables of figures and so forth). This is defined in a block bracketted by \begin{frontmatter} \end{frontmatter}. Inside you'll have an abstract bracketted by \begin{abstract} \end{abstract}. Your abstract shouldn't be more than 350 words and must include the name of your academic advisor (usually in the last sentence).

    Then come the three lines: \tableofcontents, \listoffigures, and \listoftables which will generate the obvious tables. The beauty of LaTeX is that, as the text changes, the page numbers on these contents lists will be updated effortlessly.

  4. Dedications and Acknowledgements

    Some people may wish to include additional information in the front matter. If you wish to acknowledge help, ideas or support (financial or otherwise), you can place this text between \begin{acknowledgement}\end{acknowledgement} tags. Typically, this will immediately follow your abstract both in your code and in the final printed text.

    Similarly, if you want to dedicate all your collossal thesis-writing efforts to some significant person, pet, diety, event or natural phenomenon, include a \begin{dedication} \end{dedication} tag. The dedication will appear, unlabeled on a blank page, immediately before the first chapter and after all the tables of contents and figure lists. Both dedications and acknowledgements are optional and their use varies by personal preference.

  5. The Text

    This is the real meat of the thesis and the part you should (quite rightfully) spend 99% of your time on. Presumably your thesis will be pretty large and will contain a hundred pages of text or more. It's convenient in a large document such as this to split things up into multiple files corresponding to individual chapters or sections and insert them appropriately with \input{file} or \include{file}. The difference between the two is explained in the FAQ. I have an include for each chapter which keeps my actual thesis.tex file itself pretty small and manageable.

    As for actually writing your thesis for you, I'm the wrong person to ask ;-)

  6. Bibliography

    After all the text, figures and whatnot that comprise 90% of the work, comes the bibliography. This should look something like this:
    \addcontentsline{toc}{chapter}{Bibliography}
    \begin{thebibliography}{} \end{thebibliography}
    The first line above adds the Bibliography to the table of contents. All of your references will go between the begin and end lines, as usual. The mechanics of citations and referencing is covered in more detail in my Natbib tutorial.

  7. Appendices

    Everyone likes appendices! It's where you get to dump your code, your massive quantities of data or huge tables. Readers skip them and it transforms your meager, skinny work into a two-volume bug killer. In the code, simply put in the tag \appendix when you want the appendices to start. From then on, use \chapter{Loads o' Data} as normal. The first chapter after the \appendix tag will now be called "Appendix A: Loads o' Data" instead of just "Chapter 7: Loads o' Data" and all the figure numbers, equations, and tables will be "Figure A.1" instead of "Figure 7.1", etc. Subsequent chapters called after this will be labeled B, C, D....

  8. Vita

    It seems silly, buy JHU wants a short 'about the author' at the end of your thesis. The vita page is the last page of the thesis and is a brief biographical sketch. This should record the date and location of your birth and the salient facts of academic training and experience in teaching and research. This may seem egotistical, but it's probably easier and more fun to write than any other part of your thesis so why not? As usual, there is a \begin{vita} \end{vita} tag. It should go at the end of your document, however, just before the \end{document} tag.

    See Randy Telfer's FAQ for information on how to get these to appear in your table of contents. When in doubt, read the actual thesis.cls file; it's not nearly as bad as you might think!

Incorporating the AASTeX functionality

Now here's where it gets interesting! Most astronomers don't know what to do without their AASTeX special macros. Unfortunately, the Thesis class and the AASTeX style aren't compatible! In order to take advantage of useful AASTeX commands like \ion, \citep and so forth extreme measures must be taken. Tim Hamilton, Randy Telfer, Larry Bradley and I (with trouble-shooting help from a host of others) have hacked up various files to include much of this functionality. These style files are called in the preamble with the \usepackage command. The package is called aastex_hack.sty and is available in the downloads section below.

I've also written a short routine called mydefs.sty which defines certain functions used frequently in my work. This could also be incorporated into aastex_hack.sty, or into the preamble (between the \documentclass and \begin{document} lines) of the TeX document itself instead.

File downloads

Here are the files you need:

FAQs and Tutorials

This is definitely a work in progress. Contributions from users have made the whole package and process easier. We have compiled a FAQ list to address some of the major and minor issues which have come up. You will, no doubt, come up with your own unique contribution and are encouraged to submit it. When in doubt, asking anyone who has been through the thesis process lately usually works.

The FAQ List

I've also created a set of limitted tutorials for various of the more complicated parts of thesistex. Specifically, natbib which does the citations and bibliography in a particularly nice way, the deluxetable environment which produces spiffy-looking tables, and figures which discusses the finer points of figure inclusion and referencing.

Putting it all together

That's pretty much it. Here's my thesis! That's All, Folks!


Please send comments, corrections and suggestions to Charles Danforth | http://fuse.pha.jhu.edu/~danforth
Last modified: Mon Nov 12 14:09:25 MST 2007