💾 Archived View for malinfreeborn.com › gen › latex_is_broken.gmi captured on 2022-07-16 at 13:58:41. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
I love LaTeX because it can do things nothing else can. I have to use it, because it can do things nothing else can.
But it has some deep problems.
I think the biggest root of problems is having packages, rather than just having people submit a pull request on a central repository and add whatever feature someone wants.
LaTeX' basic tabular environment is awful. If you put in a long line, it'll whiz off the page. Not a single human in all the universes, fact or fiction, have ever wanted to print something outside a page. So this was replaced by tabularx, which demands the user download it (or find some LaTeX package manager), and then pull it up while LaTeX compiles the document.
This was not the end of the debate on how to make tables, so yet more people have created packages, and then others made packages relying on other packages, so if you want to use the tcolorbox package, hopefully you chose the right tabular-type package, or you'll have to reprogram your document.
Plain text, used in \altt was broken, so a new package was brought in, rather than replacing the native LaTeX function, because the native function doesn't wrap words, but prefers to print them outside of the page.
LaTeX supports floating images with the right package (where the image decides where to sit depending on where it fits best), but the multiple columns package (multicol) can't support the floating images.
While one package per function might have made LaTeX a smaller back in the 80's when there were twelve packages available and 10 Megabytes of disk space per university, modern users typically install all packages instead of messing with individual installations. This leaves them with over a gigabyte due to the useless bloat of decades of random code.
Various packages then have surprised for the user when it comes to interoperability. Want a floating image? No problem - but if you're using that inside multiple columns, suddenly we're gonna have a problem.
A single, monolithic program which handled formatting would ensure that the tabular environment was fixed rather than having three fixes thrown on top. A single program wouldn't have clashes between commands, such as the command \box being used by different symbol libraries. It could also allow the user to simply state the commands they want, rather than importing packages at the start of the document. And finally, it could allow for a few, standardized test documents, which would stick a title in a box, which then went on to declare multiple columns, just to make sure every environment worked with every other environment.
Here's an example output from LaTeX:
Package multicol Warning: I moved some lines to the next page. (multicol) Footnotes on page 41 might be wrong on input line 102 6. Overfull \hbox (8.5359pt too wide) has occurred while \output is active [][][] Overfull \hbox (8.5359pt too wide) has occurred while \output is active [][][] Overfull \hbox (8.5359pt too wide) has occurred while \output is active [][][] Overfull \hbox (8.5359pt too wide) has occurred while \output is active [][][] Overfull \hbox (8.5359pt too wide) has occurred while \output is active [][][] [41] (./story/12-advanced.tex LaTeX Font Warning: Font shape `T1/artemisiaeuler/m/scit' undefined (Font) using `T1/artemisiaeuler/m/sc' instead on input line 74. Overfull \hbox (8.5359pt too wide) has occurred while \output is active [][][] LaTeX Font Warning: Font shape `T1/artemisiaeuler/m/scit' undefined (Font) using `T1/artemisiaeuler/m/sc' instead on input line 74.
The first part says it moved lines, and a footnote might be wrong. I don't care about that line, and the footnote is fine, but even if it weren't, I'm not sure what I could do about that. The next parts say that something, somewhere, is too wide (it isn't), repeatedly. Again, I can do nothing with this statement. Lastly, we have a warning that something is undefined. The book outputs fine, so I'm not sure what LaTeX wants defined.
The error messages are no more useful, and far more maddening.
! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. <argument> ...shipout:D \box_use:N \l_shipout_box l.60 \section*{Special Thanks \ldots} ! ==> Fatal error occurred, no output PDF file produced! Transcript written on main.log.
In total, a 200 page book produces 3736 lines of output.
The last line here says we have more in main.log. It is 7717 lines long, contains mostly the same information (but not entirely), and ends with this entirely useless sentence:
115325 words of extra memory for PDF output out of 128383 (max. 10000000)
At one point when writing a LaTeX function, I actually used a command to print some error message into this document, so the problem isn't that error-logs are useless, the problem is outputting useless statements about every \hbox.
LaTeX was built on TeX, and the ghosts of TeX are everywhere. Stack Exchange is bloated with posts about how to fix problems by first regaining the old TeX syntax, which involves an '@', then closing that syntax off. The result is that we jump between two very similar languages, but gain nothing for the effort.
If you want to change a command with \renewcommand\@endpart, or loop something with an \@Repeat command, then that's a TeX command. If you're inserting a Tikz image, or using the \section{} command, that's LaTeX.
Back and forth we go.
Donald Knuth, inventor of TeX, decided that TeX should not allow the user to select fonts because all users would make horrible font choices. It's a funny anecdote, but a short-sighted decision, because users simply changed the open-source program so they could have fonts.
Some fonts are added by using a particular package (which then changes all standard writing), others are added by adding a package (which then lets you change fonts for particular sections), and still more are added by using Xetex to compile the document, which has some differences to LaTeX.
A full LaTeX install takes up 5 Gigabytes, plus dependencies. The output really cannot justify this mess of code, and if LaTeX were a single program which improved existing functions rather than adding alternatives, it wouldn't have happened.
People use LaTeX despite its problems, because nothing else can replicate its power. But being the best doesn't excuse the kind of nightmares LaTeX users have come to think of as normal.