News for hackers. Stuff that matters.
Re:Typst: A Possible LaTeX Replacement by gucci-on-fleek on Saturday September 27, 2025 @06:40AM (#45394654)
> 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 by mastermage on Saturday September 27, 2025 @11:28AM (#45396569)
I am 95% sure that you can import wherever you want. I remember doing it with Tables i defined in an extra document and then imported only where i actually needed them.
Re:Typst: A Possible LaTeX Replacement by fn-mote on Saturday September 27, 2025 @04:58PM (#45399258)
There are multiple kinds of import in latex.

The GP specifically mentions packages, so means \usepackage.