Grid stroke dynamic to text height


First row is a grid.
second row is a table.
6
I would like to be able to change the stroke appearence with its width/height according to text, so that it won’t be as tight as it is now.
I know that stroke is somewhat defined as a rectangle around the text, but i’m not good in typst-coding and don’t know how to access the right parameter to change this.
I would like to have a bit more spacing with the

Example Code:

#grid(columns: 3, stroke: 0.5pt,
column-gutter: 2pt,
[1. Lorem Ipsum],[2. Lorem Ipsum],[3. Lorem Ipsum],
)

#table(columns: 3, stroke: 0.5pt,
column-gutter: 2pt,
[1. Lorem Ipsum],[2. Lorem Ipsum],[3. Lorem Ipsum],
)

You can change text bounds within a table to auto-adjust inset for current text.

#show table: set text(top-edge: "bounds", bottom-edge: "bounds")
#table(columns: 3, inset: 2pt, stroke: 0.5pt, ..(lorem(2),) * 3)
#table(columns: 3, inset: 2pt, stroke: 0.5pt, ..(lorem(1),) * 3)

image

Welp, yeah…inset it is…that was a stupid question. Thanks for pointing that out :D

2 Likes