Skip to content

Set rule inside show rule (closure) for the same element gets applied for table/grid #6219

@Andrew15-5

Description

@Andrew15-5

Description

From #6218.

The next "set in show" rules should all do nothing, but for table/grid this is not the case.

/// Doesn't work
#show outline: it => {
  set outline(title: "Custom")
  it
}
#outline()

/// Doesn't work
#show heading: it => {
  set heading(numbering: "1.")
  it
}

#heading[Heading]

/// Doesn't work
#show heading: it => {
  set math.equation(numbering: "(1)")
  it
}

$ x = y $

/// Works
#show table: it => {
  set table(stroke: red)
  it
}

#table[]

/// Works
#show grid: it => {
  set grid(stroke: red)
  it
}

#grid[~]

Image

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstylingAbout set and show rules or style properties

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions