Skip to contents

Used inside compute_cols() to signal the renderer to start a new page at every row matching the condition. Takes no arguments.

Usage

c_pageBreak()

Value

Action marker (internal use within compute_cols())

Details

Must be called inside compute_cols(). Each match emits a page-level break: with the default isContinues = FALSE the table is split into one Word table per page segment and the column header row is re-emitted per segment; the other actions of the same call still apply to their rows. Combines with any sibling action (e.g. c_style() to emphasize the new page start).

Examples

if (FALSE) { # \dontrun{
data <- data.frame(
  group = c("A", "A", "B", "B", "C"),
  value = c(1, 2, 3, 4, 5)
)

# Force a new page at the start of each group
spec <- create_table(data) |>
  compute_cols(firstOf(group), c_pageBreak()) |>
  create_report() |>
  write_doc(name = "pagebreak_demo", outDir = tempdir(),
            metaPath = tempdir(), verbose = FALSE)
} # }