by throwaway_7274 · 1y ago · 0 comments
I'm a PhD student currently writing my thesis in Typst. On paper this is an absurdly risky decision: it's a new technology without a huge user-base, it's not totally stable yet, etc. But I tried Typst and I had no choice. It was obviously the right thing to do, even though I'm going to have to make a pixel-perfect clone of my university's LaTeX template.
I've been using LaTeX for over ten years and I still wouldn't say that I "know" TeX in any meaningful way. I was not only productive but proficient in Typst in a day or two. If there isn't a package for something that I need (and, surprisingly often, there are packages for what I need, and excellent ones!), I find that I can just do it myself. Quickly. Things that never would have been possible for me with LaTeX are within easy reach. In ways I'd be happy to talk about if anyone's curious, it's been a huge enabler of my productivity as a researcher. I owe this tool so much.
Interestingly, I spend far, far less time yak-shaving in Typst than in TeX, since I can just Do The Thing That I Want. I'm actually focusing on writing instead of figuring out why package A conflicts with package B, and then how to install a different version of just a single package to override one of them, and then... [this sort of thing doesn't/can't happen in Typst; it's a real programming language with real modules] I could go on and on about the (relative) quality of the ergonomics and devex: fast compilation times, as others have said, but so much more than that. Try it out. Just try it out.
I should also say that it's not perfect. There are some funky design decisions for sure. There are some missing features, like including pdfs as images in your document (that one's on its way, I believe). Critically, the quality of the typesetting is maybe... 95% as good as TeX, which is perfect every time. Sometimes things don't kern quite right, and you have to adjust them by hand. It's a work in progress. I'm optimistic that it will achieve parity on that front.
That's lucky. Most of us had to do a LaTeX pixel perfect clone of our university's MS Word template.
I’d say 99% of the experience was super smooth. It was a great decision, though risky as you mentioned—I started with Typst 0.11 and finished with 0.12. The only painful part (that last 1%) happened at the very end when I realized my university only accepted PDF/A (the archival version—I didn’t even know there were different PDF versions before this). While Typst 0.12 theoretically supports generating PDF/A-2b files, the output failed the university’s compliance test. I ended up (after MANY experimentations) using Adobe Acrobat Pro to convert the file, which caused some minor layout adjustments unfortunately.
Apart from that, I highly recommend Typst. It’s an excellent tool, and I hope academic journals will soon accept submissions in this format.
There seems to be a huge amount of folks that want typst to work. I respect TeX and LaTeX, immensely, but it's so vast and byzantine. Maybe I don't know where or what, but some kind of clean LaTeX "distribution" is needed. It seems like you could build it in to containers or something. Just have some way that sort of makes it more of an atomic unit or something. I don't know how many times I've pulled down a template started to build it and something was missing.
It's good to see innovation in this space and people using it.
Unfortunately it’s a bit like asking for a “clean” Python distribution or a “safe” subset of C++. All the baroque mess is necessary to get working the many legacy packages that many people depend upon. And not just depend upon, but depend upon with all their concomitant foibles, bugs, and learned work-arounds.
I don't think a distro would do much to alleviate my gripes with (La)TeX which is its language and VM. TeX-the-language violates literally every single architectural principle we have come to rally around in sane programming languages. Whether you start by reading the TeX book or by copy-pasting from similar LaTeX documents, in my experience you'll soon hit a wall. No simple if/then/else. No just-works maths. No data types. No namespaces. No modularization. Every single solution in the language that Knuth comes up for any kind of problem he solved in TeX is a new edition of facepalm.jpg, everything you don't know and look up or (more likely) post to TeX StackExchange is answered with something that will make you stare in disbelief. Nothing, absolutely nothing that you do in the language to change anything in your document is guaranteed to not accidentally affect something else in your document, and your only way to check for it is eyeballing every single page of output.
Also, every part of the system is like this, not just the language-qua-language. The architecture of the compiler is like this. The compiler UI is like this (yes for every TeX engine). The package management/distribution situation is like this.
It basically has two things going for it: it's highly portable, backwards-compatible, and stable, and it produces really pretty documents.
https://jtibs.substack.com/p/if-all-the-world-were-a-monorep...
I'm not sure if you really mean pixel perfect or if it's just an exaggeration. There are packages in latex which are almost impossible to replicate in a pixel perfect way, one widely used example is microtype, which is especially useful in scientific works.
That's an interesting insight. Do you have an idea why this is? Do you have a CS background?
I have no idea how to implement anything in TeX on my own besides rudimentary macros. I did once try to implement a simple typesetting package for typesetting some particularly gnarly natural deduction trees, and I thought it worked fine for a few examples, but then it broke down in ways that was completely non-obvious to me.
The computational model of TeX is really, really opaque to me.
I could go on but what else in the world do I have to add to that so I can say "as for me, I opened the TeX book, read it, and understood it" or "I know how to use LaTeX, confidently"?
I don't know the answer to that question, but I do know the answer to the question "is TeX / LaTeX a well-designed, user-friendly, sane software?". The answer is no, no, and no.
Software should be invisible and not a hindrance to our ability to express ourselves.
I think a lot of the reason is that, ok, LaTeX is extremely complicated. We all know this. Its partisans tend to believe that this is because typesetting is a hard problem. Typesetting is a hard problem! We know this, too. But I think that a substantial fraction of the complexity of LaTeX is accidental complexity stemming, ultimately, from the inherently loosey-goosey nature of the system.
See, there is no real abstraction in TeX. There are no real mechanisms for encapsulation/information hiding/whatever. It's all just characters that eat characters and turn into other characters. Anything can do anything. Anything can be anything. As a result, the whole "theory" of what a TeX program "is" (like in the sense that Peter Naur used that word?) is conventional.
This means that even to reuse other people's code, you have to imbibe decades of convention that's maybe semi-documented, maybe folkloric, or maybe perfectly sound but requires you to read a 230-page manual. I can only speak for myself, but for me, it's no way to live.
Now, again, TeX-lovers tend to claim that its high degree of loosey-gooseyness is necessary, that it's what makes TeX "powerful." I don't know, that sounds to me like the same old "you can't handle writing assembly" story. Sure I can. I'd just rather not if I can help it.
Maybe it's the PL person in me.
All these layers and alternatives have proliferated partly because of age and the necessity of new solutions to new problems. I also think they're partly coping with fundamental limitations, design decisions that seemed like (or very much were!) a good idea in 1978, that sort of thing.
I’ve looked at Typst and it looks attractive. I’m not quite willing to invest in it until, say, PACMPL lets me use it there. Any idea if that will happen any time soon?
For me, it's been invaluable for notes and memos (and my thesis). When it comes time to submit a paper, I transcribe everything to LaTeX. It's a pain, but it's a lesser pain than transcribing from handwritten notes scattered across three notebooks and several crumpled-up sheets of printer paper in the bottom of my bag. That's my own peculiarity; YMMV.
(Edit: also, ugh, I feel like such a goof for having written that. Thanks for being nice about it.)
I’m curious- what does this mean?
Feels kind of icky to have written that, though, and maybe I regret it slightly.
Here’s a challenge to try (I hacked together something similar that only works in specific cases): write an environment where you get N columns in portrait page mode, with a vertical ruler, say, 12pt to the left of each column; respecting different paper sizes.
The amount of \makeatother, and what does that even mean??, will blow your mind
I’m not a TeX lover, but this part is just a snipe. I’m guessing you know and this was a joke. Apologies that it annoyed me enough to write this comment.
If you care enough to read this, you could learn the purpose of \makeatother [1]. It’s not tricky.
[1]: https://tex.stackexchange.com/questions/8351/what-do-makeatl...
I meant “\makeatother, and a lot of other things whose meaning is not clear”
In all honesty, I only ever did it to achieve the "LaTeX look". These days I write in markdown or (gasp) wysiwyg editors like google docs.
Hell I wish I could submit my resume as markdown.
I've tried writing Org and compiling it to LaTeX, but gave up this idea because ultimately I had to figure out idiosyncrasies of both LaTeX and Org-mode engines.
(Serious question) With or without an LLM?
I assume there is just next to no Typst code on the internet as of their training and the similarities to MD + MathJax result in LLMs hallucinating Typst syntax, often using `#` for headings or `\` and `{ ... }` in math mode.
Therefore, I must say that LLMs are more of a hindrance than help when writing Typst code. The syntax is nice enough though that I can fully understand that writing something oneself is very simple once you understand the concepts (content as a type; `show:` vs `show [rule]:` vs `set`; control flows with `if`, `for`, `while`). And for any questions there is an active discord channel with helpful real people.
I have had no luck with LLMs writing typst code. Normally its a better code writer than me, but the LLM (gpt4-o maybe?) hallucinated most of the document.
I've looked into typst before and am always turned off hugely by the website's attempt to make it look like some sort of purchased product with a freemium option. I don't really ever like to commit to anything I can't use with a basic commandline / plain text pipeline or that I don't expect to be available in a long-term way without enshittifying. Looking closer at the actual repo for the first time, it seems like I can use it that way, so it warrants investigation, but I'm still leery of the project because of its presentation
It is a little bit unfortunate that they don’t distinguish more clearly Typst-the-program and Typst-the-company in their advertising.
I've never actually see it as the assumed default option.. Maybe a decade back I could see that.. but not now.
They explain in the comment why it was risky (new thing instead of tried and true methods, not a large user base, etc.) and yet you minimized their explanation, over simplified and seem to not understand the risk involved in writing one of the most important pieces of literature in one’s career.
> why? they wont give you a phd if a single pixel is off by one bit in the alpha channel?
They meant pixel perfect as in matching the template to infer the importance of this. Then for some reason you went down the “off by one bit in the alpha channel” which is a bit of wise-assery and not meaningful nor necessary to the conversation.
As I said before, please dig deeper and use your well meaning System 2 to contribute, and not your Reddit-Tainted System 1.