Why I don’t LaTeX

latex_introLaTeX had many advantages in the past, but not anymore. Why do physicists still stick to it?

If you aren’t a physicist or a mathematician, chances are that you never heard of LaTeX in your life. You didn’t miss much though.

LaTeX is a markup language used to write complex texts in plain-text editors. For example, you open your notepad, write:

\documentclass[a4paper]{article}
\usepackage[english]{babel}
\title{A \LaTeX{} Example}
\date{}
\begin{document}
\maketitle
\section{A beautiful equation}
\LaTeX{} is great at typesetting mathematics. The time dependent Schr{\"o}dinger equation, for instance, is simply written as
$$i\hbar \frac{\partial}{\partial t}\Psi \left(\mathbf{r},t\right)=
\hat{H}\Psi\left(\mathbf{r},t\right).$$
\end{document}

And this code can be rendered to:

LaTeX

An example of LaTeX. If you have soft-masochist fetishes, you may play online with LaTeX at Overleaf. If you want to go hard-core, you may install MiKTeX.

Physicists love LaTeX. It’s difficult to explain why. I guess it’s a mixing of diverse psychological traits. A bit of sense of superiority: physicists don’t see the universe, they see its source code with laws of physics and LaTeX cryptic scripting. Or maybe it’s some ascetic Protestantism subtly infiltrating the scientific spirit, whispering that the truth can only be achieved through suffering.

Either invoking Freud or Weber, physicists’ adherence to a markup language so far away from any reasonable writing experience with comfortable WYSWYG text editors is laughable.

I remember I had a colleague in the college, who used to write simple notes with TeX. Ready for lunch, he wanted to stick a note at his door: “\textbf{I will be back at 13:00}.” Render, re-render, and we standing there starving but immensely proud of his bravery.

I’m a physicist and as such I was trained to use LaTeX. I wrote my first papers and my PhD thesis using it. But then I converted to Microsoft Word over a decade ago and I didn’t see myself using LaTeX again, except on few occasions when a co-worker intransigently demanded my soul devotion to the manuscript.

Over the years, I learned that all the proclaimed advantages of LaTeX are solidly fossilized in the 1990’s conjuncture.

Let me make my case.

Computer power

It’s true, there was once a time when writing a long or complex text with WYSWYG editors was utterly painful. I did use Word for my Master dissertation and I still remember how Carla’s PC 486 struggled, and trembled, and rattled under the burden of each new page I added.

Back then, in the late 1990s, if you had to edit a long document full of equations, LaTeX really was the only reasonable option. But those times are far gone. Today, I could use Word or Pages on any ordinary computer to  write the same dissertation without any trouble.

Efficiency

LaTeX users also claim that this keyboard-based language makes easier to write complex math, than with mouse-based visual equation editors. It’s true, If you are trapped to mouse edition, it may take forever to write a complex formula. But keyboard math edition isn’t exclusivity of LaTeX anymore. I work with MathType plugged to Word and the equation edition is as straightforward as with LaTeX.

Indeed, MathType even allows me to write in LaTeX if I wish, but it isn’t worth doing it.

I did a short experiment. I wrote the time-dependent Schrödinger equation with both, LaTeX and MathType. In both cases I only used the keyboard, no mouse. For MathType, I worked with factory-settings and standard keyboard shortcuts, without any command redefinition. Here are the results:

tdse

One of these equations was written with LaTeX, the other with MathTyoe in Word. Which one do you prefer? (I tell which one is which at the end of this post.)

Then, I counted how many keys I stroke to type the equation in each editor.

Using MathType, it cost me 64 keystrokes. With LaTeX, 141.

To be sincere, I’m even a bit surprised with such a difference. Based only on the number of keystrokes, to write the equation with MathType in Word was more than twice as fast as to write it with LaTeX.

Tweet: To write an equation with Word is more than twice as fast as to do it with LaTeX. http://ctt.ec/Dh7z4+

In fact, a recent paper in Plos One showed that, when asked to rewrite a three pages manuscript, “LaTeX users were slower than Word users, wrote less text in the same amount of time, and produced more typesetting, orthographical, grammatical, and formatting errors. On most measures, expert LaTeX users performed even worse than novice Word users.”

Transferability

Another supposed advantage of LaTeX is transferability. There also was a time when to open a Word document in another platform than Windows was an adventure in hell. Your document would pop up on the screen full of ♠strange characters and formatting errors.

With LaTeX, if you shared the same packages, you could render your final document in any platform. This certainly was an exclusive virtue of LaTeX, but, again, not anymore. I don’t remember the last time I had transfer problems with Word. Because this editor is a major player in the market, any other editor and operational system are adapted to deal with its format. (Well, to be sincere, there’s still plenty of room for improvement under Android.)

Structure

There is a myth gossiped in the corridors of physics departments that you can’t get hierarchic text (sections, subsection) and automatically ordered elements (figures, tables, references) with Word. These are essential features for an academic text and LaTeX was designed to handle them very well.

As any myth, this one is also just bullshit. If someone can’t have properly structured text with Word, it just means they don’t know how to use it.

Aesthetics

Finally, LaTeX users use to claim that LaTeX texts look better than those with Word. Well, here the argument descends into subjectivity’s mist. Just check again the Schrödinger equation typed within both editors; can anyone really tell that one looks better than the other?

But even if LaTeX looked better, so what? Manuscripts are not final products. They are processed by a publisher and the paper’s final appearance is completely independent of the text editor we’ve used.

A personal choice

When I write, I really love to see the text taking shape as I craft it. I don’t want to have to compile my markup code to see the result of my intervention.

Moreover, I do a lot of collaborative work. Anyone can read and edit my Word manuscripts, even LaTeX enthusiasts. But I may really have a communication problem if I send a LaTeX manuscript to a colleague not used to it.

And about students? If there is no real advantage of LaTeX over good WYSWYG editors, why should they waste their time learning it?

But these are just my personal impressions. I’m not one of those fanatics ridiculously rooting for a product.

I’m sure that we can write excellent papers with LaTeX, Pages, Word, or whatever high-level editor we chose. In the same way, we can do amazing science, no matter whether our laptops breath Windows, Mac, or Linux. We can efficiently program with either Fortran or C++, as well as we can efficiently procrastinate with either Netflix or Amazon Prime.

It’s all a question of choosing our tools. And whatever we choose, the only thing that matters is: we must truly master them.

MB

Answer: The left equation was written with LaTeX; the right one, with MathType.

 



Categories: Productivity, Work Organization

Tags: , , , , ,

30 replies

  1. I am slowly switching most of my writing to Latex, mainly to take advantage of the collaborative features of Authorea and Overleaf. If Google Docs had a decent equation editor perhaps I would use that instead.

    Anyway, I still do lots of writing in Word and I agree with you that if you learn the keyboard shortcuts in the equation editor it is surprisingly efficient – though the results of your experiment surprise me. When writing in Word there are two things I miss most from Latex.

    The main thing I miss is using symbols in texts. I find it much easier to write “notice that $\sigma_i^2$ is lowered by …” than “notice that (open equation editor, cmd-G, s, cmd j, i, tab, 2, cmd-w) is lowered by …”. The longer the equation is the better Word performs, but for the short stuff I find Latex faster.

    The other thing I miss is the labelling of equations, tables and figures. I know it is possible in Word but I find it so cumbersome that I never use it.

    • For this particular “sigma_i^2” case, in Word I get it through 18 keystrokes, with LaTeX with 17.

      Of course, it’s not only about the number of keystrokes, but the philosophy behind is completely different. In Word, the sequence of commands is to apply a format. In LaTeX, it’s to create a markup.

      About the labeling, long ago I created a template with numbered styles for figures, schemes, and tables. Now, for every new manuscript, I just load the template.

      Equations are trivially numbered with MathType. My most recent manuscript has about 60 numbered equations. I had no problem keeping track and cross-referencing them all.

      • In my experience the 5 keystrokes needed for “sigma” is much faster to type than the ones needed to create markup and requires much less mental effort. But that turns out to be a mute point because when I looked into the equation numbering you mentioned I discovered that there is a MathType/Latex toggle switch so I can type $\sigma_i^2$ directly in to Word!

        So, thanks for the post. I learned something really useful!

  2. Not from physics area, but if you need to label and cross-reference elements within the diagrams and text body (e.g. chemical structures), the word is just helpless. But overall I agree, writing in Word I’m more productive.

  3. I prefer Latex for scientific documents…

    My impression: the bottom line reason why there’s so much hatred against Word is simple prejudice against capitalism. The idea of free software. Besides, it is meant for business people who print out relatively simple documents (just words). It simply works for business people who need a reliable tool that works…without any compiling mumble jumble…
    In the universities, for budgetary reasons mostly, people look for free solutions for software. In addition to that, there’s socialist ideology: ‘software must be shared and free’.

  4. One other reason which you have not included. I switched to Latex for complex new projects, including presentations (Beamer) because I discovered that I have a bunch of files from the 1990’s (done in word and powerpoint) that are no longer openable. I have more confidence in being able to open a text file in Latex in the future then I have a Microsoft file because of vagaries in their changing of formats and eliminating backwards compatability

  5. Actually, I switched to Latex after working with Hans, and I like Latex 🙂 But I see it more as personal preference than anything else.

    About your other point: Recently, I am always having problems on Ubuntu when I try to open Word documents that people send me. There is always some weird thing going wrong with Figure captions and similar things.

  6. “When I write, I really love to see the text taking shape as I craft it. I don’t want to have to compile my markup code to see the result of my intervention.”

    Compile-on-the-fly has been available in LaTeX for about 20 years. If you’ve never tried Sharelatex, it’s pretty wonderful. Last time I used it was when me on the Northeast US coast and a collaborator in England were simultaneously editing the same document, with 30 minutes to go before a grant deadline, each seeing our edits simultaneously appearing in a browser window precisely as they would look in the final document. The only time a “compile” was necessary was for producing the final PDF. (That’s no different than what is required in Word or Pages.) But it allowed us to get that proposal in very last minute with relative ease.

    The computer power argument I have never heard as pro-LaTeX or anti-Word, speaking as someone who has been using TeX since 1990. But if I could still find the files for the TeX documents I wrote back then, they would still be readable immediately in any editor, and produce the same outputs as they did then. I have Pages/Keynote/Word documents from 2009 that I’d have to put some serious effort into opening up if I wanted to look at them.

    As for aesthetics, I can produce a LaTeX manuscript that will compile to give me an output that will look *exactly* like the final Astrophysical Journal or Monthly Notices or … article. (This has been true for almost 20 years now.) Or with a switch of a single line produce a completely different output, say single column, double spaced, all figures moved to the end for purposes of writing notes on the paper draft. (Yes, I know, a quaint concept compared to marking up the PDF.) But still, the concept remains that drastically different layouts can be achieved with changes of a single line of code, without the need to change 99.99% of the generating file.

    And then there is Bibtex, which I think makes references much easier than any equivalent I’ve seen in Word. I’ve been using the same Bibtex file, without any need to change its format (other than adding references to it as I use new ones) for over 15 years now. And again, a change of a single line of code can get me drastically different formats on the references, ranging from reference by name with an alphabetical bibliography to references by number with the bibliography ordered by use in the manuscript. And again, it’s a flip of a single line. (And realistically what this means is that you have the 2 or 3 lines that you might use in the standard preamble, and then just edit in or out a few %, and call it a day.)

    Now, that being said, if I’m doing a poster or a talk, it’s Keynote or Pages all the way. I know a lot of people who will do this via a LaTeX macro, but in those cases I want the fine control of figure layout & styling that something like Pages will give you compared to TeX.

    But any manuscript over a single page, LaTeX+Bibtex, is my much preferred route.

  7. Both word processors and LaTeX have made great advances through the years. Some of the arguments and comparisons for/against each seem to be outdated now. Much of what used to be hard is now much easier these days, both for Word and LaTeX, and the various markup languages provide another useful alternative. Look at Asciidoc for a markup language supporting full cross-references, for example.

    LaTeX does have its powerful macro language, and regular-expression search/replace of markup code can also be useful.

    Human-readable tags mean that you can tell at a glance why something is italic, for example. Was it explicitly made so, or is it emphasized text, or a special term, a publication title, etc? And once it is placed, it stays put.

    Look-alike symbols can be a problem when using a either a word processor or a markup language, sometimes depending on the fonts used. (Funny anecdote: I saw a paper from a big-name journal publisher which had something to the -2 power, for example, but there was a line break between the “-” and the “2”. They used a hyphen character rather than a minus sign, and their XML conversion typesetting rules allowed a line break in the middle of a superscript. And the editors never caught it, but that’s another matter.) So many fonts do not distinguish between the hyphen, en-dash, minus sign, and em-dash. Or the capital “O” and number “0”, or the lowercase “l” and capital “I” and vertical bar, or the bullet point and the math center dot. Trying to choose the correct unicode symbol out of a table requires some careful attention. If there is a LaTeX tag for a special symbol, it’ll come out right.

    Plain-text markup is revision-control friendly.

    The LaTeX siunitx package is pretty nice for typesetting units, especially where the format may change after-the-fact. The cleveref package is great for cross-references. Booktabs makes nice book-style tables, and the caption package can do some neat tricks for the floats. Various other table and float-related packages have made things easier.

    I prefer the LaTeX float mechanism with an explicit caption and label, rather than a framed box with some text which happens to be placed inside. And tags for beginning/ending a list, and per item, seem to be more robust than the indent/unindent list buttons.

    Word processors can be slow and semi-unresponsive while editing due to the need to frequently redraw figures and formatting.

    While word processor files are quite universal, the knowledge and discipline of using “styles” is not, resulting in a lot of files with bad formatting, broken or illogical table of contents, etc. Collaboration makes things worse if someone just uses the bold/italic buttons, and in many cases it’s easier to strip all formatting and start over than it is to try to salvage a document. And seeing the styles is easy with plain-text tags.

    It’s impressive how far Word and LibreOffice have come, but it’s also impressive how far the entire LaTeX ecosystem has come as well.

  8. The MS Word file format is absolutely unusable in any sort of revision control system (e.g. github). Yes, it is true that the MS Word program has revision control features built-in, but git far outperforms Word’s built-in revision control in terms of performance, features, and non-linear branching. This alone represents a compelling reason to use LaTeX.

  9. For very short documents, LaTeX is overkill.
    For documents which may be long, do not necessarily require a lot of structure but require multiple rounds of markups and comments (e.g. legal contracts) Word, with its track changes and comment features, is very useful.
    For documents which require a lot of structure, e.g. dissertations with numbered headings, bibliographic references, references to other items (tables, charts, etc), LaTeX is incredibly superior.
    This is also clear if you do a quick search, whether of Microsoft’s templates or of the web in general, for Word templates with numbered headings and anything with a modicum of structure: 99% of templates are for short documents, and finding a decent Word template for a dissertation or anything similar is far from straightforward. But let me elaborate:

    When I did my dissertation in 2004, Word 2003 did not even have any kind of bibliographic support built-in. I understand Word 2016 does, but I have never used it. One thing, however, which Word is bound to do, sooner or later, is to mess up the formatting for no apparent reason. All my friends and acquaintances who did their dissertation in Word spent multiple days, if not weeks, swearing at the PC because Word would randomly mess up styles and formatting. And, to be clear, these were all people proficient in Word, who had taken the courses offered by university on how to use Word for dissertations, who were using dissertation-specific templates and styles, etc.
    The situation does not seem to have become much better with time. Just yesterday I was editing a Cv written in Word. I had a style called ‘job name’, changed the size of the font… but the output wouldn’t change. Why? No idea. I changed the style of a paragraph, and the letters would appear all capitalised. Why? No idea.

    The truth is, WYSIWYG is dangerous because you can’t easily tell what lies behind what you see. In LaTeX, you see the plain text and the markups around it: this lets you understand very clearly what styles and formatting were applied. In Word, you see the final output, but it’s not as straightforward to understand what’s behind it: is that style X? Is that a modification of a style? Was any particular formatting applied? What happens when you change the style? Etc.

    • I’m probably younger that most of the people here. I’ve always used Windows since I was a little kid. The first OS I used was probably windows 97. Obviously, because of that, I’ve been using Word over the years. I study physics, and even that it wasn’t a requirement for us to learn latex, I did. My first lab reports were done combining the office suite, Word, Power Point, Excel. I can’t say I’m an expert, but I know all the basic stuff. But soon after I started using latex with an IDE I didn’t want to come back to the cumbersone MS suit.

      The formating is the mainly reason I wouldn’t wnat to go back to Word anymore. When I had to write a longreport, with say a lot of figures, tables and content, after hours of adjusting and formatting: bum, the program decided that all my previous formatting and ordering was wrong and did an awful mess out of it. It decided that my table wasn’t supposed to be ther, but three pages in advance, that my figures had the wrong caption, that the point of the text needed to be larger. Or also it decided that it had to close inmediatly due to an unexpected error.

      I actively avoid using Word now, even for short essays, reports or even letters. I know it takes more time and effort to do a Latex document. I notice a huge increase in my writing time, which is bothersome. But using Latex guarantee that I won’t have to do the formatting twice and that if I forgot to include a figure mid document, the entire document won’t be fucked up. Also my inner perfectionist will be reasured that I have an aesthetic pleasent looking document.

      I’ve used all kind of alternatives. Google documents, libreoffice, openoffice, the two old subpar text editors of MS, Wordperfect, Pages and even plain text things like Notepad, Note++ or vim (with no tex), but I decided to stick with latex. It is reliable, the formatting is standarized, is good looking, it won’t suddenly close, it will do exactly what I command and it won’t cost nothing. I know it’s not perfect, tables for example are a pain in the ass to do (even with automatized tools), it’s more time consuming (which I don’t really have much of), everytime I want to do something new on it I have to spend hours reading on tex.stackexchange and when I want to compile I have to search for minutes that extra “}” I mistyped. But hey, nothing is really perfect and for me the formatting is the real deal breaker.

  10. Funnily enough, I used latex over 25 years ago when I wrote my PhD thesis, using the vi editor no less, since I could not run much else, it was a 286 at home, using a dos port of vi and latex.

    After all that time, somehow I recognised the equation on the left as Latex immediately, I think it is the curly parts and thickness of some of the letters mainly. Comparing the two samples, Latex looks better to me, more elegant and aesthetically pleasing somehow 😀 , not that it matters, it’s the content the counts, both are clear.

    I also recall trying out a package called scientific word, it was a word lookalike ( or may be wordperfect, I don’t recall exactly ) on a 486 in the lab, it was a front end for Latex, but I found myself more efficient with the text editor approach. In those days. I was just so used to it, so I got quite efficient with the whole thing and the workflow of it.

    Ha, a trip down memory lane and the days of physical chemistry is was in got me here to your blog somehow, just surfing the net. I miss those days I must admit 🙂

    Some interesting articles here.

    regards, …

  11. And nowadays – actually since a little while – you also have LyX which runs on major platforms, Windows and Linux included. It allows for the use of plain LaTeX when you feel necessary, while at the same time incorporating a lot of the WYSIWYG tools that Word makes available. Also, there are some plugins which allow for interoperability between libreoffice and LaTeX. Also, as already commented, the stability of the .tex format is on stark contrast with the format changes Word has passed through the years, which render some documents (particularly those written with earlier versions) completely unopenable on new versions of Office

  12. Where is the fun in using Word?

  13. Some truly nice and useful info on this web site, too I believe the style has good features.

  14. I’m an engineer and I have quite the opposite view as yours.
    My colleagues prefer Word editing for research papers for personal reasons, and usually this forces me to dedicate the last afternoon before a deadline to reformat the paper, i.e opening the template again, fill in the text, then the figures and the tables in order of appearance, fix references and so on.
    Probably I’m not very good using Word but there is not a “standard” way of handling these things, for example when you have a double column paper and you want a page-wide figure, and furthermore a word file can not be self-descriptive about how to modify something or how something was done. You could add comments about this but nobody does it. I’ve developed some techniques over the years but usually other people have developed other techniques to do the very same things.

    In short, I see Word as technically not the right tool for complex documents, although it is used also to redact official standard documents (e.g. IEEE, ISO) and often you can tell it by just seeing how they are formatted.
    However technical reasons usually gets shadowed by social reasons, e.g. “Everybody knows it”, “It gives me complete freedom to work my own way”, “You have to share it with companies”.. This reasoning can actually apply also to programming languages for safety critical systems and probably many other things.

    And by the way, I think the left equation is recognized as LaTeX by anyone who has ever used it, although both results are good.

  15. whoah this blog is fantastic i love reading your posts. Keep up the good work! You know, many people are hunting around for this information, you could help them greatly.

  16. Greetings! Very helpful advice on this article! It is the little changes that make the biggest changes. Thanks a lot for sharing!

  17. Merely wanna remark on few general things, The website pattern is perfect, the content is very great. “Art for art’s sake makes no more sense than gin for gin’s sake.” by W. Somerset Maugham.

  18. thanks. 🙂 this was helpful!

  19. I have been checking out some of your articles and i can claim pretty clever stuff. I will definitely bookmark your blog.

Trackbacks

  1. “Why I don’t LaTeX” – merci_rb
  2. Learning LaTeX and examining a sequence – Lastuja
  3. Why I don’t LaTeX – Much Bigger Outside - Métrico

A penny for your thoughts...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: