knitr::opts_chunk$set(echo = TRUE, fig.cap = TRUE)
library(officedown)
library(officer)
fp <- fp_par(text.align = "center")
for(i in 1:4){
  knit_print_block(
    fpar(
      ftext("this is text ", fp_text(font.size = 12)),
      ftext(i, fp_text(font.size = 12, color = "red", bold = TRUE)),
      fp_p = fp
    ))
}
for(i in 1:4){
  knit_print_run(
      ftext("This is a text. ", fp_text(font.size = 10 + i*4)),
    )
}


Try the officedown package in your browser

Any scripts or data that you put into this service are public.

officedown documentation built on Sept. 3, 2023, 1:07 a.m.