block_caption

0th

Percentile

Caption block

Create a representation of a caption that can be used for cross reference.

Usage
block_caption(label, style, autonum = NULL)
Arguments
label

a scalar character representing label to display

style

paragraph style name

autonum

an object generated with function run_autonum

See Also

Other block functions for reporting: block_list(), block_pour_docx(), block_section(), block_table(), block_toc(), fpar(), plot_instr(), unordered_list()

Aliases
  • block_caption
Examples
# NOT RUN {
library(magrittr)
library(officer)

run_num <- run_autonum(seq_id = "tab", pre_label = "tab. ", bkm = "iris_table")
caption <- block_caption("iris table",
                         style = "Normal",
                         autonum = run_num )

doc <- read_docx() %>%
  body_add("A title", style = "heading 1") %>%
  body_add("Hello world!", style = "Normal") %>%
  body_add(caption) %>%
  body_add(iris, style = "table_template")

print(doc, target = tempfile(fileext = ".docx") )
# }
Documentation reproduced from package officer, version 0.3.14, License: GPL-3

Community examples

Looks like there are no examples yet.