PgBiel / typst-tablex

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

Negative line expansion across cells #85

Open dixslyf opened 9 months ago

dixslyf commented 9 months ago

Negative line expansion does not work across cells:

#import "@preview/tablex:0.0.6": tablex, hlinex

#tablex(
  columns: (50pt, 50pt, 50pt),
  auto-lines: false,
  hlinex(),
  [], [], [],
  hlinex(expand: -40pt),
  [], [], [],
  hlinex(expand: -50pt),
  [], [], [],
  hlinex(expand: -60pt),  // Does not work
  [], [], [],
  hlinex(expand: -100pt),  // Does not work
)

image

More context: https://github.com/PgBiel/typst-tablex/issues/74#issuecomment-1815590377:

Indeed, when this feature was added I intended to add negative expand, but it turned out to be more complicated than I thought. The problem is mostly that the line can span multiple cells, and currently lines are broken down to each cell they span, so we'd need to reduce the line across cell boundaries. This will probably be done at some point, but will take a while. Thanks for the request!