Why use LaTeX?

Why learn LaTeX?

I think this is a good question. And to be honest, for some people there is no good answer. Some people should just stick with a word processor (though if they use a Mac, they might consider something like Mellel, which is really great). Though I hope to help lessen the learning curve of LaTeX with this guide, the fact remains that writing a document in LaTeX is not as easy as opening up a word processor and writing a paper. But LaTeX does have its advantages. For me, when comparing pros and cons, LaTeX wins out over word processors.

There are a handful of fun pages out there that details various reasons to prefer LaTeX to a word processor. I find the CTAN page particularly informative, and Dario Taraborelli’s page on The Beauty of LaTeX both interesting and compelling. Allin Cottrell’s Word Processors: Stupid and Inefficient is as fun and interesting as the title provocative. (For a rather comprehensive comparison between word processors and LaTeX (which focuses on how to do things in LaTeX you already know how to do in a word processor), check out Guido Gonzato’s LaTeX for Word Processor Users.) My aim in this page is to explain why I, as a philosopher, prefer LaTeX to a word processor. I’ll do that by first explaining the initial reasons that I wanted to learn LaTeX, then explaining what I now think are the virtues of LaTeX over my old, word processor-using ways.

Initial reasons to switch

Formatting headaches

I started using LaTeX on my Windows laptop in the summer of 2009. I had just finished the mind-numbing process of trying to get a dissertation to look right in Word. It wasn’t easy to get the thing to have a consistent look; my hopes for that consistent look also being attractive were quashed early in the process. I have a friend who swears he has never had a problem with Word imposing frustrating (and mistaken) formatting on him. I am not certain I believe him. If you have ever had your word processor insist that your paragraph be block indented, or that you meant to start a numbered list, or that you wanted this new footnote to be in 12 point font even though all the others are in 10 point, then you understand the frustration you get with a What You See Is What You Get word processor.

Why LaTeX is better: You don’t get that with LaTeX. You type your document without worrying about the final look. You put text in a footnote if it is a footnote. Making the footnote look right is a separate process. What is more, all the formatting stuff is handled in one, central location at the start of the document. So if you want all your headers to be in a sans-serif font but the body of the document to be in a serif font, you just specify that once in the prologue of your document and LaTeX will take care of it when you typeset the document. As proponents of LaTeX are wont to say: LaTeX separates content from presentation. (I know that the skillful use of styles in a word processor can ease some of these problems. I don’t claim LaTeX is the only way to get any of the advantages I specify here.)

Bibliography management

Managing the bibliography for my dissertation was quite a chore. The task of making sure every paper I cited in the text or a footnote was represented in the bibliography, and that every text in the bibliography was actually cited in the text was not a fun one. It isn’t so bad if you have one paper by an author. But when you have multiple papers (in the same year even), bibliography management gets cumbersome and error prone. You need bibliography management software, whether you use a word processor or LaTeX. I didn’t know this when I wrote my dissertation. I wrestled with citations the way I think many word processor users do.

Why LaTeX is better: You can get good bibliography managers that work with various word processors. LaTeX comes with this functionality built-in. (Plus there are free programs that make interacting with your LaTeX bibliography, keeping your references in order, etc. a breeze.)

Price

I was getting ready to buy a new computer when I tried out LaTeX. There really are a lot of great alternative word processors out there, and as I prepared to switch from a PC to a Mac, I looked at a number of these pretty seriously. Though OpenOffice (and its Mac-specific counterpart, NeoOffice) is free, most word processors are not. There were lots of programs I was looking forward to spending good money on. I was not thrilled at the prospect of dropping nearly $200 on Word (that is the price from Amazon today!).

Why LaTeX is better: This should be an obvious one. LaTeX is free! And so are the external bibliography managers you can use to easily interact with your bibliography file. (For more on bibliographies, see my page.) And so are a handful of really great text editors you can use to write your documents (one great editor, TextMate, is not free; but it is the exception). Add to that the fact that the community in the LaTeX world is so friendly and generous, and you are really starting to get some value for your money!

A word on the LaTeX community. I had lots of problems using Word on my PC. But I never tried to get customer support because I figured there wasn’t any way to fix the problems I had (described above). But when I have a problem with LaTeX, I’m typically convinced there is a solution. And with a careful search and little bit of time, I have been able to find a helpful answer online for every problem I have had with LaTeX. That, to me, is huge. I knew the LaTeX community was good when I got started with LaTeX; but I have been surprised with just how helpful they are. (And I haven’t even had to email a question to one of the active and helpful mailing lists.)

If you need help, take a look at latex-community.org/, which has an active forum. Or you could join, then ask your questions to, one of the many LaTeX mailing lists (be sure to check the list archives to see if your question has been answered before you send your email). Texhax is a general mailing list, and there are specific lists for the MacTeX (for Mac users) and MikTeX communities.

Current reasons to favor LaTeX

The reasons I started using LaTeX aren’t exactly the reasons I prefer LaTeX to a word processor now. I do still endorse the reasons above, but I have five new reasons to prefer LaTeX.

Plain text files

I really like plain text files, and LaTeX files are plain text. That means a few things to me. First, they are small (the Word version of one of my papers is 127KB, the Pages version is 279KB, and the .tex file is 57KB.) Size isn’t a huge issue, but smaller files are easier to email, etc. Second, you can open and edit them using any text editor. This is huge to me. It means that if I have to switch to Linux or FreeBSD or Windows, my papers can go with me with no compatibility issues. And it means I avoid the incompatibility problems that come with upgrading software (e.g., when you can’t open your student’s papers because the new .docx or .pages files for Word 08 or Pages 09 cannot be read by your Word 04 or Pages 08). My documents are mine. They are not locked into anyone’s proprietary format. I like that. A lot.

Version control

The second reason also depends on the fact that my files are plain text: I can use a fantastic version control system called git. A version control system is a way of keeping track of changes you make to your file. If you are tracking your paper with git, then you can try a major structural change to your document and, if it turns out to have been a mistake, you can very easily erase all those changes and go back to the old version. This keeps you from having all those ‘paper_d1’, ‘paper_d2’, etc. files in your folders and either (a) not remembering the difference between any two drafts or (b) having a third file where you try to keep track of things. (There are other benefits of a VCS; but this alone is big for me.)

I believe that some word processors have fairly good revision control features (and if you use Dropbox you get a version of this). And there are certainly other version control systems that rival git; but git has changed the way I work. I love it. And I wouldn’t be able to use it were it not for the fact that my papers are written in LaTeX and saved as plain text files. (I should give a hat tip here to Mark Eli Kalderon. I learned about git (and a fair bit about LaTeX) by reading his excellent blog. I highly recommend it.)

Text editors

One more reason I like the plain text-ness of LaTeX documents: I can use a great text editor to write my papers. I had never heard of Vim until a few months ago. I started out writing my papers with the default text editor that comes with MacTeX, TeXShop. I think TeXShop is great, but I think Vim is better! Text editors are sensitive subjects, and Vim is not the best editor for everyone. But I love it.

I plan to write more about Vim over at my tech related blog, PhilTeX, but here, super-briefly, is why I love Vim. Vim is a modal editor. That is, it has multiple modes. The two most frequently used are NORMAL and INSERT mode. If you are in INSERT mode, you are basically using a text editor like any other (like TextEdit, TeXShop, TeXworks, etc.). You type dd and you get ‘dd’ in your document. If you hit the escape key, you will switch over to NORMAL mode, however. That is where the magic happens. In NORMAL mode, each key gets a new meaning. These are all aimed at helping you edit your document efficiently. If you type dd in NORMAL mode, you delete the entire paragraph the cursor is on; type a ~ and you change the case of the letter under the cursor; type ddGp and you delete the current paragraph, move to the bottom of the document, and paste that paragraph there. Learning all the alternative meanings for the keys is sort of difficult, so it would be a bad idea to pick up Vim when you are trying to learn LaTeX. But I find that one of the most frustrating parts of writing is editing—cutting these three words then making the ‘i’ at the start of the next word a capital. This is just tedious and time-consuming, and Vim makes it less so. (For the record, a simple d3W~ would do this in Vim.) You can only edit text files in Vim, and since all my LaTeX papers are text files, I get to use Vim to write and edit them.

The output

When I started thinking about switching to LaTeX, I read all these arguments that LaTeX documents are just so much better looking than documents produced by a word processor. I wasn’t really swayed. I could sort of see it, but not really. After writing papers in LaTeX for a few months, I am a convert. They seriously look so much better than those written with a word processor. This should be no surprise—LaTeX is basically a professional typesetting system—but it was kind of surprising. Especially when, after writing only in LaTeX for three or four months I got my Word-produced, bound dissertation in the mail. It isn’t pretty (but I like the arguments!). If only I had switched to LaTeX earlier…

Formatting

Time spent messing with formatting is an investment, not a waste. If anyone tells you that you can write your papers in LaTeX without having to fiddle with formatting, they are lying. You do have to work with LaTeX to get your papers to look the way you want. And you will run into a few places, more than likely, where you can’t figure out how to get LaTeX to behave and must look for help from someone. But there is a difference between time spent working on the formatting of a LaTeX document and time spent working on the formatting of a Word document.

Where with a word processor you are trying to get this particular footnote to look like all the others, in LaTeX your changes are global; so while you might spend some time learning how to make your ordered lists look a certain way, you can add whatever you learn to the prologue of your document template and your ordered lists will look that way from here on out. The time you spend is usually more of an investment than it is with a word processor. You aren’t fixing this problem, usually you are fixing a whole class of problems—this problem now, and related problems in the future.