Skip to content

State update in show rule affects element position #1886

Closed

Description

@freundTech

Description

When adding spacing before a heading, references to the heading still point to the heading:

#set heading(numbering: "1")
#show heading.where(level: 1): it => {
    pagebreak(to: "odd")
    it
}

= Hello World <hello>
#lorem(1500)
 = Hello Again
Go to @hello

However, when adding a state update before the page break references now point to before the page break, where the state update is.

#let s = state("s")
#set heading(numbering: "1")
#show heading.where(level: 1): it => {
    s.update(1)
    pagebreak(to: "odd")
    it
}

= Hello World <hello>
#lorem(1500)
 = Hello Again
Go to @hello

As state updates are invisible in the rendered document they should probably be ignored, as spacing and page breaks already are.

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Aug 8, 2023
  2. added
    needs-investigation
    on Nov 14, 2023
  3. added
    styling
    and removed on Nov 24, 2023
  4. changed the title [-]Label target search doesn't skip over state updates[/-] [+]State update in show rule affects element position[/+] on Feb 2, 2024
  5. removed
    needs-investigation
    on Feb 2, 2024
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

    bugstyling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions