Live data from Hacker News

Typst: A Possible LaTeX Replacement

lwn.net

81–90 of 390 posts

Re: Typst: A Possible LaTeX Replacement

#81

I've started using typst for small local documents that I would previously have written in markdown (or R-markdown). Typst offers programming features that are very helpful for small writing tasks that need more customization than markdown provides but that don't need the wildly expansive set of templates available in the latex world. Like other academics, I plan to stick with latex for journal articles and books, un…

> Like other academics, I plan to stick with latex for journal articles and books, unless publishers provide support for typst.

In my undergrad we sent all our essays etc as LaTeX and it was honestly very usable. I assume this was somewhat dependent on having a wealth of enthusiast professors and postgrads to develop the templates though...?

Since then, I've used LaTeX in a "freeform" way and absolutely hated it, I will definitely be trying Typst next time I need more than Markdown/RST.

But I can imagine that if you are unlucky, working with the journal-provided templates could be WORSE - if the templates suck you are surely in a world of pain!

Re: Typst: A Possible LaTeX Replacement

#82

Almost all my computer science students are using Typst on my recommendation to write up their programming projects, vs most using Microsoft Word last year. Specifically, writing in VSCode with the Tinymist Typist extension. All going very well so far and no complaints.

I was with you when you explained how you got them off of MS Word (even worse if it was the web version!!), until you brought up VSCode. I get it, you are probably advocating very practical choices. Just that I wouldn't recommend students to become dependent on VSCode (due to its vendor and "telemetry"). Basically, that makes the students again dependent on MS. But I guess since you recommend an extension, you cannot recommend VSCodium and adding the extension store as someone in a teaching position? If you can, then I would strongly advocate recommending VSCodium instead (or non-electron app editors), to avoid spyware on their machines and to promote a healthier tooling.

Re: Typst: A Possible LaTeX Replacement

#84
For me Tectonic[1] solved many of the issues I had with LaTeX, so that's what I'd recommend if you still depend on LaTeX as a language. Make sure to use the V2 CLI (`tectonic -X`) which comes with convenient features like watch mode. With vim and evince (or any PDF viewer that auto refreshes) open I get a similar real-time experience to popular online editors like Overleaf, but in the comfort of my own editor.

[1] https://tectonic-typesetting.github.io/

Re: Typst: A Possible LaTeX Replacement

#85
post #18

These are some notes I wrote when I started out with typst when comparing with LaTeX: 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 vi…

8. Programming with it is lovely. Its got a little interpreted language built in, with helper functions like json("some_file.json"). I wrote a paper in it, and used that extensively to populate all my result tables. (Benchmark script -> JSON files -> typst compiled the results directly into the PDF).

I've said that in Typst, when you're writing, it feels like writing, and when you're programming, it feels like programming. Whereas LaTeX always feels almost, but not quite, entirely unlike programming.

Re: Typst: A Possible LaTeX Replacement

#86

Assuming it's at all desirable, it's an interesting and recurring problem of how to dislodge existing sub-optimal (sometimes even harmful) standards and notations. Almost nobody wants to learn something new when they already know something similar. Creates a heck of a momentum effect, not just from the practitioners resisting the change, but also available resources and so on.

> Almost nobody wants to learn something new when they already know something similar. I think it depends on what the thing is. I use LaTeX for occasional documentation, a better version would save me a maximum of 5 minutes a year. I probably won't be an early Typst adopter. But, I spend loads of time for example, working with dataframes in Python. I got into Polars fairly early because improvements in that space can…

If a better Latex only saves you 5 minutes per year, then that means, that you are either a latex god, who types 200wpm in special characters and talks latex fluently, or, that you don't actually write much documentation per year, or, that someone else has invested significant time to create all the document layout, macros, environments, etc. so that you only need to type the text.

My point is, that creating a proper latex document, specific to one's use case can consume many hours of time.

Re: Typst: A Possible LaTeX Replacement

#87

It has a paid version, which frightens me that future greatness of the software and eco-system may be over-shadowed by greed and control. Only paid version has "private packages".

The free online version doesn't have private packages. You are, of course, free to run the compiler locally with as many private packages as your heart desires.

Re: Typst: A Possible LaTeX Replacement

#88

These are some notes I wrote when I started out with typst when comparing with LaTeX: 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 vi…

> 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.

You can define macros anywhere you want, but you can only load packages in the preamble (before \begin{document}). I'm not familiar with Typst, but I would assume that it also requires you to load packages at the top of the document (or at least that's the only place that you would want to load packages).

> 6. It's easier to version control and diff, especially if you use semantic line breaks.

Semantic line breaks should be totally fine with LaTeX too.

> 2. Compiling is instant.

> 3. Diagnostics are way easier to understand (sort of like Rust compiler suggestion style).

Agreed, these are definitely LaTeX's biggest weaknesses.

Re: Typst: A Possible LaTeX Replacement

#89
post #13

Among alternative typesetting systems, there is also SILE, which supports two syntaxes (XML-based and TeX-style), supports scripting in lua, comes with freely available sort-of-specification (unlike (La)TeX or Typst, unless one counts program sources as specification). For formulae, it additionally allows direct MathML input. I have not used either Typst or SILE though, only looked into their documentation. HTML with…

> HTML with MathML may make a decent system as well

HTML is fine to write by hand (especially when you take advantage of tag omission [0]), but I can't imagine handwriting MathML, since even simple equations need lots of tags [1].

[0]: https://html.spec.whatwg.org/multipage/syntax.html#syntax-ta...

[1]: https://en.wikipedia.org/wiki/MathML#Presentation_and_semant...

Re: Typst: A Possible LaTeX Replacement

#90
post #32
post #17

Since there are typist folks here, how do you work with hash and dollar signs? If I want to write C# on my resume, I do C`#` but there has to be a better way?

I'm not a typst user but from a quick look at the language you should be able to type C\# You can also write a macro #let csharp = [C\#] And then use it as #csharp

Or even `#show "csharp": [C\#]` and then just write `csharp`. Though then you couldn't include the actual text "csharp" in your document, should you wish to, so perhaps defining the variable is a better option.
Post reply on HN