Comment by emil-lp
2 days ago
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.
2 days ago
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
Thanks 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.
4 replies →