3 ms·
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
by xvilka 4mo 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.
- emil-lp 4mo agoUsing 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.
- mr_mitm 4mo agoUsing 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-percent-sign-into-an-url-in-a-footnote https://tex.stackexchange.com/questions/12230/getting-percen...
- gucci-on-fleek 4mo ago> 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 https://news.ycombinator.com/item?id=48515090
- mr_mitm 4mo agoThanks for your insight, much appreciated! However, regarding this: > 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. I'm sorry, but I've never seen overloading of such fundamental characters like the comment character or escape character anywhere. Or at least if you use these characters inside a string, it's pretty clear that the string context is special. In LaTeX I have no way of knowing which catcodes a macro has modified without essentially parsing the entire thing, which breaks syntax highlighters and language servers (something that increases quality of life in other languages substantially), because the compile times are prohibitive. The decision to let users redefine %, \ and literally every character seems like a really, really bad idea to me. Other languages and syntaxes seem to do just fine, so I'm not sure what you mean by tricky to solve. > 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 I realize that, and I appreciate what LaTeX (and by extension TeX) has done. It's a giant in sciences and the software world, of absolutely critical importance, but still. We learned a lot of lessons about writing software in the last 50 years, and Typst is applying these from the ground up. Unfortunately I don't have a lot of confidence that LaTeX can be modernized.
- gucci-on-fleek 4mo ago(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 \usepackage{fontspec} \setmainfont{Some Font with your Characters} 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#section*.4 https://www.latex-project.org/news/latex2e-news/ltnews28.pdf... [1]: https://www.latex-project.org/news/2024/11/01/issue40-of-latex2e-released/#on-engine-support https://www.latex-project.org/news/2024/11/01/issue40-of-lat...
- fsh 4mo agoI 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.
- gucci-on-fleek 4mo agoYeah, 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.