Is LaTeX worth it? (2023)
18 points by isuffix
18 points by isuffix
Like democracy, LaTeX is the worst there is, except for the alternatives. If you care about æsthetics, I think that it’s still the best.
I encourage folks to continue to use it, and I encourage newcomers to learn it.
It depends a bit on what you need. I switched to SILE for my latest book. SILE reimplements the same algorithms as TeX, but in a more approachable Lua format and with a clear separation of code and markup.
One of the problems with LaTeX is that it tries to look like a semantic markup language, but it is really just a bunch of macros that expand to imperative commands. This means it's really hard to translate to something else. SILE accepts its own TeX-like input format (everything is \command[optional, key=value, arguments]{body}), which is equivalent to XML, or XML, and has separate Lua if you want to add custom interpretations of commands. I write something based on SILE's IR and then translate it to either HTML, ePub XHTML, or SILE's XML.
Lots of people seem to like typst, but I can't stand their markup language as an input and it's also not easy to generate from other things.
The down side is that CTAN is huge. There is always a LaTeX package for whatever you want. And they typically do at least 95% of what you want. If your requirements are not simple, LaTeX is probably better.
Yeah, TeX is a really primitive language and LaTeX just a thick layer on top of it.
What surprises me is that nobody ever tried to conceive a modern, well-designed language with good markup/programming integration, equipped with a transpiler to TeX.
I dislike Typst for the same reasons as you do, and maybe I should look at SILE again. My current approach to math formulas is emacs org mode because you can switch between "markup" and "rendered" by just two keystrokes. I wrote commands to enter the subset of the STIX math font set that I need. Export to HTML and copy-paste.
Not great looking but WYSIWYG.
I’m sorry you don’t like inputting Typst’s markup, but I would disagree that it’s difficult to generate. Instead you’re likely working at the wrong abstraction level, and should use element functions rather than syntax.
All of the markup syntax just desugars to element functions, so *bold text* and #strong(text("bold text")) operate exactly the same. Instead of generating the former, it’s easier to generate the latter, although certainly not as easy as plain XML. However, you can load and process XML or JSON from within Typst using its own scripting language to make elements. Element functions are what allow set and show rules to work well, because you can affect the syntax by targeting its desugared element: #show strong: set text(fill: rgb("#f012be")). More expressive selectors like in CSS are also possible, but don’t yet have dedicated syntax.
Element functions also solve the semantic problem similarly to SILE: we’re already able to produce compliant tagged PDFs (UA-1, not yet UA-2) which will give an error if you specify UA-1 but try to add say, an image without alt text. And html output is in the initial experimental stage, but already being used by a number of community members for their blogs.
What were you trying to generate in Typst? I would appreciate hearing your thoughts.
All of the markup syntax just desugars to element functions, so bold text and #strong(text("bold text")) operate exactly the same
Thanks, I tried to find a grammar and failed.
What were you trying to generate in Typst? I would appreciate hearing your thoughts
This book starts as this semantic markup, which is processed by this tool to generate the various outputs (HTML, ePub, and the variants of the SILE XML that generate print and online PDFs).
For SILE, a lot of the semantic markup is erased and lowered to syntactic markup, but some things (headings, for example) are preserved. I looked at trying Typst as an alternative back end, but it didn’t seem easy.
The README for igk outlines my requirements for a tool for writing books.
It is the great tragedy of Computer Science that we have yet to make anything better than LaTeX.
That said, I'm hopeful that Typst will get somewhere
Computer science needs formulas, so for computer science LaTeX is an interchange and archival format. And archival formats need a much higher bar than merely better to get anywhere.
The author often is the designer
I used LaTeX extensively in my course work and for my CV and have always used someone else's style files.
What are the features that make people vouch for LaTeX?
When doing projects in grad school, I had a Makefile to run my program to regenerate the images for the document, then rebuild my document with the new images, and then bundle my code and paper for submitting. It saved me hours iterating on projects until the last minute, while ensuring consistency between program outputs and what was in the paper.
A huge advantage of using LaTeX for my CV is the option to comment out sections. This makes tailoring resumes for different groups quite easy, even before doing extra scripting or multiple top-level documents and using \input to only source the parts each needs.
I had a Makefile to run my program to regenerate the images for the document, then rebuild my document with the new images, and then bundle my code and paper for submitting
I do something similar. I found it odd that the author of this article made such a big deal out of the pain of re-building TeX files. I've found that LaTeX is actually very comfortable for the design -> check for errors -> redesign workflow.
A huge advantage of using LaTeX for my CV is the option to comment out sections. This makes tailoring resumes for different groups quite easy, even before doing extra scripting or multiple top-level documents and using \input to only source the parts each needs.
This is the exact reason I prefer LaTeX for my resume as well. Very simple to make multiple iterations of the same document.
Rebuilding LaTeX is nontrivial because you may need to run BibTeX, you may need to rerun LaTeX, and so on. In the worst case, it never reaches a fixed point. If you’ve got a cross reference to something a later page on the last line of a page, each step trying to generate it will give a different layout and may move it backward and forwards. Fortunately, latemk exists, and is part of the standard TeXLive distribution. It parses the output of the tools and reruns steps that are required, and will tell you if you’ve hit the (rare) infinite loop case.
All of that. And, for an academic (or academic-adjacent) CV, being able to just throw your publications in there as BibTeX is very useful.
I did the same thing with Makefiles for most of my books. Most of the figures were drawin in OmniGraffle and the graffle to PDF step was done by an AppleScript that drove the app to do the export.
I love LaTeX. It is not for everything though. But for scientific papers it is marvelous.
Two things this article gets right are the way it discusses errors (see below) and the treatment of LaTeX as a holistic package. LaTeX is often discussed by focusing only on the textual input and only on the document that's output, but the experience of editing a document encompasses more than that. The article correctly gives credit to WYSIWYG editors for making it easy to produce "good enough" documents without hassle.
For errors, I'd like to highlight two sections on LaTeX environments: Error Proneness and Ubitquity, which represent well the kinds of little errors you'll slog through when trying to change any one small thing in LaTeX. The poor implementation of environments alongside their ubiquity means that document content doesn't compose well and isn't resilient in the face of errors.