Open tcztzy opened 10 months ago
Thanks for reporting. Can you provide an example document? Does the document render as expected?
I think this is a known issue with the underlying tablex library (see PgBiel/typst-tablex#38), but I can attempt to verify that with an example.
Thanks for reporting. Can you provide an example document? Does the document render as expected?
I think this is a known issue with the underlying tablex library (see PgBiel/typst-tablex#38), but I can attempt to verify that with an example.
Thx for you reply, here is the minimal case reproduce. https://gist.github.com/tcztzy/a158907df215fa1409f48817110a71d0
Thanks! I'll plan to investigate this tomorrow or Saturday.
This appears to be a tbl-specific issue caused by the use of citations within the table data - in particular when the citation text is the dominating factor in determining the column width. If there is some other constraint that makes the width of the column larger than the citation text, then no warning is generated.
The apparent dependence on the citation style is actually due to the fact that each citation style generates text that is wider or narrower than the "Reference" column header you've provided. If the generated citation text is wider than "Reference", then the citations are dominating the column width calculation - and the bug is triggered.
For now, a possible workaround is to add a minimum width column modifier that is slightly bigger than the widest citation, e.g. w(1.6i)
in the example below:
```tbl
C C C Cw(1.6i)
R N.
Method | Year | Description | Reference
\_ | \_ | \_ | \_
RF | 1981 | Robinson-Foulds distance | @robinson1981
KF | 1994 | Kuhner-Felsenstein distance | @kuhner1994
PS | 1985 | Path similarity |
SPR | 1996 | Subtree prune and regraft distance | @hein1996
VTD | 2022 | Vectorial tree distance | @priel2022
For my future reference, here is a smaller reproducer:
L.
@foo
This will likely require extended time to resolve fully as it will necessitate debugging Typst itself to determine why the width measurements aren't converging.
I should also note that while the warning is troublesome and should be eliminated, it seems to me that the PDF output is otherwise correct. Whatever variances in the widths that are preventing the layout from converging must be exceedingly small.
I'll try to set aside some time next weekend to instrument the Typst compiler and figure out those variances exactly.
Issue is still present in Typst 0.8.0.
This issue will be fixed in the next release, which will switch from tablex
to native Typst tables.
I test all the styles, only "chicago-author-title" and "chicago-author-date" will occur this warning