This is a followup question on top of Adding bullet before statement in powerpoint via officer in R
The script below is able to create a powerpoint slide with bullets, what if I want to insert a numbered list instead of bullet? I am aware of the unordered_list
function, I wonder if there is an equivalent ordered_list
function.
library(officer)
library(dplyr)
pptx.output.st00 <- read_pptx()
pptx.content1 <- c('sample sentence #1',
'sample sentence #2',
'sample sentence #3')
pptx.content2 <- block_list(fpar(ftext(c('sample sentence #1'),
prop = fp_text(font.family = 'Calibri',font.size=32))),
fpar(ftext(c('sample sentence #2'),
prop = fp_text(font.family = 'Calibri',font.size=32))),
fpar(ftext(c('sample sentence #3'),
prop = fp_text(font.family = 'Calibri',font.size=32))))
pptx.output.st01 <- pptx.output.st00 %>%
add_slide(.,layout = 'Title and Content',master = 'Office Theme') %>%
ph_with(.,value='Background',location=ph_location_type(type='title')) %>%
ph_with(.,value=pptx.content1,location=ph_location_type(type='body',id = 1)) %>%
ph_with(.,value=pptx.content2,
location = ph_location_template(left = 0.5,top = 5.25,width = 8.5,height = 2, type="body"),
level_list = 1:3)
print(pptx.output.st01,'presentation.output.pptx')