SVN and LaTeX

200th revision

For anyone curious about the process of managing a LaTeX document with the Subversion (SVN) version control system, I have to highly recommend it. Now that my dissertation is officially finished, I have a bit of time to explain the process I used to back-up, archive, and otherwise manage the beast.

The three major components of the computing end of my dissertation were Textmate (and the LaTeX and SVN bundles), Google Code, and of course LaTeX.

I set up a project at Google Code (free hosting for < 100 MB) which includes SVN access, a project wiki, and a nice web interface. Almost all of my LaTeX was written in the Textmate editor simply because it has a lot of useful macros and plugins including a feature that lets you drag and drop images to make figures (it automatically inserts the \begin{…} \end{…} code and has lots of other type-savers.

Another advantage of Textmate is built-in SVN support. The above screen capture shows the result of an SVN “commit” which happened to be my 200th revision. In the end, I had 202 revisions, but the last two were trivial (adding an updated figure file, and a little typo).

There is a fair bit of documentation out there about how to do each of these things individually, so I won’t reiterate any of the instructions here. I mainly want to suggest this approach to anyone who is managing a large document, or especially sharing the responsibility with multiple authors.

I don’t know if this was an intended use for Google Code, but it certainly serves the computing community well. If you are interested, the repository for my thesis (i.e. the source code) is available at http://code.google.com/p/dawes-phd-thesis/

About these ads

8 thoughts on “SVN and LaTeX

  1. Very interesting! I’ve been doing all my writing in latex as well, in the hopes that going into Thesis.sty for my university will lead to easy submission. I’m interested in version control, but haven’t ever used it, and the beast is a bit big and scary. :) My Prof. will never use it, of course… he tried a latex a couple times, and it just didn’t work.

    BTW, did you remove your files from the repository, or are they still there? I’m not sure I want to run a gcode repository myself… may try to set it up on my server, or run it in local mode only.

    Any pointers greatly appreciated. :)

    Cheers!
    -Allen

    Reply
  2. My files are still on google code in the repository:

    http://code.google.com/p/dawes-phd-thesis

    I started out with a local repository, but I found it much easier to just use the google one since it is off-site and then I can upload versions from my laptop, and then sync any other computers to the google version. This removed the requirement that I maintain my own server (and maintain access to it).

    I’m happy to answer any questions about it, but I was an svn newbie when I started, and I just followed the instructions google has for it’s code database. It worked really well, and I think I’ll do a similar thing in the future for grant proposals and papers (although maybe not a public repository!).

    -Andy

    Reply
  3. Pingback: Subversion and mac bundles « The Daily Photon

  4. There are also sites like http://www.scribtex.com which let you work with LaTeX documents completely online and feature full revision history, access control etc. It’s a good simple alternative to using SVN or some other source code management and provides almost all the required features.

    Reply
    • James, that is very cool. I’ve been hoping that someone would make that sort of thing work. I really like google docs and acrobat.com for collaborative authorship, but until you pointed it out, I didn’t know anything existed for LaTeX.

      Reply
  5. Pingback: Writing the PhD thesis: the tools Part I | Between the Candle and the Star

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s