I've moved all of my LaTeX-based content creation to Typst. It's: - Fast—Compiling my books would take around 1 minute (I often had to compile twice due to indexing). With Typst, it takes less than 5 seconds. - Easy to write—I actually don't write it, I wrote a bunch of Pandoc plugins to tweak the output from Pandoc (I write all my books in Jupyter these days, so lots of markdown). - Easy to read—I've used LaTeX for…
So your books are like these? https://store.metasnake.com/effective-pandas-book Jupyter-to-PDF sounds like a perfect match here!
Exploring Typst, a new typesetting system similar to LaTeX
71–80 of 243 posts
Re: Exploring Typst, a new typesetting system similar to LaTeX
#72Earlier quoted context omitted.
To be honest, I don't know if I've seen conflicting packages. Do you have specific examples?
It's been a while, but I vaguely remember that the hyperref LaTeX package for making URLs didn't play nicely with certain other packages -- possibly with one of the citation packages. Sorry I can't be more specific. I definitely have memories of reordering \usepackage{} statements until "it worked"...
Re: Exploring Typst, a new typesetting system similar to LaTeX
#73Earlier quoted context omitted.
To be honest, I don't know if I've seen conflicting packages. Do you have specific examples?
It's been a while, but I vaguely remember that the hyperref LaTeX package for making URLs didn't play nicely with certain other packages -- possibly with one of the citation packages. Sorry I can't be more specific. I definitely have memories of reordering \usepackage{} statements until "it worked"...
See also https://latex.org/forum/viewtopic.php?t=25156>.
Re: Exploring Typst, a new typesetting system similar to LaTeX
#74I've moved all of my LaTeX-based content creation to Typst. It's: - Fast—Compiling my books would take around 1 minute (I often had to compile twice due to indexing). With Typst, it takes less than 5 seconds. - Easy to write—I actually don't write it, I wrote a bunch of Pandoc plugins to tweak the output from Pandoc (I write all my books in Jupyter these days, so lots of markdown). - Easy to read—I've used LaTeX for…
This trips people up a lot once they do anything involving cross-referencing or bibliographies. But for some reason some people use latex for a long time and never hear about latexmk, which automates all that, and can even "watch" your files so you can edit and save and see your PDF refresh all in real time. (I've only used latex for papers or blog math, not big books; I can't imagine waiting a minute per change back in college, let alone on modern hardware...)
Re: Exploring Typst, a new typesetting system similar to LaTeX
#75Re: Exploring Typst, a new typesetting system similar to LaTeX
#76Earlier quoted context omitted.
These 6 lines actually put me off. Probably I have to read more about Typst syntax but, same for me, consistent syntax which covers necessary complexity wins over bending a markup language for purposes for which it was never intended.
It’s best not to think of it as a markup language. It’s a programming language designed around the needs of outputting pdfs. Structurally it’s like a modern, nice version of php, only it’s built for academic articles rather than emitting websites. The code snippet there packs in about 8 typst concepts all at once. It’s like if someone showed off how “simple” c++ is by showing some template-heavy magic. It’s straightf…
Re: Exploring Typst, a new typesetting system similar to LaTeX
#77Earlier quoted context omitted.
With your experience of both, have you found that Typst has fewer issues with conflicting/non-commutative plugins than LaTeX does? Because that's where I lose the most time with LaTeX: packages often mess with the (piles of) global state in ways that sometimes conflict, and the only "solution" seems to be that, if you're very lucky, sometimes conscientious package authors will try to "detect" (through various hacks)…
I imagine you're projecting how LaTeX works onto Typst, though despite years of use and a PhD in PL I never really figured out how LaTeX works so I'm not certain. I don't think Typst has a lot of global state to get corrupted. Like, if one package defines a variable `foo` and another package defines a variable `foo`, and you use both of them (and don't try to import `foo` from both), it's not like those `foo`s are go…
However, if you have a need to override something globally (eg. a global heading font, or spacing at the paragraph level), there is really no way to do it other than doing it globally.
How would Typst solve this without having the same problem? Eg. how can I have a package that sets every "the" in red colour, without it interfering with a package that sets every "the" in blue or titlecase?
Perhaps it's structured better (I would hope so, with ~40 years of learnings since TeX was introduced), but the problem seems unavoidable if you allow things like the above.
Re: Exploring Typst, a new typesetting system similar to LaTeX
#78I've been looking into it. It's `blazingly fast` (aside from the rust joke, it really is way faster than latex), the syntax is more "modern", consistent, etc. The main problem is the popularity. It just does not have enough packages, at least for my use case. I mainly do a lot of equations (simple math), and a loooot of tikz (forest, circuitikz, pgfplots, etc.) [ https://gitlab.com/vslavkin/escuela/-/tree/main/5to?re…
In my totally anecdotal experience the intersection between proficient LaTeX users and emacs users is pretty large.
So having good emacs support would be a big selling point.
My experience on the other hand is also those people never complain about LaTeX, so they're probably not the target for a new typesetting system.
Re: Exploring Typst, a new typesetting system similar to LaTeX
#79I've moved all of my LaTeX-based content creation to Typst. It's: - Fast—Compiling my books would take around 1 minute (I often had to compile twice due to indexing). With Typst, it takes less than 5 seconds. - Easy to write—I actually don't write it, I wrote a bunch of Pandoc plugins to tweak the output from Pandoc (I write all my books in Jupyter these days, so lots of markdown). - Easy to read—I've used LaTeX for…
> (I often had to compile twice due to indexing) This trips people up a lot once they do anything involving cross-referencing or bibliographies. But for some reason some people use latex for a long time and never hear about latexmk, which automates all that, and can even "watch" your files so you can edit and save and see your PDF refresh all in real time. (I've only used latex for papers or blog math, not big books;…
However, it also had index issues.
Re: Exploring Typst, a new typesetting system similar to LaTeX
#80Earlier quoted context omitted.
I imagine you're projecting how LaTeX works onto Typst, though despite years of use and a PhD in PL I never really figured out how LaTeX works so I'm not certain. I don't think Typst has a lot of global state to get corrupted. Like, if one package defines a variable `foo` and another package defines a variable `foo`, and you use both of them (and don't try to import `foo` from both), it's not like those `foo`s are go…
In general, with the TeX "engine", you can locally scope most changes by simply wrapping them in braces {}. However, if you have a need to override something globally (eg. a global heading font, or spacing at the paragraph level), there is really no way to do it other than doing it globally. How would Typst solve this without having the same problem? Eg. how can I have a package that sets every "the" in red colour, w…
Exactly.
Broadly, the things you might want a package/plugin to do can be categorised as "local" (e.g., add some new type of content in a fixed-size box that the layout engine can then treat the same way as it treats any other such box) or "global" (e.g., change where floats appear). Making local effects play together can be easily handled with standard PL ideas like lexical scoping, but doing the same for global things is much harder: it strongly depends on exactly what knobs (API) the base typesetting engine provides. We now have design patterns like Observer to help make creating such "global" effects simpler, assuming that their effects are genuinely orthogonal, but what if they aren't?
A plugin that sets each "the" to red clearly conflicts with a plugin that sets each "the" to blue: at most one of them can "win", so which is it? Does it depend on which plugin was loaded first? If so, that's no better than LaTeX, and will become an ever-growing headache as the ecosystem grows.
OTOH, a plugin that sets each "the" in italics can sensibly interoperate with a package that sets each "the" in bold -- and can even produce the same results regardless of which was loaded first, because these effects "commute". These effects could be implemented by having the base engine expose an event that can be listened to by any interested plugin.
ETA: The main reason LaTeX is a pain is because it makes no real attempt (that I can see) to manage any of the inevitable complexity of "global" effects. (Admittedly, this is a tough design problem.) I don't yet see signs of anything better from Typst, thus I assume it will become roughly as painful as LaTeX in time.