Skip to content

"Tags weren't properly closed" for arbitrary sentence in report when adding more text at the start #8626

Closed

Description

@osingaatje

Description

While developing my thesis, the Typst compiler complains when I add text in fp.typ before "Brief History on Autograding". It seems to happen only when the text spans three paragraphs or five lines of text.

Maybe this is because it pushes the citation just to the edge of the page?

I fixed it temporarily by including #colbreak(), but this should really be fixed. I was scared I couldn't write my thesis anymore lol.

Operating system

Linux

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Jul 10, 2026
  2. laurmaedje commented on Jul 10, 2026

    @laurmaedje
    Member

    Could you turn the link into a permalink pinned to a specific revision to keep it reproducible?

  3. added
    pdf
    accessibility
    on Jul 10, 2026
  4. osingaatje commented on Jul 10, 2026

    @osingaatje
    Author

    Thanks for the feedback, here is the permalink with a minimal commit detailing the issue:
    https://codeberg.org/drwr/ut-master-thesis/commit/59a3b8d6912f45f91ec72da1c8080814c417630b

    I also adjusted the original link.

    EDIT: Happens as well in this spot: https://codeberg.org/drwr/ut-master-thesis/commit/fc6b4acc6ca6a1446bf93c8d674da5006b377ceb
    Comment out the colbreak() and it says 'tags unproperly closed'

  5. fosterbrereton commented on Jul 31, 2026

    @fosterbrereton

    I believe this will reproduce the issue. I hit this generating a four-column register with several hundred footnoted citations, but couldn't provide that as an example (sorry!)

    #set page(width: 6in, height: 4in, margin: 0.5in)
    #set text(size: 9pt)
    #columns(2)[
      #for i in range(1, 12) [
        Body paragraph #i with a citation#footnote[Source #i. A footnote entry long enough that a page cannot hold all of the ones planted on it, which forces the footnote area itself to break and continue onto the following page — the case a register with several hundred citations hits constantly.] and more running text after it.
      ]
    ]
    $ typst compile repro.typ
    error: internal error: parent group (occurred at crates/typst-pdf/src/tags/tree/build.rs:202:14)
     = hint: please report this as a bug
    

    The minimal case trips the sibling assertion at build.rs:202 (parent group), not the one in this issue's title at build.rs:187 (tags weren't properly closed). Both are the tag tree failing to balance in the same file; I assume they're the same cause?

    Environment: typst 0.15.1 (current release), macOS 15.7.1, arm64.

  6. saecki commented on Aug 28, 2026

    @saecki
    Member

    I believe this will reproduce the issue. I hit this generating a four-column register with several hundred footnoted citations, but couldn't provide that as an example (sorry!)

    #set page(width: 6in, height: 4in, margin: 0.5in)
    #set text(size: 9pt)
    #columns(2)[
    #for i in range(1, 12) [
    Body paragraph #i with a citation#footnote[Source #i. A footnote entry long enough that a page cannot hold all of the ones planted on it, which forces the footnote area itself to break and continue onto the following page — the case a register with several hundred citations hits constantly.] and more running text after it.
    ]
    ]

    $ typst compile repro.typ
    error: internal error: parent group (occurred at crates/typst-pdf/src/tags/tree/build.rs:202:14)
     = hint: please report this as a bug
    

    The minimal case trips the sibling assertion at build.rs:202 (parent group), not the one in this issue's title at build.rs:187 (tags weren't properly closed). Both are the tag tree failing to balance in the same file; I assume they're the same cause?

    Environment: typst 0.15.1 (current release), macOS 15.7.1, arm64.

    I could reproduce this, but I don't know if this is necessarily related, could you open another issue?
    This might be more related to #8487

  7. saecki commented on Aug 28, 2026

    @saecki
    Member

    Thanks for the feedback, here is the permalink with a minimal commit detailing the issue: https://codeberg.org/drwr/ut-master-thesis/commit/59a3b8d6912f45f91ec72da1c8080814c417630b

    I also adjusted the original link.

    EDIT: Happens as well in this spot: https://codeberg.org/drwr/ut-master-thesis/commit/fc6b4acc6ca6a1446bf93c8d674da5006b377ceb Comment out the colbreak() and it says 'tags unproperly closed'

    I tried to reproduce this, but couldn't get the error on Typst 0.14.2, 0.15.1 and the current main branch. I checked out commit 59a3b8d (had to edit the submodules to use https instead of ssh, so I could fetch them), and commented out the colbreak on line 72 in fp.typ. Did I miss anything? Could you check if you can still reproduce this?

  8. osingaatje commented on Aug 31, 2026

    @osingaatje
    Author

    Thanks for the feedback, here is the permalink with a minimal commit detailing the issue: https://codeberg.org/drwr/ut-master-thesis/commit/59a3b8d6912f45f91ec72da1c8080814c417630b
    I also adjusted the original link.
    EDIT: Happens as well in this spot: https://codeberg.org/drwr/ut-master-thesis/commit/fc6b4acc6ca6a1446bf93c8d674da5006b377ceb Comment out the colbreak() and it says 'tags unproperly closed'

    I tried to reproduce this, but couldn't get the error on Typst 0.14.2, 0.15.1 and the current main branch. I checked out commit 59a3b8d (had to edit the submodules to use https instead of ssh, so I could fetch them), and commented out the colbreak on line 72 in fp.typ. Did I miss anything? Could you check if you can still reproduce this?

    Tried to reproduce it myself and I can't seem to anymore as well (commenting out the colbreak in "a brief history ..." does not break compilation). Seems to have been fixed with other improvements. Nice!
    I'll go ahead and close this issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilitybugpdf

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions