3 ms·
(The link goes to a thread on beautiful scientific communication (especially figures/diagrams), so it would have been nice to discuss that rather than discuss L
by svat 6y ago
(The link goes to a thread on beautiful scientific communication (especially figures/diagrams), so it would have been nice to discuss that rather than discuss LaTeX. But as the conversation here seems to be mostly about the latter…)
What a lot of people don't realize about LaTeX is that much of its awkwardness comes from it being a product of two very strong personalities (both Turing Award winners for unrelated work!) pulling it in two opposing directions:
• Donald Knuth, who designed TeX as a tool for typesetting primarily, allowing a meticulous author complete control over the appearance of his pages, and attempting to capture in a program (or at least making possible) the highest standards of typography developed over the centuries since the invention of printing.(†)
• Leslie Lamport, who wrote LaTeX as a macro package running in TeX, trying to hide complexity from the author and making things as convenient as possible, out of a (probably correct) belief that authors should not care about the appearance and instead only focus on the content! (https://lamport.azurewebsites.net/pubs/document-production.pdf https://lamport.azurewebsites.net/pubs/document-production.p...)
The result is that with LaTeX, things look “easy” superficially, but everything is implemented in TeX macros (never intended as a full-fledged programming language), so things break in mysterious ways. Not to mention the additional layers of complexity from zillions of users writing their own "packages" for everything. The error messages don't make sense to users because they often come from the bowels of TeX, and I suspect that many users even just ignore(!) warnings about overfull/underfull boxes.
Conversely, if you look at one of Knuth's own documents written in plain TeX, everything is startlingly simple: for example there is no automatic equation numbering or cross-references; for Equation 5 you just write "5" in the equation and refer to it as "(5)" later, none of that stuff with "\eqref{eq:foo}" or whatever. If macros are used, they tend to be custom for the document, rather than elaborate general-purpose ones. Consider giving plain TeX a try (a great book is A Beginner's Book of TeX by Seroul and Levy); everything makes sense, you feel in power, all the error messages are clear (often the same error messages! but now they apply to something you actually wrote/intended), and if nothing else, you'll end up with an appreciation of what LaTeX is/does.
This comment is turning into a repetition of my same tiresome comments on other sites (https://cstheory.stackexchange.com/a/40282 https://cstheory.stackexchange.com/a/40282, https://tex.stackexchange.com/a/398372 https://tex.stackexchange.com/a/398372, https://tex.stackexchange.com/a/386592 https://tex.stackexchange.com/a/386592, https://tex.stackexchange.com/a/384881 https://tex.stackexchange.com/a/384881, https://tex.stackexchange.com/a/518802 https://tex.stackexchange.com/a/518802 etc.) so I'll stop here I guess :-)
----
(†): good paragraphs, avoiding widows and orphans and hyphenation on consecutive lines and loose/tight lines adjacent to each other, all of that. By far the longest chapter in The TeXbook, the manual on how to use TeX, is called “Fine Points of Mathematics Typing” and teaches the careful reader about aspects of typography that TeX does not handle automatically — and this is not even counting such advice in other chapters such as ties for avoiding line breaks in “psychologically bad” places. See for example http://www.rtznet.nl/zink/comparison.pdf http://www.rtznet.nl/zink/comparison.pdf (linked from http://www.rtznet.nl/zink/latex.php?lang=en http://www.rtznet.nl/zink/latex.php?lang=en) comparing plain-text paragraphs in Word and InDesign and TeX. If you look at the “bad” typesetting that Knuth rejected as painful (https://tex.stackexchange.com/a/367133 https://tex.stackexchange.com/a/367133), I think you get the idea :-)
- leephillips 6y agoMany good points. I would just point out that plain TeX itself is a format, a set of macros on top of TeX—just not a elaborate as LaTeX. So I’m not sure there is that much conflict between the two visions.
- svat 6y agoOh yes definitely: some of the “sins” of LaTeX (doing too much with TeX macros, etc) do start with Knuth himself (though he seems to have been doing it for fun rather than prescribing it for general use), and some are in plain TeX too. But though I wouldn't call it conflict, I think there is a difference (of focus at least), which comes across in the way they are used: Knuth does all his writing, editing, and polishing with pencil on paper, and only uses the computer to finally type it up for typesetting and fine-tuning the appearance. (Also, he tends to use not plain TeX necessarily but take ideas from it and create a separate “format” for other documents.) On the other hand, LaTeX is clearly designed with the vision of being a complete “document preparation system” for authors from the moment they first turn their thoughts into words. The former approach I guess is feasible today if you do most of your “document” stuff in another place (if not pencil and paper, then maybe a plain text editor or Markdown or…) and use TeX only at the end, for typesetting.
- leephillips 6y agoAhh, now that you put it that way, yes, I think you are exactly right. For me, the real reason I started to use LaTeX had nothing to do with document formatting, which I had already figured out how to do with plain TeX (writing a 200-page thesis in it). It was the automatic handling of equation numbers and other labels.