You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Internal Error: Tags Not Properly Closing On Footnote In Table In Grid/Stack Near A Pagebreak #9067
Was working with fitch style proofs involving a lot of nested tables and grids (not the best for accessibility probably I admit) and ran into this error:
error: internal error: tags weren't properly closed (occurred at crates/typst-pdf/src/tags/tree/build.rs:190:5)
= hint: please report this as a bug
I created a MWE by diligently eliminating bits of my spaghetti code through trial and error after awhile ending up with:
It definitely seems like the issue is with the footnote on a pagebreak. Modifying different pieces to cause the footnote to not be near the pagebreak causes the code to compile fine. The code also compiles fine when compilling with --no-pdf-tags
Also interestingly, if you replace the outer grid with stack:
error: internal error: tags weren't properly closed (occurred at crates/typst-pdf/src/tags/tree/build.rs:187:9)
┌─ chapter-2.typ:6:3
│
6 │ #lorem(1)
│ ^^^^^^^^
│
= hint: please report this as a bug
You get an error for a different rust line (187 vs 190) that specifically points out line 6. I also have intuited from my trial and error that line 6, #lorem(1) is more than just additional spacing that causes the footnote to fall on the pagebreak and error. It's as if the footnote is attaching to #lorem(1) somehow? And a pagebreak causes it to not be properly closed?
Activity
saecki commentedon Nov 13, 2026
This is very likely the same underlying problem as in the issues you've linked and #8890.
I haven't investigated this though.