5 ms·
I write this in pretty much every Typst thread. Here are some notes I wrote when I started out with typst when comparing with LaTeX and some recent additions:
by commandersaki 1y ago
I write this in pretty much every Typst thread.
Here are some notes I wrote when I started out with typst when comparing with LaTeX and some recent additions:
1. It doesn't generate 5 bloody files when compiling.
2. Compiling is instant.
3. Diagnostics are way easier to understand (sort of like Rust compiler suggestion style).
4. List items can be either - item1 - item2, etc. or [item1], [item2]. The latter is way better because you can use anchoring to match on the braces (like "%" in vim), which means navigating long item entries is much easier.
5. In latex you have the \document{...} where you can't specify macros so they need to be at the top, in Typst you can specify the macros close to where you need them. [I've been informed this is actually incorrect and Latex does allow you to specify macros anywhere]
6. It's easier to version control and diff, especially if you use semantic line breaks.
7. Changing page layout, margins, spacing between things, etc., footers with page counters, etc. just seems way easier to do.
8. Compiling with Typst is always one pass.
9. I'm not sure how this would compare with Latex but I'm starting law school in a month and I need to cite using AGLC4 which has a CSL (citationstyles.org) template supported by Typst; I have confirmed the CSL XML is correct but doesn't render properly in Typst. The workaround I found was to hand typeset my own citation and bibliography which sucks.
10. Most of what you need is built in to Typst and I've yet to need to import a package or template; even for the most basic documents with Latex you find you'll need to use many packages (such as fancyhdr for customised headers and footers).
11. Latex distributions can be a monstrosity, gigabytes in size like TexLive, and I acknowledge you can get slimmed down on-demand version such as Miktex. There's just one distribution of Typst and its pretty lean, although it might be nice to have multiple implementations in the future.
As for Typst 0.14 - I'm really happy about Accessible PDF feature and HTML export, will give each a whirl.
- fouronnes3 1y ago> It doesn't generate 5 bloody files when compiling This was a question [0] I asked on stack overflow more than 15 years ago, and is to this day the most up votes I've gotten on SO. I still get notifications from it occasionally. [0] https://tex.stackexchange.com/questions/11123/prevent-pdflatex-from-writing-a-bunch-of-files#11125 https://tex.stackexchange.com/questions/11123/prevent-pdflat...
- weinzierl 1y ago12. It isn't a ticking time bomb with untrusted input.
- idoubtit 1y agoWhen I compile LaTeX files, I use tectonic¹ which automatically download dependencies, compiles in one pass, and hides temporary files. But the regulars users of LaTeX I know all use a web interface — IIRC, it's an instance of Overleaf² installed by their university, with real-time rendering. So when I read your list, I had these tools in mind, and the only items that made sense to me were: 2. (minor compared to Overleaf) typst compiles faster. 3. Diagnostics are better. 4. (minor and arguable) Lists have 2 simpler syntaxes. The other points were irrelevant (dependencies), wrong (macros) or really dubious (margins, Git, bibliography). I think Typst has many more interesting features over LaTeX. ¹: https://tectonic-typesetting.github.io/ https://tectonic-typesetting.github.io/ ²: https://docs.overleaf.com/on-premises/installation/using-the-toolkit https://docs.overleaf.com/on-premises/installation/using-the...
- chrisweekly 1y agotangent: what syntax lets you use superscripts in HN comments? test^1
- mayoff 1y agoUnicode superscript characters. https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts https://en.wikipedia.org/wiki/Unicode_subscripts_and_supersc...
- chrisweekly 1y agoaha, thanks!
- commandersaki 1y agoYeah fair enough, people have different experiences. I would like to address that you read my point for margins/footers/etc. being difficult in Latex is dubious. (Also not sure why you mention the bibliography thing as dubious as it was a real issue of Typst, but shrug.) A few years ago I spent many hours trying to figure out why a fancy footer wasn't rendering in a Latex document. I wanted a Page x of y counter in the footer which requires a few extra packages. So I try adding it, using two different methods \fancyfoot and \cfoot that I found on StackOverflow & OverLeaf, yet neither worked. I thought I was doing the incantations incorrectly. Spent endless hours figuring out what was going on, until I broke down and created a minimal example by selectively removing stuff which helped uncover that it was rendering but off page. The culprit was an overly large \fancyfoot that I hacked in to give a long baseline because I wanted to use up a huge chunk of the page due to Latex generous margins. Yes I got things wrong, but Latex really didn't make this stuff easy, and took many hours to troubleshoot -- though it did improve my Latex troubleshooting skills. In contrast setting layout parameters such as margins and specifying a footer is effortless in Typst and doesn't have that footskip footgun (at least I didn't encounter it): #set page( width: 210mm, height: 297mm, margin: (top: 15.875mm, bottom: 25.4mm, left: 15.875mm, right: 15.875mm), footer: context [ #set align(center) #set text(size: 10pt) Page #counter(page).display() of #counter(page).final().first() ] ) Anyway, that's my justification for that point.
- raybb 1y agoHave only lightly dabbled in latex but Typst was super easy to pickup. I recently even published a whole book[0] in Typst. The process was straightforward for the most part. It took a little time to work out how to get page numbers alternating between the left and right side and a few other small formatting details but by and large it was very easy to create a beautiful PDF that's ready for printing. Also, pandoc has fairly good support for Typst so I use that to create a docx (which Draft2Digital converts to epub). I even opened a few issues (https://github.com/jgm/pandoc/issues?q=sort%3Aupdated-desc%20is%3Aissue%20state%3Aclosed%20author%3ARayBB https://github.com/jgm/pandoc/issues?q=sort%3Aupdated-desc%2...) for pandoc support and they were almost all resolved pretty quickly. [0]: https://thelabofthought.co/shop/p/nbmi3 https://thelabofthought.co/shop/p/nbmi3
- __mharrison__ 1y agoIt really is so much better than LaTeX. I'm only saying this because I really enjoy using it. LaTeX was always tweak something, wait for the compile, and pray that it works, without having any clue about what was happening.
- andrepd 1y ago> It's easier to version control and diff, especially if you use semantic line breaks I don't get this one, it's equally easier to diff if you use semantic line breaks.
- hodanli 1y agoCan I convert LaTeX templates to Typst and vice versa? Many journals have LaTeX templates and demand LaTeX.