PgBiel / typst-tablex

More powerful and customizable tables in Typst
MIT License
370 stars 12 forks source link

Allow `rowspan` and `colspan` to take `auto` #40

Open platformer opened 1 year ago

platformer commented 1 year ago

Description

Passing auto to rowspan or colspan would force the cell to take as much space as possible. For example:

#tablex(
  columns: 10,
  [a], colspanx(auto)[b], [c]
)

The b cell would span 8 columns.

Notes

I'm not sure what should happen if there are multiple automatically-sized spans in the same row/column. Either the available space could be divided evenly among each such cell, or it could be outright disallowed.

PgBiel commented 10 months ago

Could also play with the idea of allowing 1fr, 2fr syntax.

PgBiel commented 10 months ago

I am, however, unsure if this is feasible for rows, as theoretically there are unlimited rows. Could perhaps restrict that to a single page.