PgBiel / typst-tablex

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

tablex inside tablex results issues of following tablex #28

Closed yomannnn closed 1 year ago

yomannnn commented 1 year ago

Hi, btw: thank you for the marvellous library! I observed a strange behaviour: tablex inside tablex results in spacing (column width) issues of following tablex. See example below .... Many thanks ...

// tested with typst-tablex (v0.0.4)
#let mycell = [
  #tablex(
    columns: (1fr, 1fr),
    [A],[A]
  )
]

= table inside a table
#tablex(
  columns: (1fr, 1fr),
  mycell, mycell
)

= following table fails
*Problem/Observation*:  just one column "C"

*Expected Outcome*: Two columns

#tablex(
  columns: (1fr, 1fr),
  [C],[C]
)
PgBiel commented 1 year ago

Interesting. This doesn't seem to happen when the columns of the last tablex call aren't 1fr. As you present it, however, the last table has zero-sized columns. I'll investigate it when I can. Thanks for reporting!

PgBiel commented 1 year ago

Hi, I've pushed a fix to main in https://github.com/PgBiel/typst-tablex/commit/f00b91c7d9383ebd194fb9e36ee5999339c38891. Can you test and see if it's working properly now? (I'll mark this issue as solved soon, as my own tests seem to indicate this was fixed). Thanks!

yomannnn commented 1 year ago

Hi, I did a quick test and the issue seems to be solved. I will continue to do some tests and feedback if I detect the issue again. Many thanks for your support!