Skip to content

Customize pages generated by pagebreak(to:) #4438

Closed as not planned
Closed as not planned

Description

@dz4k

Description

Using the pagebreak function with the to argument will sometimes generate pages. These pages are affected by enclosing set rules (e.g. adding header and footer), but there's no way that I could find to apply rules just to those generated pages.

To fix this, I propose a new argument to pagebreak, generate-pages, which is called to create the pages inserted for even-odd alignment purposes. The default value would be () => page[].

Alternative solutions:

  • A method on location to check if the page the location is in was generated.
  • The same, but for checking if it was blank. This one would be more generally applicable, but it might be hard to define "blank" in a useful way.

Use Case

e.g.

  • remove header and footer from inserted pages to leave them blank
  • add "This page intentionally left blank" message

Activity

  1. added
    feature request
    on Jun 23, 2024
  2. Dherse commented on Jun 23, 2024

    @Dherse
    Contributor

    I would add that I think we should instead have a new method on location to determine whether the page is part of a "jump", allowing this feature to be done solely using a context on the header and footer and background for all of the aforementioned features. Otherwise, I think this makes a lot of sense!

  3. jamesrswift commented on Jun 24, 2024

    @jamesrswift
    Sponsor

    Could pagebreak be merged into 'page' with a weak: false param? Then redefine pagebreak using page.with

  4. freundTech commented on Jun 24, 2024

    @freundTech
    Contributor

    Related: #2722

  5. added
    layout
    on Jul 1, 2024
  6. laurmaedje commented on Jul 16, 2024

    @laurmaedje
    Member

    While #2722 is a bit tighter in scope, the intent is the same, so a well-designed solution covers both. So I'll close this as a duplicate.

  7. added
    duplicate
    on Jul 16, 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

    duplicatefeature requestlayout

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions