PgBiel / typst-tablex

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

Superfluous row when using cells with arbitrary `y` #16

Closed PgBiel closed 1 year ago

PgBiel commented 1 year ago

The usage of tablex shown below has the following (unexpected) output, with one more row than necessary:

#tablex(
  columns: 3,
  [a],
  cellx(y: 2)[a]
)

image

PgBiel commented 1 year ago

These lines seem to be cause. https://github.com/PgBiel/typst-tablex/blob/b3b441f253f77afd56822faa2f3ff47d8cc87ab4/tablex.typ#L231-L235 I might just remove them, as trying to predict the grid length is just an heuristic after all, and having an "incomplete row" is fixed by the last few lines of the grid generator function (which goes over any none items in the grid and replaces them with empty cells).

PgBiel commented 1 year ago

Fixed in 7780d916a9be2bce064f9cf9a4548156f4b9c57e.