#How to have variable width table columns
8 messages · Page 1 of 1 (latest)
in the table, specify columns: (1fr, 8fr, 1fr). You can also specify 10%, but then the whole table (including line widths etc.) will most likely be slightly wider than the actual available space: percent units are percent of the container width/height, while fraction units are fractions of the width/height available to distribute, and the available space will be a bit less than the total width/height.
hey thanks @spice wagon
I have one more question, how to give different fills to alternative rows of table
#let transactions = for t in data.transactions {
(image("image2.png"), str(t.merchantName), text([₹#t.amount]))
}
#table(stroke: none, columns: (10%, 80%, 10%) ,
..transactions)
I am using this, now here, where to specify row specific styling
See the example here: https://typst.app/docs/reference/model/table/#parameters-fill
its done for columns but you can adapt it