# LaTeX: the pain, the pleasure

As befits a self-respecting Unix geek, I've pretty much finally decided that I will write my thesis in LaTeX, and not in Word (which is what I have been using for the last few years). I am a bit nervous about this. Most historians, I'm sure, have never heard of it, and indeed the typical LaTeX user would be working in the sciences (which is where I first learned to use it, many moons ago; among other things, it's great for equations). There's not a lot of support for using LaTeX in the humanities.1 The Astrophysical Journal may prefer papers to be submitted in LaTeX format, but the Journal of British Studies probably wouldn't have any idea as to what to do with such a beast.2 Since none of my colleagues will know how to use LaTeX, it's next to useless for any collaborative work. But all that is get-around-able, because I can switch back to Word if need be. The big problem, though, is bibliographical management. EndNote can't work with LaTeX in the same way as it does with Word. That means I either enter and format all citations by hand (urk), or use BibTeX-oriented software. Which is fine ... except if I ever decide I want to go back to Word/EndNote, either temporarily or permanently, then my bibliography will be in BibTeX, which of course Word can't handle. It is possible to convert from EndNote to BibTeX and vice versa, in theory, but in my experience this isn't very unreliable. EndNote can export directly to BibTeX, but the resulting file isn't readable; I had better luck exporting to RefMan (RIS) format instead. Unfortunately, for some reason this abbreviates authors' first names to just their initial, so I will have to key those in by hand.

So much for the pain. What's the pleasure? Well, for one thing, the result looks so much better than Word. It is very easy to produce a beautiful document in LaTeX. It's the kerning ... the justification ... it's just the vibe. More importantly, LaTeX separates form from content. When writing in Word, I find that I get hung up on how the thing looks, and distracted by trying to massage its appearance. In LaTeX, you just write, and worry about that stuff later. And when producing large and complex documents (like a PhD thesis!), LaTeX comes into its own: when you do need it, you have the power to specify exactly where to place that table on the page - whereas Word will put it wherever it thinks best and you have little say in the matter. In fact, LaTeX can be (and is) used to typeset entire books. The other main advantage as I see it is that LaTeX files are just plain text files, where Word uses a binary format. Which is stupidly easy to corrupt.3 This is the safest and most portable format around, and it helps that LaTeX is available for Windows, OS X and your various Unices and Unix-work-alikes. (For more comparisons, see here (with pictures!) and here.)

OK, but just what is LaTeX? It's actually not strictly comparable to Word, because it's not a word processor: it's essentially a markup language, like HTML. So for example, in HTML the first sentence in this paragraph would be written like this:
 OK, but just what <b>is</b> LaTeX? 
In LaTeX, the equivalent is:
 OK, but just what \textbf{is} LaTeX? 
And so on. Then you run 'latex' on the document in order to produce the output (these days, generally a PDF file) - just as a web brower parses a HTML page. There's a handy cheat sheet here, and a useful collection of installation and usage links here.

Frankly, LaTeX is hard to get the hang of, especially coming from the WYSIWYG world, and typing out the various commands is a bit tedious. But there are tools which make the process a lot easier (and this is the biggest improvement from my days as an astrophysics postgrad, when I used vi exclusively). I'm on OS X, and my favourite LaTeX editor is TeXShop, but there are others. To manage my bibliography, I'm using BibDesk (and for the humanities, the jurabib bibliographic package is a must - specifically the Oxford style, jox.bst, as Chicago support is poor).4 I'm currently going through my ex-EndNote bibliography, fixing up the first names and adding keywords (PRImary/SECondary, OWNed/LIBrary/UNSeen) as I go. This will be a good thing to finish, because I had been deferring adding new entries until I made a decision to go to LaTeX/BibTeX or stick with Word/EndNote, and instead writing them down in little text files here and there, and it was all starting to get away from me!

So is this a good idea? Come back in three years and I'll tell you ...

Update: for some reason, I've re-edited this entry about 10 times since posting it. The most important thing I forgot to mention is that all of the LaTeX/BibTeX tools mentioned above are free - an important consideration for postgrads! LaTeX is open source software, and pretty much all the related tools are too, though I think there are some commercial LaTeX editors.

### Possibly-related posts:

1. Though there are in fact some users in the humanities, as the comments to this Crooked Timber post show.

2. Though actually, it seems that most history journals only accept paper manuscripts. How quaint!

3. To be fair, this seems to happen much less often than it used to.

4. MAKEBST might be another way to go.

This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License. Terms and conditions beyond the scope of this license may be available at airminded.org.

## 50 thoughts on “LaTeX: the pain, the pleasure”

1. Chris Williams

One day I will make the Great Open Source Shift, and LaTex will be part of the package. But til then, compatibility issues force me to stick with evil Bill.

Neal Stephenson had a lot to say about this issue in _In the beginning was the command line_ and very funny it is too.

By the way, are you interested in Norweigian airmindedness, or is that just getting silly?

2. Brett Holman

Post author

I'm glad to hear that the idea is at least on the back-burner - makes me feel somewhat less of a freak :) Waiting is not such a bad idea - the useability of LaTeX has improved out of sight in the last decade or so, and will probably continue to do so; and I'm hoping that there will be similar advances in compatibility. If I could switch back and forth easily between Word/EndNote and LaTeX/BibTex, I'd have no qualms ...

Norwegian airmindedness? Sure, why not - though for some reason it sounds like a Monty Python sketch!

3. Don't care how open-source it is, if it produces unlinkable, unsearchable, bandwidth-hogging pdfs it's anti-Internet. PDF must dieeeee!

4. Brett Holman

Post author

Well, since I am using it to produce something that's even more unlinkable and unsearchable (not to mention unreadable!), I don't much care about that :) Anyway, if you must have HTML, there are plenty of tools to convert LaTeX to HTML or other forms of hypertext. Here's one: TeX4ht. I've just tested it and it produces very nice output, style sheets and all. (It came with the version of teTeX I have on my computer, the most popular LaTeX distribution.)

5. I don't think that LaTeX is any more bandwidth-hogging, unsearchable, or internet-unfriendly than Word documents. (And with Google and academic databases providing PDF search and fulltext in PDF, I'm not sure PDF is all that internet-unfriendly anymore, anyway.)

You might check out XeTeX for OSX; it allows you to use native OSX typefaces, and it produces gorgeous output.

6. Brett Holman

Post author

Thanks for the tip, Alan ... font selection was something I was wondering about. And the output is indeed quite pretty.

7. There was/is a WYSIWYG version of LaTeX for a fraction of the price of MS Office. What do they call it? Scientific Word...

This way we'll never get scholars to use it!

8. jw

There are a variety of free WYSIWYG LaTeX editors. The best for Windows is TeXNicCenter (which uses the free MikTeX distribution for Windows), while LyX is the oldest. I make my TeX documents with vim (www.vim.org) because I need a powerful text editor (see the 7 habits of effective text editing at http://www.moolenaar.net/habits.html).

As for fonts, it's true that the default Computer Modern Roman fonts are bitmapped and thus jagged at high resolutions, which is why most journals require you to use vector fonts. You can either use the font packages (I use mathptmx for Times Roman + math symbols) or have dvips automatically handle this for you.

Regarding output, TeX produces DVI files by default, which most people then convert to the format of their choice, with Postscript, PDF, and HTML being the most popular choices.

9. Brett Holman

Post author

Feh, I've written two LaTeX theses plus assorted papers, manuals, etc, in vi (which I still use every day for other tasks - well, technically I use vim now) before, I'm enjoying the LaTeX GUI experience this time around. Apparently, though, TeXShop and vim can interact to some degree, so maybe I'll play with that.

About DVI, as you say most people convert that to something more useful; TeXShop just does that out of the box, cutting out a step. I could send my supervisor a DVI file of my thesis, but his response would be something along the lines of "?" :)

10. Brett Holman

Post author

PK: yes, I remember Scientific Word, I think that's what I was thinking of when I referred to commercial LaTeX editors. And you are right about the name, it would have history professors running away in droves!

11. Pingback:

12. Brett,
Thank you, thank you, thank you, thank you! I used LaTeX years ago, but only for scientific writing. But now I'm starting my dissertation in theology (at University of Notre Dame) and want to use LaTeX for it, but I was unhappy with every single style file for BiBTeX I could find. They're mostly for computer science journals, quite understandably of course. Your blog provided the only non-broken link to a humanities-oriented style system I could find. What a fabulous package jurabib is! So from another humanities grad and Linux geek (not many of those), thanks again! And thanks and thanks and thanks. Good luck on your dissertation.

13. Brett Holman

Post author

Hey, no problem, I'm glad my post was useful! Yes, jurabib is great, I was getting very frustrated with all the other styles I could find and so was faced with the choice of either writing my own style from scratch (oh, fun) or giving up on LaTeX and going back to Word or at least something non-LaTeX.

It's good to hear of other LaTeX users in the humanities. You might be interested in another LaTeX post I wrote, about how to set up multiple bibliographies -- again, probably not something computer scientists have to do much of ...

Good luck with your thesis (dissertation) too!

14. Writing your own style from scratch? That's crazy talk. I tried to edit the .bst that was available from students at my university and even that was a nightmare. No comments at all, ugh. Anyway, so your post saved me from that fate worse than death. However, the university-specific style file I've found (luckily, it's playing well with jurabib) does allow for multiple bibliographies, although I don't think I'll be using that option for my dissertation. No clear enough distinctions between categories in my sources. Thanks though.

All the best.

15. Ruth

Wondering if you might be able to help (sorry if this is hideously non-geek and anti-internet-etiquette, can I claim to be a newbie?) - I'm currently writing my thesis in LaTeX, which wasn't a problem, until last week, when I showed my supervisor my bibliography which I'd compiled using Bibdesk and jox.bst, and he says that the last bits aren't right (according to the MHRA). I need my book references, for example, to look like this:

Tom McArthur, \emph{Worlds of Reference: Lexicography, Learning and Language from the Clay Tablet to the Computer} (Cambridge: Cambridge University Press, 1986), p. 59.

ie, with place, publisher and date in parenthesis. This doesn't seem to happen with jox - is there an easy hack I can do? or should I be using a different style file?

Again, apologies for butting into your blog!
Many thanks!

16. Brett Holman

Post author

Ooh, I think I know this one! The odd thing is that even though you already are using jox.bst, you also need to specify the oxford option in usepackage (that puts the parentheses in, among other things. At least, when I take it out, the parentheses go away ...) There are probably a few more options you want, these are what I'm using at the moment:
 \usepackage[ titleformat=all, titleformat=commasep, commabeforerest, ibidem=strict, citefull=first, oxford, authorformat=allreversed, ]{jurabib} 

I'm not sure how to get it to say "p. 59" instead of just "59", the above doesn't do that but then my local style guide doesn't require it anyway. There are a couple of minor things I can't get jurabib to do but they should be easy enough to hack when the time comes ...

17. Kimberly Belcher

Ah! I should have kept checking this post, evidently. If Ruth's still reading, I think the documentation indicates that adding the option "pages = format" in that usepackage call will automatically add "p." or "pp." to each reference. Brett, how on earth did your blog become a humanities LaTeX help forum? Did you dream of such an outcome or are you disappointed? Speak right into the microphone, please. Oh, and Ruth, I think asking random people for help is downright geek and internet, actually.

18. Brett Holman

Post author

It's a bit surprising, actually, but I'm glad if it's of any help to other humanities LaTeX users. It probably suggests that there are more of us out there than one might think, and it definitely suggests that there is a severe lack of resources for us!

And you know, I don't think anybody who uses LaTeX has cause to be concerned about losing their geek status :)

19. Ha, good point there. What's more, it really is positively part of geek culture to want to make the process easier for others. I think it grows out of the cycling frustration and exhilaration of having to figure it out yourself (like the title of your post indicates). Not to mention the not-so-benevolent pleasure of being asked a question you can answer. I wonder if a humanities LaTeX forum would be a useful addition to the net? What do you think?

20. Brett Holman

Post author

I was wondering that myself ... I guess there would need to be a critical mass of (at least semi-regular) forum members for it to take off. As well as, I guess, enough problems and answers to make it worthwhile! Maybe I'll put up a poll to gauge interest ....

21. Sean Stromsten

I work at an engineering company that has mostly switched to Word (and Windows), which I have to say is very frustrating, as well as a terrible waste of money. Word has added many LaTeX-like logical formatting features, but they behave unpredictably. I think Word is now harder to understand and control than LateX, and still produces an inferior document. And, of course, for math, there is no comparison.

If (1) the markup doesn't scare you, and (2) you can find an off-the-shelf style file that works, LaTeX will probably be easier to use than Word. Get Lamport's book, or the "Not so Short Introduction". Best of luck to those of you trying.

Also: maybe humanities folk could take up the practice of publishing .bib files on the web, as many technical authors do, to save others lots of typing.

22. Brett Holman

Post author

Hmmm, the drawback with putting up bib files as a means of sharing bibliographies is that I'm pretty sure that the total number of bibtex-using aviation historians is going to be very close to 1, including myself! Anyone else who was interested would probably be put off by a bibtex file.

Maybe a better way to go would be with a web-based catalogue? I already have my books up at LibraryThing, though that's (a) not just research stuff (b) only stuff I own (c) books only and (d) not directly exportable to bibtex (though it can do tab-delimited and CSV). Another option is CiteULike, which I've just put my bibliography into. None of the above objections apply, but I find the interface clunky, compared to LibraryThing's -- for example, I can't sort by date, which would be handy as a historian. Importing from bibtex is harder than it needs to be -- if I add a bibtex entry, I can't just re-upload my bib file, it complains about the duplicates and doesn't seem to go any further. It doesn't seem to be as actively developed as LibraryThing is.

23. Simon

If you can't find the right style file for you then check out custom-bib (also called Makebst), which although appearing a bit daunting, was in fact pretty easy to run. I really have little experience in coding etc but it is just a long multiple choice of yes/no clicks (with many defaults for most common choice), then it generates your new .bst ;) If you want you can open it in a text editor and adjust the settings for fine tuning, or simply run it again. It can be found here;

http://www.ctan.org/tex-archive/macros/latex/contrib/custom-bib/

There is a good tutorial on it's use as part of this page;

http://www.andy-roberts.net/misc/latex/latextutorial3.html

The start;

"It should be installed with the Latex distribution (otherwise, you can download it) and it's very simple to initiate. At the command line, type:

latex makebst

Latex will find the relevant file and the questioning process will begin"

Have a go, it's really not too painful and very useful.

24. Simon

Just a 'first bash' example which I made with custom-bib. I wanted something roughly in line with BS, author/date, and italic title, .p & .pp and also it supports url's, so I used that field as a quite a few of my references are web based. I even was able to simply text edit and change the default 'URL' style preamble which I felt was ugly;

http://www.planetluna.org/graphics/sample-custom-bib.png

It's not at all polished and for custom use, but it gives some idea of what can be achieved quite easily, especially outside the main spheres of Tex use ;)

25. Brett Holman

Post author

Thanks for the field report, Simon -- I haven't had to try makebst yet but it's good to know that that it's easy to use and customise!

26. owen

Help needed by humanities researcher!

I'm using jox and jurabib for my bibliography in LaTex but I need to make three minor changes to jox's standard output.

1. A comma needs to appear after the title of the journal, i.e. \emph{History Today}, 78 (1988) and not \emph{History Today} 78 (1988).

2. For books and collections I need a comma to appear between the publisher and year, i.e. (Cardiff: University of Wales Press, 1988) and not (Cardiff: University of Wales Press 1988).

3. Finally, I would like the editortype to appear in parentheses. So A.N. Other (trans.), rather than A.N. Other trans.,

Any assistance would be greatly appreciated.

Owen

27. Post author

Hmmm, on the second point, jurabib/jox does that by default for me. In fact I can't see where I could change that behaviour. What jurabib options are you using?

On the third, I think I've found the answer. It looks like /usr/local/teTeX/share/texmf.tetex/tex/latex/enjbbib.ldf is the key file for defining things like this -- specifically the line:
 \def\trans{\ifjbweareinbib trans.\else\ifjboxford trans.\else\ifjbchicago trans.\else Trans.\fi\fi\fi}% 
You could just hack that part, replacing "trans." with "(trans.)" But at the start of the file, it explains how to override these definitions somewhat more elegantly, so I think if you put the following in your preamble, it should work:
 \AddTo\bibsenglish{\def\trans{\ifjbweareinbib (trans.)\else\ifjboxford (trans.)\else\ifjbchicago (trans.)\else Trans.\fi\fi\fi}} 
(Not sure if the last Trans. should be in parentheses or not but it probably doesn't matter.) This is handy to know, so thanks for making me look :)

On the first point, I don't know ... but I might need this too. I was going to suggest you try the jurabib forum, but I see that you already have!

28. Mark ruddy

Hello, help needed if anyone can...
just starting out with LaTeX and BibDesk on Mac OS X for my PhD. How can I force italics into Titles in BibDesk? My PhD is vertebrate biology so there are lots of latin names involved...

cheers

MR

29. Post author

Sorry to take so long to reply, Mark ... I just tried the "obvious" way (i.e. putting \emph{bit in italics} in the title field) and it showed up the way I would expect. Did you try that, and it failed? If so, I guess it's something to do with your style, I'm using jurabib but I suppose biologists wouldn't!

30. Eric Nystrom

I just discovered your blog! Count me as another historian writing a dissertation in Latex. I'm using Kile as a front end to tetex on Ubuntu, jurabib, and JabRef to manage my bibliography. I would definitely be interested in some sort of forum for latex users in the humanities. I'm getting close to the end, so I suspect I'm going to get a chance to work through all of the little tweaks sooner rather than later. If you have any other tips or thoughts that you haven't posted here, I'm all ears.

-Eric

31. Post author

Cool, so we latex users are very very slowly taking over the profession :) A forum would be cool -- I'd participate if one existed but don't think I have the time to set one up now. These two latex posts of mine seem to be serving as a de facto forum anyway!

I haven't really come up with anything brilliant in terms of tips, but at some point I may have to bleg myself, particularly with jurabib. For example, is there a way to make jurabib use single quotes where it normally uses double quotes, and vice versa? Why does jurabib choke when an author entry in bibtex has quote-marks to force latex to not split an organisational author into lastname, firstname? Why does jurabib get confused when there is text in a footnote, and put a full or short cite in instead of an ibid? And so on ... :)

32. nick carbone

I'm a doctorate student in philosophy of science, I too use latex (jurabib, Kubuntu, jabref, just as Eric).

I've just seen your last question Brett, and I'm asking the same : "Why does jurabib choke when an author entry in bibtex has quote-marks to force latex to not split an organisational author into lastname, firstname?"

If you have got any answer to this problem could you advise me ? thanks
N Carbone

PS : For italics titles, I put in my preambule :
\usepackage{jurabib}
\jurabibsetup{%
titleformat=italic,%
%
}

33. Post author

Sorry Nick, I haven't yet found an answer to that! (But you can subscribe to this thread by commenting and using the checkbox to the left, in case somebody comes up with something in future.)

Something I haven't checked out yet is biblatex, which apparently allows you to generate the bibliography style using TeX macros (ie instead of using whatever strange language bibtex style files use), only using bibtex for the bibliographic entries themselves). Could be the way to go if I can't fix up these niggling problems!

34. Pingback:

35. I found this article a couple of years ago when I started using latex. Nice to read it again today!

I think LaTex is great, but it has a problem: if you have a lot of citations, your text may become unreadable. You have one paragraph full of \footnote{and then ten lines of text here} before continuing the sentence you were writing in the first place.

On the other hand, I am not very happy with the editors that I have used, MicTex and TexMaker.

Next year I will be writing my thesis in international law and I think I will try to combine OpenOffice with LaTex. You can write your text in OpenOffice and export it to latex. You have to be careful to make sure that OpenOffice produces a clean markup. Obviously, you may want to change the header, but that is the good thing about LaTex, you can separate form and content.

36. Post author

And not only are form and content separate, but your choice of editor is separate from both! The thing about the footnotes is annoying, and it is something that could potentially be fixed by the editor itself (e.g. have the footnote be collapsible somehow, and double click it to open it out). But I don't know of any that do that ...

37. Sarah Whitfield

Help! I've just got my head around LaTex, and vaguely trying to use a bibliography. But what are you using to make MHRA? I can't find a version, and the custom way is slightly terrifying!

I need footnotes with page references inside them, rather than sat at the top, and I just can't figure out how.

38. Sarah Whitfield

also while I'm at it - have you had any luck with newspapers and bibdesk? They don't seem to work together, never mind archive material.

39. Post author

Hi Sarah!

Unfortunately (for you -- may be fortunate for me!) I don't use MHRA so I'm not sure how the best way to do it is. Have you looked at biblatex? It's what all the smart kids are using these days (I still use jurabib, which isn't being maintained any more). The trouble is that the learning curve may be a bit steep for a new LaTeX user. I've been meaning to check it out myself ...

Newspapers -- hmm, I do cite a lot of newspapers myself but I must confess I just do them by hand (there's so many of them that it's paradoxically almost easier that way). You can set up a new type (eg 'newspaper') by going into BibDesk Preferences, Fields, and then Custom BibTeX Types and Fields. But of course, unless the bibliographystyle you are using knows about the new type, it won't be able to do anything with it. But that is something that you could presumably do in biblatex.

Sorry, I don't think this is very helpful ...

40. Pingback:

41. Piero Faustini

Hello, just found this blog....
I just want to give some advices to historian and so on based on my experience.
I'm writing a PhD dissertation in history of italian opera with LyX (which is a WYSIWYM Word-like front-end for LaTeX) with BibLaTeX package (as Brett pointed out) which is AWESOME. I'm a happy musicologist, right now.
Try both LyX (version 1.6 is coming out and seems to be much better than actual 1.5.6) and BibLaTeX (fully developing), and spread the LaTeX verb in the humanist world!

42. Pingback:

43. Ruth

Just found this blog, and am a linguist (student of languages, *not* of linguistics) writing my thesis in LaTeX and having fun with the MHRA style... I'm using jurabib and jmhra.bst I think, but there are some categories which are a *pain*... namely, works that have no editor or publisher (like 17th-C newspapers), theses, and multi-volume works. This is perhaps particularly true as I don't have bibdesk (I'm using pybliographic, since I'm on a Linux system). As I'm nearing hand-in, I'm happy plodding along, and editing the .bbl file when I get there, but thanks for all the references in this - I'll be following some of them up :)

44. Post author

Glad to be of some assistance! I found some limitations with citations too, though ultimately I managed to avoid hacking the .bbl file. I didn’t put newspapers citations in with bibtex, I put them all in by hand. But as I then wanted a list in the bibliography of newspapers consulted, I put in a \nocite for each one, which pointed to an article which only had the journal name and a key. For theses, there are phdthesis and mastersthesis bibtex types, but I discarded those and used unpublished instead, with the university, type etc in a note (mainly because I also had to add a postgraduate diploma thesis, just to be difficult). And multivolume works are possible with books – there’s a volume field for that, though maybe you can’t get that to format properly for JHRA. I know that for Oxford at least, jurabib only uses the volume number for the (initial) full cite, so subsequent cites can be confusing. Maybe the shorttitle field would be the way around that, though I managed to get away without having to deal with that particular problem.

45. rohan

Here's yet another humanities student grateful for your post! jurabib is a godsend. i'd previously hacked together a bibstyle from natbib for my uni work but it was pretty lame, jurabib is exactly what i wanted!

also, loving \footcite --- i hate referencing harvard style and this has saved me a long time trying to figure out how to do footnotes with ibid rules etc.

46. Post author

Yes, \footcite is a real timesaver! But it's not perfect, I've found -- it doesn't always know when it should put in an ibid. Particularly if you mix \footcites with normal \footnotes + \cites (for example, if you have substantive footnotes as well). With the final copy of my thesis I found myself having to go through and replace some \footcites with manual 'Ibid.'s. But not many, and overall it prevented far more suffering than it caused.

47. Jon

I love this post! Even though it looks like it has an ancient history I just got here and learned some great things. I'm also a theology-ish student working on some papers, and I'm really excited about LaTeX's possibilities.