ph_add_fpar {officer} | R Documentation |
append fpar
(a formatted paragraph) in a placeholder
ph_add_fpar(x, value, type = "body", id_chr = NULL, ph_label = NULL, level = 1, par_default = TRUE)
x |
a pptx device |
value |
fpar object |
type |
placeholder type |
id_chr |
placeholder id (a string). This is to be used when a placeholder type
is not unique in the current slide, e.g. two placeholders with type 'body'.
Values can be read from |
ph_label |
label associated to the placeholder. Use column
|
level |
paragraph level |
par_default |
specify if the default paragraph formatting should be used. |
library(magrittr) bold_face <- shortcuts$fp_bold(font.size = 30) bold_redface <- update(bold_face, color = "red") fpar_ <- fpar(ftext("Hello ", prop = bold_face), ftext("World", prop = bold_redface ), ftext(", how are you?", prop = bold_face ) ) doc <- read_pptx() %>% add_slide(layout = "Title and Content", master = "Office Theme") %>% ph_empty(location = ph_location(bg = "wheat", label = "myph")) %>% ph_add_fpar(value = fpar_, ph_label = "myph", level = 2) print(doc, target = tempfile(fileext = ".pptx"))