LaTeX and BibTeX

HUMANITIES AND SOCIAL SCIENCES writers and researchers, a great secret is being kept from you. You know about C.P. Snow’s Two Cultures, and you’ve probably encountered scientific and technical types on the Internet, recognising them by their ferocious militant atheism, their communication through image macro memes, and their irrational fondness for light rail projects. When you sigh, minimise your web browser and get back to work in MS Word, though, their laughs are on you: it’s a horrible platform for writing, a worse one for presenting lengthy text, and there’s a much better alternative.

I’ve recently submitted—with relief—the major project of a Masters’ degree in Urban Planning. It’s lengthy, it’s chock full of figures and tables, it’s covered in citations, and it’s got an extensive bibliography, even an index. It’s a document which from start to finish did not involve any kind of regular word processor. I’ve enjoyed immensely using an alternative system. Brett Holman (of the remarkable Airminded blog) even wrote his PhD thesis in history in it.

LaTeX is a typesetting system that can be used, and is often used, to prepare lengthy documents for publication, from resum├ęs to journal articles to books. It’s not a processor or an application, it’s a system of markup and packages that turn text files into publication-ready material. It does this one job very very well, and it’s used by many publishers commercially to typeset books. You don’t get an animated paperclip, nor do you get fancy things like spell-checking, mail-merge, or the like: it just makes really good looking documents.

It’s all just text. If you’re comfortable with HTML markup (and if you’ve been paying attention to the Internet for the last two decades, you should be), you will not find it difficult to get familiar with LaTeX. Instead of being about what you see being what you get (the familiar marketing acronym WYSIWYG), it’s ‘what you write is what you mean’, where you get to determine what each piece of your document is.

Let me illustrate this with an example. This is a very very basic document, a very small text file consisting of the following lines:

\title{Use \LaTeX, you muppets}
\author{Liam Hogan}
\section{Section heading}
\subsection{Subsection heading}
This is some text \\
This is some \emph{italic text} \\
\quote{this is a quote}

Run through LaTeX it produces this output, in PDF:

The output of the document

You get the idea: text goes in, presentable document comes out. And you can probably work out pretty easily what markup does what job: \title{} and so on for the document’s basic properties, \section{} and so on for headings, and \\ for a line break, for instance.

It’s true that my little document above is, well, it’s a bit of a punch in the face in the eyes. That font is the frankly ugly Computer Modern, the typeface equivalent of synthesiser in bad early 1980s electronic music. But you don’t have to use it; you can set up whatever format you want, declare whatever properties for pieces of text you please, and with the rather excellent XeTeX extension, use any Type 1 font, in any language, that happens to be on your system.

But what of BibTeX? That’s a bibliography framework, for keeping your set of works to reference. You call on the bibliography in your latex file, and can determine how each is to be formatted: as Harvard, AMS, as footnotes, endnotes, or any other way. In another text file, you keep your bibliography, which consists of nothing more complicated than more text, like this:

  Author         = {Flyvbjerg, Bent and Bruzelius, Nils and Rothengatter,
  Title          = {Megaprojects and Risk: An Anatomy of Ambition},
  Publisher      = {Cambridge University Press},
  Edition        = {Cambridge},
  year           = 2003

Most importantly, once you’ve installed the system itself, you’re not restricted to text editors (like Notepad, or Notepad++, or TextEdit, or any other of a very large set). LaTeX editors abound: I’m fond of TeXWorks, but lucky Mac users have TeXShop available to them. Both of these applications automate the job of document processing, so you can click a button to turn the text file into the finished product. I used LyX for writing my major project, which takes away even the small work of markup: it’s effectively a word processor that typesets in LaTeX. Pybliographer does the work of managing the bibliography, and there are plenty of alternatives.

By the way, all the software to which I linked just now, including the LaTeX system? It’s free. I’ll just note that.

TeXWorks running on my computer

But this post isn’t meant to be a guide or manual. If you want to get started, you’re already more than resourceful enough to set everything up and start playing. Take my word for it, that if you’re anything like I am, the kind of person who (despite not having a technical background at all) likes to use computers to do interesting things, try it out.

Why you should use it

  • Because you’d like to just write instead of having to fiddle with the way the document looks—you set up your document, then spend your time putting your sentences together, and let LaTeX worry about the rest.
  • Because the output looks better. Look, trust me on this one. Paragraph spacing, kerning, ligatures and characters, there’s no comparison.
  • Because everything’s a text file, and will not ever corrupt on you or play silly buggers between different PCs.
  • Because you’re typesetting technical material including plots, diagrams and equations. I haven’t, but this is one of the strongest features of LaTeX—and why the scientists and engineers love it so.

Why you probably shouldn’t use it

  • If you want to collaborate with other people, it is not easy, not at all.
  • If you’re required to submit things in Word format, well, then that’s what you’ve got to do.
  • If you want an office suite that can do mass-merged documents or macros from spreadsheets, office suites like Word come into their own. You can do it with LaTeX, but really, you wouldn’t.
  • You don’t want to take on the steepish learning curve. Well, fair enough I suppose: but take this post as an example of what you’re missing out on.


Add a comment

This is a gravatar

Casey · 25 October 2012, 16:57 · #

Wish I’d known. Word was so unstable, it was terrifying.

This is a gravatar

Liam · 25 October 2012, 17:43 · #

I know exactly what you mean, Casey. Never again.

This is a gravatar

FDB · 29 October 2012, 12:10 · #

I’ve pretty much always written in a simple text program, then copied it into word for layout and editing.

Would much have preferred not to do that, but at least I was never afeared of losing work.

This is a gravatar

David Irving (no relation) · 31 October 2012, 23:16 · #

I love TeX. Donald Knuth is a living god (at least the last time I looked – I hope he hasn’t died, as I’m still hanging out for the rest of <em>The Art of Computer Programming</em>). Oh, and he has a pipe organ in his basement.

This is a gravatar

Fyodor · 1 November 2012, 21:49 · #

“Oh, and he has a pipe organ in his basement.”

Don’t we all?

This is a gravatar

Liam · 2 November 2012, 17:18 · #

I thought that was going to be a much more work-unsafe link, Fyodor. Oooh-errr.

This is a gravatar

Fyodor · 5 November 2012, 13:04 · #

Too obvious. Plus: (literal) pipe organs are genuinely funny.


Now tell me that didn’t raise a chuckle.


Commenting is closed for this article.