PgBiel / typst-tablex

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

Division by Zero with long cell content #19

Closed RolfBremer closed 1 year ago

RolfBremer commented 1 year ago

The following tablex definition causes a

error: cannot divide by zero
     ┌─ C:\Users\...\tablex.typ:1100:25
     │
1100 │             fair_share = remaining / auto_cols_remaining
     │                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Her is the table definition:

#tablex(
    columns: 3,

    [Name],[Entität],[Eigenschaft],
    [GammaTaurus],[ThisIsASuperlongSymbolicName which is similar important as Supercalifragilistic],[],
)
RolfBremer commented 1 year ago

When I put some linebreaks into the content (second column), it works fine.

PgBiel commented 1 year ago

Fixed in e75ce1a9e74c7ee00b460e0b97fbd6f7955d13fb, thanks!

RolfBremer commented 1 year ago

That was fix - works fine now! Thank you for the excellent component!

PgBiel commented 1 year ago

That's great to hear! You're welcome! :handshake: