Skip to content

Weak pagebreak breaks pagebreak(to: _) #2841

Closed

Description

@lkndl

Description

Similar to #2473, combining a pagebreak(to: and a show rule to start chapters on a new page breaks the parity check.

#set page(paper: "a8", numbering: "1")
#show heading.where(level: 1): it => {
  pagebreak(weak: true)
  it
}

#lorem(20)
#pagebreak(to: "odd")

= Part 1
#lorem(45)

= Part 2
#lorem(20)

2023-12-03_15-34

Reproduction URL

No response

Operating system

Web app, Linux

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Dec 3, 2023
  2. added
    layout
    on Dec 4, 2023
  3. changed the title [-]Chaining pagebreaks breaks `to`[/-] [+]Weak pagebreak breaks `pagebreak(to: _)`[/+] on Feb 13, 2024
  4. laurmaedje commented on Feb 13, 2024

    @laurmaedje
    Member

    Smaller reproduction without a show rule:

    #lorem(10)
    #pagebreak(to: "odd")
    #pagebreak(weak: true)
    #lorem(10)
  5. added a commit that references this issue on Apr 4, 2024
  6. MatejKafka commented on May 21, 2024

    @MatejKafka

    As far as I can tell, the issue is unrelated to to:. From my experimentation, the actual issue is that if there's a strong pagebreak followed by a weak pagebreak, the weak pagebreak seems to override the strong one.

  7. added
    styling
    and removed
    layout
    on Aug 6, 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