logoalt Hacker News

rendawlast Tuesday at 10:21 AM2 repliesview on HN

I believe you can do those sorts of layouts in Typst (and Latex, and Sile!), but it's about how far out of the way you have to go and how much you fight the system in the process. I don't see any examples of Typst doing anything other than papers, I believe for good reason.

To be clear, I mean from a design perspective. Like take a print copy of Wired... how hard would it be to replicate any of those pages? Without using other software (aside from maybe cutting up stock photos). I can format scientific papers in HTML and it's not too hard, I can also format a cookbook, and it's not that hard. It's not great either!


Replies

lblumelast Tuesday at 11:51 AM

I found it much easier to use Typst to create any of these documents than any other software I used before. Just loading data from a JSON and incrementally regenerating the document on each change is game-changing for me.

andy12_last Tuesday at 11:01 AM

Honestly, I don't think that it would be too hard. With the grid function you can do a lot of things, specially because you can use grid.cell(rowspan:3, colswap:4) to make cells that span multiple rows or columns, use fractional sizes for the columns (1fr, 2fr, etc), and add independent insets and strokes for each cell, so you can already do a lot of the things you can achieve with css flexbox.

Though I suppose the docs could include tutorials for how to use them to make a more diverse kind of documents, and adding another layout function that behaves more like flexbox would be nice (though it wouldn't be too hard to create a function that re-creates the behaviour of flexbox based on the grid function).