Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin
The LaTeX fetish (Or: Don't write in LaTeX It's just for typesetting) (2016) (danielallington.net)
37 points by asimops on June 15, 2024 | hide | past | favorite | 34 comments


I don't know why we should resuscitate this highly opinionated piece from 2016.

Probably it resonates with someone's superficial experience using LaTeX, but the arguments it uses stem from analyzing just the beginning of a document, which is naturally full of boilerplate that you don't usually encounter in the body of your work, and perhaps from a badly chosen color scheme in the author's text editor.

The author is very quick to dismiss the whole idea of separating text and presentation showing how easier it is to just use a WYSIWYG editor. They don't hint at the hassle to eventually refactor your text, to give a uniform style to excerpts you incorporate from other sources, to adapt your formatting to different publishers' guidelines, etc.

And finally, the author decided to omit talking about maths all together. Not only how to write and display formulas, but also all the environment around it, like equations (and how to refer to them), theorems and proofs, etc.

No matter how you feel about LaTeX, this article doesn't dive into any of the features it's famous for.

My personal take about LaTeX? Don't consider it for short, simple essays. Writing a full book, several chapters, sections and subsections, non-negligible bibliography, maybe with some math in it... that's a job for LaTeX!


There's a graphical editor for Latex called Lyx[0]. They use the term "What you see is what you mean"

[0] https://www.lyx.org/


LyX is fantastic. There's no way I would go back to hand writing LaTeX after using that. The formula editor is especially good. Forget about any terrible WYSIWYG experiences from Word. It isn't like that.

That said, I would only really use it if I had to produce some LaTeX, i.e. if I was writing a paper that I wanted published.

For just writing stuff I think it's better to use Markdown or Asciidoc with Katex for equations if you need it. Then you can target the web.


Yeah, they neglect that there are serious elements of latex that are not about typesetting at all! Citation, acronym management, includes, figures, and other components are more about eliminating busywork through code.


yeah I'm not doing the maths twice. and the references, they practically sort themselves out, I just type prose with \citet{soandso2024} and forget about it.


> I even had a go at writing a LaTeX paper of my own (it never got finished; there was a lesson there).

The lesson is that the author found LaTeX too difficult or did not have the patience for it. But maybe we should take our advice from someone who has actually written a document with it.

Like any tool (including WYSIWYG editors) there is a learning curve. Once the up-front cost has been paid, using the tool is easy.

I notice that the author uses Emacs. They could just as easily have written a long article about how that's a waste of time and everyone should use Nano, because you don't need to learn any keybindings and the result is just text anyway.

> ‘making humans edit XML is sadistic’

Agreed, but LaTeX is not XML and nobody is making anyone do anything.


> nobody is making anyone do anything.

Not now. Now there’s plenty of ways to collaborate on a document. But 20 years ago, you couldn’t edit a word file on Linux and send it back in a form that hadn’t mangled the formatting. And everyone was using word for everything back then.


Several commenters here mention math formulas (and I'm guessing other math constructs) as a reason to use (La)TeX. I'm not a mathematician, so that reason doesn't work for me. But there's another reason for me, which is analogous. I'm a linguist, and linguists often use an aligned interlinear style in which each word in some sentence of a foreign language is glossed underneath with its meaning (and often morphological breakdown into stem and affixes); the foreign words and their glosses are supposed to line up vertically (so there may be extra spacing between words, typically but not always in the foreign language line). If the paired words+glosses of a sentence don't fit on a pair of lines, the lines hold as many as possible, and the pairs are continued below.

This is extremely painful--nearly impossible--to do in Word. There are LaTeX macro packages that do it quite well.

(When the foreign language is broken down into morphemes in its script and there is a gloss line, you end up with a triple of aligned lines, instead of just a pair. And when the foreign language is written right-to-left, other issues come up. But they can be addressed in the LaTeX macro packages.)



That's one; I've used that several others over the years, including gb4e and Covington packages. But yes, expex is probably the best now.

Not quite relevant, but we actually composed our grammars in a variant of DocBook XML, then converted them automagically to XeLaTeX for typesetting. Andy Black has a similar toolset that starts with his own document-oriented XML and converts this to XeLaTeX. I stole (with his permission) the code to convert XML interlinear into a LaTeX interlinear format.


Having been tought the use of Word in school I have made many of the same arguments in college. Unfortunately some word processors do start to exhibit "What you see isn't actually what you get, once you export it to pdf", suddenly those vector graphics are badly compressed jpegs or text is converted to images. And for collaborative works you better hope everyone is using the version of the same tool, or suddenly you'll have to worry about different interpretations of the stuff they hide from you.

Also there are plenty of specialized Latex editors offering side-by-side views, you don't actually have to use Emacs.


This happens every time with google docs, my nicely formatted tables always get messed up and border thicknesses end up wrong.


Vector graphics compression is real pain in Word.


When you start to do bibliographic references / cross references word processor documents start to get messy. Zotero/Mendeley doesn’t do well. My professor, who insisted on using Word, often accidentally tripped on macro field, changing them and complain about Word program crashes. Now the only way to generate clean Word documents for her to edit is to write in LaTeX and use Pandoc to “export” to word for her.


Latex does exactly what I want to do most of the time: typesets text, formulae and references in a sane way. We should be using it more, not less


> sane

That's highly subjective.


The author is clearly mistaken, but there's a point to the claim that la/tex is complicated, perhaps overly so for 99% of documents produced.

Personally I'd like to see something in-between latex and markdown. Just slightly more powerful than markdown. The first things I'd like to see added to markdown are labels and references.

At that point I think it'd be good enough for anything where fine tuned control over the presentation is not important.

Anyone using such extended markdowns that you would recommend?


Check out typst - in functionality it's closer to Latex, but it features a Markdown-like syntax for the most common elements.

I'm currently writing my thesis in typst and don't see myself ever going back to Latex.


Org-mode


I once had to deal with a complicated report in Word that had been "improved" by several editors using inconsistent indenting styles. It couldn't be fixed in Word by even Word experts. I extracted the plain text, added LaTeX markup and generated a perfect document.


From the article: "So convinced was I that this was why scientists wrote in LaTeX that I even had a go at writing a LaTeX paper of my own (it never got finished; there was a lesson there)"

Yup. There is a lesson there, but it sailed right under the author's head.


Clearly written by someone who has never submitted an academic paper for publication. Latex (despite its many issues) does sevealthings well: (1) bibliographic references in many formats (2) internal references to figures and tables (3) figure placement (4) mathematical equations and special characters. Plus, many journals provide latex templates that correctly format your paper. I recently tried to move from Latex to Word because my co-authors preferred word, but getting the biographical references correct was a lot more pointless work. Almost all the arguments about layout the author make are irrelevant if you cite references and need to resubmit to a second (or third) journal.


Preach it.

I remember trying to a avoid LaTeX to submit for a journal. Microsoft Word was powerful enough, right? And how hard could it be?

It was agonizing, painful, and downright schooled me on just how imprecise the popular editor could be. Weird flow issues, difficulty getting the spacing right, crappy support for certain kinds of figures, and knowing my submission could be rejected simply because it wasn't conformant to the journal's standards. I never did it again.

LaTeX sucks, and the reasons behind necessitating it probably suck too, but as it stands within the world of research? It is an unavoidable reality for many.


Wildly misses the point of why most people I know write in latex:

It's the only way to get equations that don't totally suck. Yes I know word and libreoffice can do equations and that these no longer look as ghastly as they once did but they still look pretty terrible and are annoying as all hell to produce (yes even in Word's latex mode) and in particular if you're writing something like a proof that includes text argument, equations, multiple lines developing concepts, stuff which needs to be aligned in different columns, multiple funky symbols etc, latex is the only reasonable game in town.

It's also the linqua franca of equations embedded in things like jupyter notebooks thanks to mathjaxx. So having got to the realisation that you need to write equations in latex, writing other stuff in latex (as a means of learning to be good in latex) makes a lot of sense.

Right now thanks to a small investment in getting productive I'm in a situation where I write my notes in obsidian so the equations are inline latex via mathjaxx, but I write submitted work purely in latex, and I'm for sure much more productive in actual latex than in markdown+latex-just-for-equations. It's much easier because you have the full power there so can define macros, include packages etc to your heart's desire. Now that's going to vary hugely depending on what you're trying to do but that's the case for me personally.

I can see why in something like digital humanities (which is the author's field) it may not be so much of a lift because it's not going to be so equation heavy.


This reads like rage bait. I don't think I've heard anyone use the "title" command as a reason for writing latex ever. What people mention is always the same four things: cross references, citations, figures, and equations; the author is totally dismissive of them in the comments. Everyone knows there is no strong competitor for any of these. Trying to get them to work smoothly in other programs has taken up the same amount of time as writing an entire paper before.


I'm the one single person in an office that knows how to use Microsoft Word/Libre Office Styles. This is by no means strange. Almost no-one I meet understand them. I doubt it's taught in schools.

Without exception, when someone wants to make a heading they click "Bold" and select a larger font-size. And optionally, red text on a blue background (I don't know why they are compelled to do this).

They never, ever click "heading" or "title". Nope. Because the idea of a heading to them is "bold" + "bigger".

So I'm convinced the argument in favour of writing in LaTeX (and other non-presentation markup languages) is that it generally enforces structure and style where none would otherwise be present. This enables production of a consistently formatted document, that's machine readable and often highly accessible.


I used to advocate for using Word styles where I worked. I didn't make many converts. I think one issue is that Word's built-in styles are just so weird. Blue font on a white background for section headings? (if I remember correctly) Who ever asked for that? And yes, you can modify the default styles, but it's a nuisance, it's laborious, and if you ever forget to save one of your changes to your template, it won't show up the next time. (And the modified template can be hard to find next time.)

But absolutely the worst thing about Word's styles is section numbering. Nearly every technical document I've ever written has used "legal" numbering (sections 1.1 and 1.2 are under section 1, for example, with 1.1.1, 1.1.2 etc. under 1.1). Word seems inherently incapable of doing this. I know there are web pages that tell how to force it, but (1) it's again quite laborious and error prone, and (2) it's just buggy, for instance if you do a copy-paste of a section to some other place in the document.

LaTeX does all this out of the box, with no errors whatsoever. And it also does cross-references to sections correctly, which Word can do--but in my experience, not well.

I could go on, but there are other reasons people tend not to use Word's styles.


Even when you know they exist, the friction to use them while writing is significant. Unless I'm doing more than 5 pages, I'm clicking that "bold".

It also doesn't help that Google docs effectively killed styles. They're kind of there and we're semi-adjustable, but unless something changed recently I believe you can't add your own.


Google docs actually makes Word look good. Or at least Google docs means Word is no longer in last place.


Latex actually is helping me finish my thesis. I didn't realise how much automating the formatting gives me peace of mind.


This was the entire draw for me


The author misses the point that people who like using LaTeX like that they can focus on and write the semantic structure of document to get a good looking first pass, and then incrementally improve the looks as they see fit.

I've now used Word for some official documents and it's always extremely difficult to enforce semantic structure. Numbering across different levels. Getting word to recognize structure for Numbering of sections and subsection always feels like a hit and miss. Everything is difficult to enforce/customise. You have to continously think about both semantic and looks, rarely can you separate them.

Admittedly, LaTeX being a tech from 70s with fancy for macros and text replacement, is not ideal. But it is still better than most systems of similar nature.


Try to write a resume or a CV in word and pardon my French, it will fuck you up. That meme about moving an image a pixel to left and in the distance sirens is true.

Markdown or latex OTOH make it a breeze. You don't have to do constant adjustments while typing or fear output is outside boundaries.


eh... Tex is for typesetting

LaTex is what you get when you wrap a structured document format around your typesetting engine. That is. the whole point of latex is for a human to write it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: