Comment by xvilka
2 days ago
I have been using TeX/LaTeX for ages and today same issues hinder the user experience like multiple decades ago - cryptic error messages, complex pipeline, lack of the proper Unicode symbols support out of the box, and so on.
Nowadays, with Typst existing, it's vital for TeX ecosystem to solve these issues, since none of them are present in Typst. Projects like Tectonic would solve this for TeX, but they lack enough hands and (maybe) financial support.
Otherwise, using TeX only makes sense nowadays only if 1) you already have some templates 2) some features are still missing in Typst 3) you are just forced to use TeX/LaTeX for whatever reason.
(Disclaimer: I'm on the TeX Live team)
> cryptic error messages
These have somewhat improved recently, but I agree that they're still not great.
> complex pipeline
You can typically just run "latexmk --lualatex <filename.tex>" and your document should compile in a single step.
> lack of the proper Unicode symbols support out of the box
UTF-8 has been the default input encoding since 2018 [0], so character input should mostly just work. Using complex scripts (Arabic, Devanagari, etc.) requires XeLaTeX or LuaLaTeX, but LuaLaTeX is recommended for most documents anyways [1].
Now, you still won't be able to typeset arbitrary characters without any additional setup, but this is because there is no single font that contains all characters, and since mismatched fallback fonts usually looks bad, the (La)TeX developers do not want this to be the default. But
should be all that you need in most cases.
> Projects like Tectonic would solve this for TeX
All of these have already been fixed in TeX, except for the error messages, which would be impossible for Tectonic to fix.
(Background: the TeX engines give excellent error messages, and LaTeX gives good error messages for "expected" errors, but unexpected errors usually give a TeX engine error message unrelated to your LaTeX input, since LaTeX is internally implemented on top of TeX engine macros. So much like C++ template errors, it isn't really possible to fix this.)
> Otherwise, using TeX only makes sense nowadays only if
4) If you actually like TeX for some reason like I do :)
[0]: https://www.latex-project.org/news/latex2e-news/ltnews28.pdf...
[1]: https://www.latex-project.org/news/2024/11/01/issue40-of-lat...
I recently had a document break because I used umlauts together with the subfigs package. Apparently both use " characters internally and clash badly. This is not a particularly exotic use case.
Yeah, unfortunately lots of the third-party LaTeX packages are fairly poorly written. Which also applies to most other programming languages, but LaTeX is somewhat unique here since (1) approximately nobody makes money off of TeX, so even "important" packages are often volunteer-maintained, and (2) LaTeX2e has been around since the early 90s, so some of the popular packages have been unmaintained for over 20 years.
The core/official LaTeX code is really quite stable, but it's also very limited, so it's pretty reasonable to conflate it with the LaTeX ecosystem as a whole. But yes, the LaTeX Team is definitely aware of the problems caused by Babel shorthands (which is what " is in German), and they're trying to figure out some way to fix it without breaking other documents.
I'd much prefer bad looking unicode characters to just skipping them and having broken output honestly. This is currently the main reason I'm considering moving from LaTeX to typst -- just always having broken output as I use more unicode (maths symbols, emojis) in my documents.
> I'd much prefer bad looking unicode characters to just skipping them
That is an option that you can enable. If you're only using a few different languages (which is by far the most typical case), it's mostly automatic with Babel (by using "\babelfont"), but if you really want to support everything, you can use something like [0] (which is admittedly rather convoluted).
> just always having broken output as I use more unicode (maths symbols, emojis) in my documents.
Adding "\tracinglostchars=3" anywhere in your document (before the offending character) will turn any missing characters into an error message, and using the "--halt-on-error" command-line flag will make that error fatal. I've talked to the LaTeX Team and they'd really like it if they could make those the default, but they have 40 years of backwards compatibility to deal with. I've also talked to the Overleaf support team, and it's depressingly common for documents to compile with 50+ errors and for users to think that that's completely okay.
LaTeX is fairly similar to C here, because in both cases, the errors are nearly always important, a good document/program should compile with zero errors, yet thousands of old documents/programs do compile with errors and their users complain if you make them fatal by default.
[0]: https://tex.stackexchange.com/a/707031/270600
1 reply →
Using LaTeX makes sense because that's what all journals and conferences expect.
I'm writing two books, both in LaTeX.
I really don't get what the problem is.
Using LaTeX is mostly fine, except for the endless compile times, useless error messages, lack of unicode, etc. like the GP said.
I'm maintaining an internally used LaTeX document class and the development experience is even worse. TeX has no concept of such avant-garde ideas like lists, dictionaries, or namespaces. Things break all the time, and sometimes only when you load three specific packages in a specific order because they all patch each other's routines. I still haven't completely groked the idea of fragile commands and expanding macros. Characters can change meaning depending on context, even the `comment` character (%) or the `escape` character (\), (and I believe even the curly braces) for example when used inside `\path{}` or `\url{}` [1]. It makes a difference whether you comment out line endings or not. The LaTeX3 syntax looks like a bad joke. I mean, look at it:
\ExplSyntaxOn \tl_set:Nn \l_tmpa_tl {A} \group_begin: \tl_set:Nn \l_tmpa_tl {B} \par value~inside~group:~\tl_use:N \l_tmpa_tl \group_end: \par value~outside~group:~\tl_use:N \l_tmpa_tl
\tl_set:Nn \l_tmpb_tl {A} \group_begin: \tl_gset:Nn \l_tmpb_tl {B} \par value~inside~group:~\tl_use:N \l_tmpb_tl \group_end: \par value~outside~group:~\tl_use:N \l_tmpb_tl \ExplSyntaxOff
????
Let's just let it retire and focus our efforts on Typst and pushing publishers to accept Typst.
[1] Just look at all these poor souls trying to achieve something as exotic as putting a URL with a percent sign inside a footnote: https://tex.stackexchange.com/questions/12230/getting-percen...
> except for the endless compile times, useless error messages, lack of unicode, etc.
Some of these have been fixed; see my sibling comment [0] for more details.
> TeX has no concept of such avant-garde ideas like lists, dictionaries, or namespaces. […]. The LaTeX3 syntax looks like a bad joke.
But that is in fact the entire purpose of LaTeX3. I agree that the syntax looks intimidating, but it's actually quite nice once you learn it, and it's written that way to provide namespacing in TeX. Similarly, LaTeX3 defines lists, dictionaries, and most other conventional datastructures.
> Things break all the time, and sometimes only when you load three specific packages in a specific order because they all patch each other's routines.
Hmm, well it depends. The LaTeX kernel and the TeX engines are more stable than nearly all other software, but the third-party packages do indeed break occasionally. But you see similar dynamics play out in most other ecosystems: JavaScript the language is incredibly stable and has excellent backwards compatibility, but if you use 50+ third-party packages, then things do indeed break occasionally.
> Characters can change meaning depending on context
Much like operator overloading in other languages, catcode changes in TeX can indeed be misused and are sometimes confusing, but they're also a pretty useful solution to problems that would otherwise be tricky to solve.
All this isn't to say that TeX doesn't have issues—I criticize LaTeX myself fairly frequently—but most of these are due to the fact that LaTeX is 40-year-old software built on a 50-year-old engine, and has remained backwards-compatible with documents throughout that entire time. And La(TeX) is slowly modernizing, so I'm fairly hopeful that things will continue to improve.
[0]: https://news.ycombinator.com/item?id=48515090
5 replies →