Skip to content

Support for emitting custom warnings #1322

Open

Description

@ondohotola

Description

In issue #1276 @Enivex proposed a very helpful solution for missing references.

However, I noticed that that will happily generate (?) (which I have adapted to ?? without reporting this, which means you may end up with orphan references.

I have not been able to find a way to make typst squeal so I can adapt the #show raw rule's missing condition.

Use Case

There should be other conditions where a warning type message triggered programatically might be helpful.

Activity

  1. added
    feature request
    on May 25, 2023
  2. laurmaedje commented on May 25, 2023

    @laurmaedje
    Member

    Related: #600

  3. added
    diagnostics
    on May 25, 2023
  4. changed the title [-]How to emit a "warning" of sorts when compiling a document?[/-] [+]Support for emitting custom warnings[/+] on Nov 14, 2023
  5. adrfantini commented on Nov 15, 2024

    @adrfantini

    Agreed. I programmatically generate Typst manuals and I strive not to make the generation fail, because this will allow me to see what the output looks like - however I do want to check the logs and see if I missed some keyword in my index files or if there is a typo, or anything for which I built-in a fallback, but it's not as nice as if it worked properly.

  6. Seilerflation commented on May 26, 2026

    @Seilerflation
  7. RicardStark commented on Oct 12, 2026

    @RicardStark

    I wanted to ask if there's been any behind-the-scenes progress on this front, as I have my own uses for emitting warnings instead of errors. All of the currently linked issues and pull requests are all a bit old. Is this simply on the back burner?

    I know the uniwarn package exists, but my preference would be for a built-in solution.

  8. laurmaedje commented on Oct 13, 2026

    @laurmaedje
    Member

    There hasn't been any progress.

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

    diagnosticsfeature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions