ph_add_par: append paragraph

Description Usage Arguments Examples

View source: R/ppt_ph_add.R

Description

append a new empty paragraph in a placeholder

Usage

1
ph_add_par(x, type = NULL, id_chr = NULL, level = 1)

Arguments

x

a pptx device

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 slide_summary.

level

paragraph level

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(magrittr)

fileout <- tempfile(fileext = ".pptx")
default_text <- fp_text(font.size = 0, bold = TRUE, color = "red")

doc <- read_pptx() %>%
  add_slide(layout = "Title and Content", master = "Office Theme") %>%
  ph_with_text(type = "body", str = "A text") %>%
  ph_add_par(level = 2) %>%
  ph_add_text(str = "and another, ", style = default_text ) %>%
  ph_add_par(level = 3) %>%
  ph_add_text(str = "and another!",
    style = update(default_text, color = "blue"))

print(doc, target = fileout)

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