PgBiel / typst-tablex

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

Line wrapping causes math mode content to overrun the cell #48

Closed platformer closed 8 months ago

platformer commented 1 year ago

This works:

#tablex(
  columns: 3,
  [a: #lorem(7)], [b: $T h i s I s A L o n g A n d R a n d o m M a t h E p r e s s i o n$], [c]
)

image

But making cell a line wrap causes strange behavior:

#tablex(
  columns: 3,
  [a: #lorem(7)], [b: $T h i s I s A L o n g A n d R a n d o m M a t h E p r e s s i o n$], [c]
)

image

This is how the native table handles it:

#table(
  columns: 3,
  [a: #lorem(7)], [b: $T h i s I s A L o n g A n d R a n d o m M a t h E p r e s s i o n$], [c]
)

image

One could say it's still suboptimal, but the width of the content is respected.

PgBiel commented 1 year ago

Thanks for reporting; I'll take a look when possible.

PgBiel commented 8 months ago

Hello, sorry for the delay. The issue is now fixed for the next release (0.0.8). Thanks for reporting!

In the meantime, you can use tablex.typ from the 0.0.x branch - just download the file, place it in your project and import it.