Skip to content

Adjustment to typst version 0.13.0 #12

@joonas-si

Description

@joonas-si

With the new typst release (0.13.0) chem-par produces the following error:

error: type state has no method display
┌─ @preview/chem-par:0.0.1\src\stateful.typ:6:34

6 │ Chemistry-Style-disable-state.display(bDisable =>{

Typst removed the .display method and replaced it with .get (see https://typst.app/docs/changelog/0.13.0/)

In my local environment I fixed it with changing the if-state-enabled function to this:

#let if-state-enabled( it , fn ) = context {
    if (Chemistry-Style-disable-state.get() == false){return it}
    return fn
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions