#How to have variable width table columns

8 messages · Page 1 of 1 (latest)

dark blaze
#

I have a requirement for full page filling table, with first column spanning 10%, 2nd 80 and 3rd 10% how can this be done

spice wagon
#

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.

dark blaze
#

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

severe vessel
#

its done for columns but you can adapt it