ph_with_ul: add unordered list to a pptx presentation

Description Usage Arguments Examples

View source: R/ppt_ph_with.R

Description

add an unordered list of text into an rpptx object. Each text is associated with a hierarchy level.

Usage

1
2
ph_with_ul(x, type = "body", index = 1, str_list = character(0),
  level_list = integer(0), style = NULL)

Arguments

x

rpptx object

type

placeholder type

index

placeholder index (integer). This is to be used when a placeholder type is not unique in the current slide, e.g. two placeholders with type 'body'.

str_list

list of strings to be included in the object

level_list

list of levels for hierarchy structure

style

text style, a fp_text object list or a single fp_text objects. Use fp_text(font.size = 0, ...) to inherit from default sizes of the presentation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(magrittr)
pptx <- read_pptx()
pptx <- add_slide(x = pptx, layout = "Title and Content", master = "Office Theme")
pptx <- ph_with_text(x = pptx, type = "title", str = "Example title")
pptx <- ph_with_ul(
  x = pptx, type = "body", index = 1,
  str_list = c("Level1", "Level2", "Level2", "Level3", "Level3", "Level1"),
  level_list = c(1, 2, 2, 3, 3, 1),
  style = fp_text(color = "red", font.size = 0) )
print(pptx, target = "example2.pptx") %>%
  invisible()

davidgohel/oxbase documentation built on June 15, 2018, 7:03 a.m.