đž Archived View for splint.rs âş latex_is_broken.gmi captured on 2024-08-18 at 17:53:38. Gemini links have been rewritten to link to archived content
âŹ ď¸ Previous capture (2024-07-09)
-=-=-=-=-=-=-
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 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 the installation size at over a gigabyte due to decades of bloating code piled one on top of the other.
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 instantly 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:
(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.
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:
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.
If you want a ââ â symbol as a footnote marker, add the following command:
âŚbut then (SURPRISE) the package breaks after 9 footnotes. To fix this, download yet another package, compile the documentation, and find the option to reset the footnote counters.
I needed a few hundred glossary entries, for reasons. LaTeX crapped out, saying âout of memoryâ, presumably due to some safety switch placed there in the 70âs.
The entire project can fit into my computerâs ram 800 times over, but apparently I need to reconfigure some LaTeX memory specificationâŚor TeX - unsure.
Donald Knuth, inventor of TeX, decided that TeX should not allow the user to select the typeface because all users would make horrible typeface choices. Itâs a funny anecdote, but a short-sighted decision, because users (predictably) changed the open-source program so they could have different typefaces.
Some typefaces 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 typefaces for particular sections), and still more are added by using Xetex to compile the document, which has some differences to LaTeX.
The kinds of memory management you have to deal with in C code really have nothing on the difficulties LaTeX represents. Try to represent a page number (e.g. âwe are already on page XX, and have only just begun toâŚâ), and youâll have to find some workaround, rather than just pulling out the variable.
The current day is stored as \theday, in some contexts, but must be translated to a value to be used in commands, or translated into a number for others before it prints.
We cannot even print the current section without workarounds, such as loading a package for fancy headers, then inputting \leftmatter (a variable designed to go at the top of the page).
Any attempt to circumvent these pages with begin an epic quest across Stack Exchange, and downloading half a gigabyte of pdf documentation, where some documents present clear guides for beginners, and others give a series of commands intelligible only to those who learned the original language TeX.
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.
The markdown packageâs documentation covers usage in these four TeX versions:
Each package has a different subset of these. Sometimes a package works across the board, sometimes it works with only some.
So every time you switch engine, or add a package, the heap of spaghetti code youâve written becomes a little messier, and you spend just a little more time debugging, rather than working on the actual text-document that you forgot about last week, when you accidentally became a coder.
You want a variable (e.g. \fishName), so you initialize it in some .sty file, and set out to format a book about fish with a standard introduction, such as what it eats. You decide to set a few toggles to present predators one way, and other fish another way. But then it all comes out wrong!
What you might not have noticed is that certain things in LaTeX count as environments, and other things do not. Within an environment, setting the fontâs size, switching boolean toggles (e.g. \ifPredator), and changing a command will not have any effect outside that environment.
Counters are global, except when you multiply or divide. Didnât see that one coming, did you? Now LaTeX is going to take the rest of your afternoon away, as you stare at it, slowly compiling for the tenth time, because you have no idea why the thing which always worked suddenly stopped.
Take a look at this mess:
\newcounter{age} | | \setcounter{age}{37} | | I am \arabic{age} years old. | | \begin{quotation} | I am 37 years old. The adults laughed when hearing the Monty Python line of | ``I'm \arabic{age}, I'm not \emph{old}'', and now I know why. | The adults laughed when hearing the Monty Python line of âIâm \addtocounter{age}{1} | 37, Iâm not old â, and now I know why. \multiply\value{age} by 2 | Of course this isnât as bad as being 76. | Of course this isn't as bad as being \arabic{age}. | Soon, I shall be 38, which officially is old. | \end{quotation} | | Soon, I shall be \arabic{age}, which officially \emph{is} old. |
We have multiplied the âageâ by 2, so the result should remain 37, but it does not. It returns, not to the original value of 37, but to 38.
Want to know how I multiply numbers? I add zero.
\multiply\value{age} by 2 \addtocounter{age}{0}
This little hack lets you retain a number, and this little hack alone should tell you that the time for TeX to die has long gone.
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.
Iâm thinking of switching to sile[a], at least for new projects.