typst-tablex icon indicating copy to clipboard operation
typst-tablex copied to clipboard

compiler warning after typst.app released to 0.7.0

Open simfeng opened this issue 2 years ago • 11 comments

[layout did not converge within 5 attempts hint: check if any states or queries are updating themselvesline 1]

simfeng avatar Aug 08 '23 00:08 simfeng

That is unfortunately a limitation of the current tablex implementation which can manifest itself depending on your table. This should be improved, if not fixed, on the planned overhaul for version 0.1.0. Thanks for reporting!

PgBiel avatar Aug 08 '23 04:08 PgBiel

By the way, feel free to share examples of tables which cause this warning to occur for further investigation.

PgBiel avatar Aug 08 '23 12:08 PgBiel

This one triggers it, but if you remove one line (or the two header command lines) it doesn't.

#import "@preview/tablex:0.0.4": *
#align(center)[
   #tablex(
      columns: (2),
      repeat-header: true,
      header-rows: 1,
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
   )
]

ondohotola avatar Aug 08 '23 12:08 ondohotola

here is my code in ieee template

#import "@preview/tablex:0.0.4": tablex, hlinex, vlinex, colspanx, rowspanx, 
#import "template.typ": *
#show: ieee.with(
  title: "",
  abstract: [
  ],
  authors: (
  ),
  index-terms: (),
  bibliography-file: "refs.bib",
)

// #set cite(style: "chicago-author-date")
#let mtkgr = "aaaaaaa"
#let top5 = "Top-5"
#let top1 = "Top-1"
#let test_table = tablex(
  columns: 5,
  align: center + horizon,
  auto-lines: false,
  repeat-header: true,

  /* --- header --- */
  hlinex(),
  rowspanx(2)[], colspanx(2)[*Food Acc / %*], (), colspanx(2)[*Ingredient F1 / %*], (),
  (),  (), [*#top1*], [*#top5*], [*Micro*], [*Macro*],
  hlinex(),
  /* -------------- */
  [$s$], [$-$], [$-$], [$-$], [$-$],
  [$mtkgr$], [$-$], [$#sym.hyph$], [$#sym.hyph$], [$#sym.hyph$],
  [$mtkgr_0$], [$-$], [$#sym.hyph$], [$#sym.hyph$], [$#sym.hyph$],
  [$mtkgr_0$], [$-$], [$#sym.hyph$], [$#sym.hyph$], [$#sym.hyph$],
  [$mtkgr_{0.3}$], [$-$], [$#sym.hyph$], [$#sym.hyph$], [$#sym.hyph$],
  hlinex(),
)
#figure(
  placement: top,
  test_table, 
  caption:[table name.],
  kind: "table",
  supplement: [Table]
) <test_figure>

and there is easy way to fix it is to #let mtkgr = "aaaaaa" reduce a char a, I can also do #let top1 = "Top-", also work. So, I think is the text length bigger then the column length will trigger this problem, as shown in the figure below, the last row has to much char a. 截屏2023-08-08 21 16 30

hope this helps.

simfeng avatar Aug 08 '23 13:08 simfeng

Thank you for the examples, everyone. I think this might be related to how headers work right now (they will be reworked in v0.1.0). Not 100% sure if that's the cause, though.

For future readers: feel free to add more examples as replies to this thread!

PgBiel avatar Aug 08 '23 14:08 PgBiel

This triggers it:

#import "@preview/tablex:0.0.4": tablex

#tablex(
  tablex(
    tablex(
      lorem(20) 
    )
  )
)

It doesn't happen if 20 is reduced to 10.

wlupton avatar Aug 09 '23 13:08 wlupton

Found another example which causes it. In this case, as soon as the table spans 3 pages, the warning pops up:

#import "@preview/tablex:0.0.4": tablex

#tablex(
  repeat-header: true,
  ..lorem(219).split("o")
)

Not sure why it would happen at 3 and not 5 but anyways.

jannisko avatar Aug 10 '23 16:08 jannisko

This triggers it:

#import "@preview/tablex:0.0.4": tablex

#tablex(
  tablex(
    tablex(
      lorem(20) 
    )
  )
)

It doesn't happen if 20 is reduced to 10.

This specific case seems to have been fixed with my latest commits in main for the soon-to-be-released v0.0.5 :+1: (Make sure to eventually give it a shot :eyes:)

PgBiel avatar Aug 12 '23 01:08 PgBiel

This one triggers it, but if you remove one line (or the two header command lines) it doesn't.

#import "@preview/tablex:0.0.4": *
#align(center)[
   #tablex(
      columns: (2),
      repeat-header: true,
      header-rows: 1,
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
      [Test], [test],
   )
]

Still triggers on 0.0.5

ondohotola avatar Aug 20 '23 16:08 ondohotola

#import "@preview/tablex:0.0.4": tablex

#tablex( repeat-header: true, ..lorem(219).split("o") )

Still triggered in 0.0.5

ondohotola avatar Aug 20 '23 16:08 ondohotola

Thanks for checking. I haven't addressed the issue with repeatable headers yet - this will come in v0.1.0.

PgBiel avatar Aug 20 '23 17:08 PgBiel