PgBiel/typst-tablex

Fractional columns within `#block`

maxcrees opened this issue ยท 5 comments

The upgrade to Typst 0.7.0 has revealed one regression and one longstanding issue.

Consider the following:

#table(columns: 1fr, [1A. table])
#tablex(columns: 1fr, [1B. tablex])

#block(table(columns: 1fr, [2A. table plain block]))
#block(tablex(columns: 1fr, [2B. tablex plain block]))

#block(breakable: true, table(columns: 1fr, [3A. table breakable: true]))
#block(breakable: true, tablex(columns: 1fr, [3B. tablex breakable: true]))

#block(breakable: false, table(columns: 1fr, [4A. table breakable: false]))
#block(breakable: false, tablex(columns: 1fr, [4B. tablex breakable: false]))

The behavior of these examples was unchanged from at least Typst 0.0.3 to 0.0.6 and tablex 0.0.2 to 0.0.4:

image

Note how 2B and 3B are not drawn correctly.


Then, in Typst 0.0.7 and tablex 0.0.4, example 4B changed (to become incorrect like 2B and 3B). Note that only 4B changed; all other examples appear identical to the above:

image
PgBiel commented

Thanks for the detailed bug report. (This is likely related to #39)

I will investigate a solution as soon as I can.

PgBiel commented

Hi, I've pushed a fix to main with f00b91c. Can you please test and see if everything is working properly now? Thanks!

Thanks for the quick response on this. The linked commit appears to fix 2B, 3B, and 4B.
image

This also fixes the problem in my original document. Well done!

PgBiel commented

Hooray! Thanks for the feedback! ๐Ÿ˜„