run_footnote function

Footnote for 'Word'

Footnote for 'Word'

Wraps a footnote in an object that can then be inserted as a run/chunk with fpar() or within an R Markdown document.

run_footnote(x, prop = NULL)

Arguments

  • x: a set of blocks to be used as footnote content returned by function block_list().
  • prop: formatting text properties returned by fp_text_lite() or fp_text(). It also can be NULL in which case, no formatting is defined (the default is applied).

Examples

library(officer) fp_bold <- fp_text_lite(bold = TRUE) fp_refnote <- fp_text_lite(vertical.align = "superscript") img.file <- file.path(R.home("doc"), "html", "logo.jpg") bl <- block_list( fpar(ftext("hello", fp_bold)), fpar( ftext("hello world", fp_bold), external_img(src = img.file, height = 1.06, width = 1.39) ) ) a_par <- fpar( "this paragraph contains a note ", run_footnote(x = bl, prop = fp_refnote), "." ) doc <- read_docx() doc <- body_add_fpar(doc, value = a_par, style = "Normal") print(doc, target = tempfile(fileext = ".docx"))

See Also

Other run functions for reporting: external_img(), ftext(), hyperlink_ftext(), run_autonum(), run_bookmark(), run_columnbreak(), run_comment(), run_footnoteref(), run_linebreak(), run_pagebreak(), run_reference(), run_tab(), run_word_field(), run_wordtext()

  • Maintainer: David Gohel
  • License: MIT + file LICENSE
  • Last published: 2025-03-23

Downloads (last 30 days):