Skip to content

Not all fields available in show rule #2193

Closed

Description

@EpicEricEE

Description

Some fields can only be accessed if they are explicitly set, the default value can not be retrieved. For example:

#show figure: it => align(center, {
  it.body
  v(it.gap) // errors if gap is not explicitly set as an argument
  it.caption 
})

The same is true for all properties of outline. On the contrary, some fields such as figure.caption still exist even when they are not explicitly set.

Reproduction URL

No response

Operating system

Web app

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Sep 19, 2023
  2. added
    scripting
    styling
    on Sep 21, 2023
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

    bugscriptingstyling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions