Thursday, August 4, 2011

LaTeX: 1 Year Later

I've been using LaTeX for a little over a year now. I've written a few papers with it, I've used it for classroom materials, and my job application materials were mostly written in LaTeX last year. Now that I'm a somewhat experienced user, I thought that it might be helpful to collect my thoughts about it. Is it worth the effort to switch?

First, some things I continue to dislike about it:

  • Window proliferation. For every document you're working on, my TeX program (TeXShop for Mac) produces as many as three windows: one for the text document, one for the typeset PDF "output" document, and a "console" window in which the program shows its work as it produces the PDF from the text file. That's fine if you're just working on a paper, or whatever. But if you've got a paper going, and a lecture for your intro class, and a handout to go with that lecture, and a lecture for ethics, and a handout for that lecture, you've got a lot of windows open. I try to be vigilant about closing consoles, but there's another problem in the vicinity...

  • Document proliferation. The process of creating nice-looking PDFs involves the creation of a bunch of auxiliary files. And if you forget to use the console to trash them before you close it, it's a (minor) pain in the ass to get rid of them all. And if your document contains a bibliography, you need those auxiliary files.

  • Certain things take longer, because you have to learn how to do them. Make an abstract; make a numbered list that starts at 5; making a space show up in the PDF after '\textonehalf'; stuff like that. These are all things that I figured out how to do without a huge amount of trouble, but they wouldn't have been any trouble at all in Word.

  • All in all, these are pretty minor annoyances, though.

What do I like about it? Why have I stuck with it?

  • It's not Microsoft Word. Whenever I am asked to open an MS Word document, I whine a little inside. "Do I have to?" I cannot stand MS Word. I particularly hate it now that everything is a "Docx" file and I'm still using Word from '04 or whatever. Word's conversion process makes opening and saving documents take forever. And causes the program to crash. It sucks.

  • It is free. Subsequent software updates have been free. New versions of the software are also free.

  • It makes PDFs, not Word documents. Everybody has at least one free PDF reader. No BS conversion to make my old-ass version of Word read your newfangled "docx" document. Nearly every computer in the world has the software for reading PDFs already installed.

  • The documents do look awfully nice. They do not look like they were made with free software. This isn't such a big deal with paper drafts, but I like to hand out nice, professional-looking handouts in my classes and (especially) at conferences. And I like my application materials to look polished and professional.

  • Bibliographies. I love--love--not worrying about bibliographies. I love not having to remember to add each reference to the bibliography whenever I add one. (Although you do have to keep your bibliography file up-to-date. But that's helpful, too.) I love not having to remember to take the reference out of the bibliography if I delete the reference in the main text. (Although that happens less frequently.) And I really, really love not having to mess with the bibliographic format. Mind wants it one way but Phil Review wants it another? No problem whatsoever. (Not that I've had this exact problem.)

    • A minor problem here is that you have to keep track of your bibliographic entries in a separate program (I use BibTex BibDesk, which comes with the TexShop bundle). But I find that helpful, too. Before LaTeX I was using a spreadsheet to keep track of the bibliographic information and physical locations of my many, many photocopied journal articles. BibTex does the same thing, but better.

  • Symbols really are easier. You might have to google it, but the symbols you want are there and easy to implement. The symbols menu situation in MS Word is really tragic. There are a large number of different "symbols" menu/tables, some of which are very long, and none of which has all the symbols you want. So if you want a "times" symbol, you're looking in one table; if you want a universal quantifier, you're looking in another; and if you want, say, a curly greater-than-or-equal-to, you might just end up copying it out of some webpage.

  • Last year I didn't like way LaTeX handles quotation marks, footnotes, word counts, and the general user interface. I am mostly over these problems now. The TexShop word count application sort of sucks because it counts the words in your preamble and stuff. But if you know how many words there are in your preamble, you can work around this. And it doesn't count the stuff you've "percent signed," so that's nice.

  • Speaking of which, the percent sign thing comes in really handy when you're "conference-izing" a paper. (Quick note of explanation: when you put a '%' in front of some text in LaTeX, the program ignores whatever comes after it until you hit "return." This comes in handy when you want to write a little note to yourself, or block a command in the preamble, or whatever.) In this way, you can cut out large quantities of text from the main PDF document without deleting it altogether. And the word count function ignores it even though it's technically still there. And so you can just as easily put it back.

So, what we've got here is a free, highly functional word-processing program that makes nice-looking pdf documents and makes your bibliographies in whatever style you want for you, by itself, without you having to do anything other than keep track of the stuff you've been reading.

--Mr. Zero


Anonymous said...

You should use this for counting words:

Also, Latexian is by far my favorite text editor for mac. You have pay $29.99 for it after a free trial, but I think it's worth it. The live preview function alone is worth it, I think. It is especially helpful when you are learning to do new things.

Sebastian said...

I have a dedicated LaTeX-directory from which I run pdflatex. From there, I run

A='nameoftexfile' && pdflatex /pathnameoftexfile/$A.tex && xpdf -remote somestring -reload && cp /pathnameoftexfile/$A.tex /webdav/backup/

for the LaTeX file ('xpdf -remote ...' reloads the pdf-file in my pdf-reader. Under OS X, I use Skim, which does that automatically. The rest is for backing up the file because my harddrive is old and I also need to use the file in two different locations with different computers.) Then

bibtex $A

makes the bibliography. The effect is that I have all the extra files in one single directory.

By the way, if you just want a free document editor that produces PDF files if needed, I can recommend LibreOffice ( Of course, the output is not as polished as pdfTeX's output (especially with the microtype usepackage), but it is a nice, no-cost stand-in for MS Office.

Anonymous said...

To avoid the clutter of extra files, try

latexmk -c -pdf

To avoid the pain and mental clutter of actually writing in LaTeX, try writing in pandoc's extended markdown instead.

Brad said...

I assume you mean that you use BibDesk for bibliographies.

My preferred method for an accurate word count is to use the detex utility included with the MacTeX distribution. This simply takes a LaTeX file as input and strips all the meta-data. To get a word count on file x.tex, you type this into the command line:

detex x.tex | wc -w

The number that appears is your word count.

(You may need to add /usr/texbin/ to your PATH variable in order for that to work. If that makes no sense, I can say more).

Anonymous said...

Thanks for posting this. I started with LaTeX about when you did, but didn't stick with it. Your posting makes me wish I had. What can be done for those journals that still want Word documents? I use Pages myself, and that conversion isn't great. Is there a LaTeX to Word converter? Or do you have to get a PDF to Word converter? Like you, I'm on a Mac.

Mr. Zero said...

Hi Brad,

Thanks for pointing out the error about BibDesk.

If you wouldn't mind explaining the wordcount procedures in a bit more detail, I'd appreciate it. Obviously I know exactly what you mean, but it's possible that some of our readers will be confused. Not me, of course. But somebody.

Hi Anon 7:10,

You ask:

What can be done for those journals that still want Word documents?

I had this just once. I didn't do anything too sophisticated. I just copied the entire PDF and pasted it into a blank word document, and went through and did all the formatting by hand. It was somewhat of a pain in the ass, but it only took about a half hour and I caught a couple typos.

Jeff M said...

I love (Xe)LaTeX, but one thing that sucks about it is the way it handles tables. What could be done in 5 minutes with a table-draw function and some quick data entry takes a half hour in LaTeX, even with the hokey tables tool (MacTeX). Phonology data sets are a nightmare.

Terminology note: in case you weren't aware, "percent signing" lines of code in LaTeX is called "commenting" them out (this terminology is common to all programming).

Anonymous said...

For the wealthy (or the criminally minded), Adobe Acrobat Pro enables you to save PDFs to Word documents. It's not perfect, but at least you don't have to remove all the LaTeX tags from your document.

scoobertron said...

I love latex and wish I had found it sooner. A big advantage for me is that it allows me to use the best text editor in the world - vim - to write my thesis (this also solves the proliferation of windows problem - though you have to be happy with working with the source text directly). Another nice feature of working with plain text files is that there are lots of nice tools for working with plain text - especially on unix/linux systems. Wc was mentioned above, things like grep and diff make it trivial to search a whole bunch of text files for an author's name for example, or to show how two drafts differ. Or using sed to make corrections across a group of files (so suppose I have 100 files where I failed to capitalise or italisise a word - this is one command for sed, without even needing to open a document, compared with opening each one in turn and doing a search and replace).

Anonymous said...

for conversion to word documents, I use LaTeX2RTF. Free and very easy to use. Not perfect for symbols, though.

Anonymous said...

I know this will sound like an advertisement, but...

TexMaker ( is
1. free
2. has a live preview function,
3. has a "structure" palette allowing you to quickly move between sections of your paper,
4. has a quick symbols palette, and
5. allows you to split *one* window, keeping your source code in one half and the .pdf preview in the other. So it solves your window management problem. Admittedly, this feature is less useful on a laptop if your screen is not gigantic.

TexMaker is also available for every major operating system. So if you happen to use machines with different operating systems (e.g. you use a Mac at home but are required to use Windows machines at work), then you can use the same Latex editor on all machines.

Also, I don't know if you use virtual desktops, but doing so is one way to keep your windows proliferation under control. On Macs, you can use "Spaces", which allows you to place different applications on different virtual desktops. To show you how easy it is, here's a 12 year old giving a tutorial:

Anonymous said...

I'm with scoobertron. Avoid the proliferation of windows by using vim. On a mac, use MacVim. And why do you need all these windows? Are you obsessively looking at a PDF or DVI preview?

But pace scoobertron, for searching through lots of files, ack is better than grep ;-)

If you write in plain vanilla LaTeX (which you should anyway: futzing with LaTeX too much is no better than futzing with MSWord too much), pandoc can do a plausible job of converting between LaTeX and OpenOffice ODT files, and you can then use OpenOffice (or LibreOffice) to convert the ODT file to a DOC or RTF file.

Seamus said...

As for auxiliary file proliferation, there's a couple of good ways to deal with this issue suggested here:

Also, the stack exchange community is friendly and helpful if you get stuck with something.

And window proliferation isn't an issue if you use something like vim or emacs.

As well as the already mentioned advantages, working with plain text files means that you have indefinite backwards compatibility. Donald Knuth's TeXBook was written ~30 years ago and you can still compile it today. I challenge you to find a word document even half that old that you can still read without hassle.

Not to mention the advantages of version control...

Chris E said...

Also on auxiliary file proliferation:

I have the (Mac) application Hazel, watching my Articles folder and subfolders, with rules that delete all these auxiliary files after a certain interval since they were last modified. Usually it's two days or so. It cleans up files for papers I'm not currently working on.

If such files are needed in the future they can be created anew. Though this will require multiple runs, latexmk automatically runs the tex engine the necessary number of times, so they will be created.

Brad said...


Here's how to add /usr/texbin/ to your PATH variable:

1. Open Terminal (it's in Applications/Utilities).
2. Type:

echo 'export PATH=/usr/texbin/:$PATH' >> ~/.bash_profile

Note: You'll need to restart Terminal (or open a new tab) for this to take effect.

Here's how to make sure you are in the right directory before you execute the command I suggested:

1. Use command "cd directory/subdirectory/subsubdirectory" and so on to change directory to where your .tex file lives.

Some tips:

After typing enough of a directory name to uniquely identify it, you can hit the escape key twice to have it automatically completed.

Typing "pwd" shows you the current directory.

Typing "ls -l" shows the contents of the current directory.

Sebastian said...

I actually had to convert my stuff a few times into MS Word format. Since I usually have some formulas in my texts, that was never a nice experience when I had to copy and paste from the PDF. Now I am using TeX4ht ( to produce ODT output, which I can then open with LibreOffice and convert to MS Word and basically any other format.

Sidenote: For some reason the 'oolatex' command provided by TeX4ht has never worked for me. But the command

htlatex filename.tex "xhtml,ooffice,early_,early^,bib-" "ooffice/! -cmozhtf" "-coo -cvalidate"

works. This converts the whole text with formulas and bibliography.

Anonymous said...

I'd like to suggest checking out LyX ( as another option for producing Latex documents, but without the coding, and the other small annoyances of using Latex. Basically it has a 'Word' style interface (more or less, there are some differences) in that it (in most) cases displays formatting instead of the code, including math symbols - however you have to know the code to write in the symbol you want (so you type in '\forall' and it dispalys an upside down A, same for font formatting). It can also handle citations and bibliographies without the need for seperate files, you just point at your .bib file and choose your format, then it reads the .bib file and gives you a window to choose which references you want to insert. It also does not open a console window when compiling and only saves a pdf (or whatever other of the several formats available, including html odt and rtf) if you tell it too, so when working on a draft you only have one .lyx file.

Could not agree more about how much MS (Word) sucks. Let me echo a suggestion above about trying LibreOffice as an alternative. It can open docx files, and save them too, if you need that functionality, but you don't have to have MicroShit on your computer. And it's free.

For those using Linux, or willing to move to it, Kile is a Latex front end worth checking out.