PgBiel / typst-tablex

More powerful and customizable tables in Typst
Apache License 2.0
376 stars 13 forks source link

Bug with using measure and lines inside a table #80

Closed johannes-wolf closed 1 year ago

johannes-wolf commented 1 year ago

The following code returns a size of (0pt, 0pt), while measuring other elements like rect or box works.

#tablex(
  style(st => {
    measure(line(length: 1cm), st)
  })
)

This error occurs when trying to use cetz canvas (0.1.2) insides tablex, see https://github.com/johannes-wolf/cetz/issues/345.

PgBiel commented 1 year ago

This was actually a huge oversight by my part, and broke not only measuring lines but also, really, placing any lines inside the table, as I was using #show line: place.with(top + left, dy: some-constant-here). Thanks for reporting!