Art Kavanagh

Criticism, fiction and other writing

More about LaTeX as a writing tool

LaTeX and Microsoft Word

I recently compared HTML and LaTeX as tools for writing. While preparing that post, I came across a piece by Daniel Allington: The LaTeX fetish (Or: Don’t write in LaTeX! It’s just for typesetting). Allington scrutinizes the arguments of LaTeX evangelists as to why LaTeX is supposedly superior to word processors like Word and LibreOffice, and finds those arguments unpersuasive:

… what’s actually being contrasted is not LaTeX and word processors, but the effective use of LaTeX and the naive misuse of word processors … people who don’t know how to use a particular tool [i.e. Word] very well are being told to throw that tool away and learn to use an entirely new one on the grounds that it will enable them to do things that they could have done at least as well with the old one — which is (when you think about it) a little peculiar … The really important thing to teach students is the importance of writing in a structured way and using the features of whichever tool they are using in order to facilitate that, but instead we have LaTeX evangelism and the false implication that word processors don’t facilitate structured writing at all. Someone who indicates section headings in a word processor by emboldening them or enlarging the font size is not using that word processor correctly and will be unable to take advantage of its full range of features …

To someone who sees the effects of “naive” use of Word every day at work, this passage certainly rings a bell. I’m forced to conclude that, while Word has always made it easy to create structured, cleanly formatted (if not particularly good-looking) documents, it makes it even easier (and from some points of view more intuitive or obvious) to produce a mess of inconsistent and confusing direct formatting. Word often seduces its users into believing that they don’t need to learn how to use it: all they have to do is start typing and know the standard commands used to apply bold, italics and other direct formatting. But the effective use of Word is not at all hard to learn, even if you’ve already developed a set of bad habits that mean you’re less likely to see a document as a structure. Why are those habits so widespread? Here is Daniel Allington again:

… you are more likely to be introduced to LaTeX in a class taught by someone who really knows how to use it, and more likely to be introduced to a word processor by playing around with it or under the informal instruction of someone who doesn’t understand it very well, and that, for this reason, the number of people who use LaTeX but don’t use its document-structuring features is probably close to zero while the number of people who use word processors and don’t is enormous.

If lawyers can be taught to use a structured markup language — say some kind of hybrid between Markdown and LaTeX – it should be at least as easy to teach them to use Word effectively, provided that the the need for such teaching is recognized and the will to learn is there. Word is more flexible in terms of the readily available layouts, and it makes the creation of things like captions and crossreferences much easier and, as Allington points out, it’s a great deal more flexible than LaTeX when it comes to making changes to the layout.

Everybody seems to be agreed that the choice of writing tool depends on how one sees the relationship between the process of writing a document and the way it’s presented. These are two distinct processes but they can’t be treated as entirely unconnected. In a document of any length, particularly one which tries to make an argument, structure has to be a primary consideration during the first phase, though it can usually be hidden or submerged in the finished document. I used to see a lot of computer manuals that had been set in LaTeX or something very similar and it used to bother me that they seemed to wear their structures on the outside, like some instances of postmodern architecture. For example, sections and subsections were always numbered, and the table of contents typically followed a rigid and regular pattern of indentation for headings.

The wysiwyg paradigm in word processors has meant that, at some level, you’re thinking about presentation far too early, before you have an argument to present. To this extent, the LaTeX evangelists have a point, though Allington is surely right to pour scorn on the notion that Word “forces” the writer to make decisions about font, spacing, margins and other presentational elements. To make the best use of Word, you have to learn not to think of it as a wysiwyg application, but instead as a tool which makes it possible to ensure that, for example, all book and journal titles, are cited, all words and phrases which are to be emphasised have the character style Emphasis, that italicized text which indicates neither emphasis nor a citation uses different markup from either of these, that a level 3 heading at the start of the document has the same properties as one at the end and that you don’t indent a paragraph by inserting a tab as its first character.

Conversely, markup languages don’t, as the evangelists suggest, make it possible to treat writing and presentation as entirely separate activities. On the contrary, they require you to keep in mind that “this is a footnote”, “that’s a block quote”, “this will be the last subsection in section 3” etc. All of these have presentational implications, which the writer cannot entirely ignore, even if they're not at the forefront of her mind. The idea that the writing is something independent of the presentation, on which the writer can focus to the exclusion of presentational elements is, at best, a gross oversimplification.

Whatever writing tool you use, somebody (possibly you) will eventually have to make decisions about the layout and appearance of your document. Those decisions will be much more difficult to make and implement if you don’t know how to use the tool properly. Whether you use Word or LaTeX (or Markdown or something else entirely), you should be willing to spend some time learning how to use it as it was indended. LaTeX will do a lot of the heavy lifting for you: the position and size of headings, footnotes and other elements, leading, hyphenation and justification etc. This kind of thing is much harder to do in Word (unless, of course, you have a suitable set of tried and tested templates), but (as Allington points out) you as writer may not have to do it. There may well be designers, typesetters and editors whose jobs these are.

Your job includes responsiblity to see that your headings and other styles are consistently applied. It doesn’t matter if you use 16pt Calibri with 18 points of space after for Heading 2; what matters is that every heading that should be Heading 2 is actually in that style. Then, the designer or editor just needs to amend the style once, or apply the appropriate template, to make the document look as it should.

Also, while LaTeX will do the heavy lifting, it gets forbiddingly complicated when you find it necessary to change the defaults, to produce something that doesn’t fit the template of a journal article or a chapter in a book. At a fairly straitforward level, if you want to use a font for which a “package” doesn’t already exist, things can get quite difficult. And I personally don’t consider the BibTeX system of bibliography management to be worth the trouble (though it’s hardly any more annoying than some of the word-processor compatible alternatives, such as EndNote).

LaTeX is primarily used by mathematicians and scientists, in large part because it’s capable of producing excellently typeset equations. It’s far less commonly used outside those fields. Allington has an interesting insight on why a writer in the humanities might want to use the system:

As far as I can tell, [some humanities writers] choose LaTeX for the opposite reason to the stereotypical one about focusing on content and forgetting about design. For example, one argues that “The computer should allow an ordinary writer to produce a polished typeset page, but Word makes this extremely difficult to achieve.” (Goldstone n.d., para. 7) This reverses the above-quoted arguments for writing in LaTeX: that is, such authors use LaTeX (or variants thereof) because they do not believe “that it is better to leave document design to document designers”: in fact, they are using it precisely because they want to have a go at being designers (which is in turn because they “worry … about the appearance of their documents”).
This is what LaTeX is good for: not helping people to compose text, but helping them to make it look nice. If that is important to you, go ahead and give it a look.

From my own experience in writing about seventeenth-century English poetry, I’d say that this is partly true. I was attracted at first by the promise of professional-level typesetting and layout, only to discover that I enjoy writing in a text editor, inserting the markup as I go (just so long as it’s not as awkward and intrusive as HTML). For me, the typesetting, attractive as it is, is no longer a compelling reason to use LaTeX: as I said in the previous post, I tend not to write much for print these days. If I were to go back to using LaTeX now, it would be for the writing experience, not for the typesetting.

As it’s been about 19 years since I used LaTeX, I thought I’d refamiliarize myself with it, as a kind of experiment. So, I downloaded MikTeX and had a go (using pdfLaTeX) at creating a PDF version of an essay that I had already posted in HTML: Andrew Marvell’s Gender. There are some tweaks that could be made to improve the appearance of the PDF but for the most part it looks as I expected. I’ll have more to say about the relative merits of LaTeX and HTML once I’ve played around with MikTex and pdfLaTeX a bit more.

For now, I’d just like to remark that creating a LaTeX document from an existing HTML one reminded me that it’s relatively easy to convert between two text-based systems of markup. And not just between text-based systems. When I reverted from BeOS to Windows 98 (and from LaTeX to Word) at the end of 1999, I quickly wrote a VBA macro to convert my LaTeX documents to Word format. At least 8 computers (and about 4 operating systems) later, I no longer have that macro but I can see that it wouldn’t be difficult to reconstruct. This opens up the intriguing possibility of starting off my documents in a LaTeX-style markup and then converting them to HTML or Word as required. In other words I could use something resembling LaTeX (or even a LaTeX/HTML hybrid) as a substitute for Markdown. I don’t know how practical that idea is but I think it might be worth looking into.

Posted by Art on 12-Oct-2019.