Ppt centralized slide title
Using the package ReporteRs
, we can create a power point presentation from R code. I tried to create a Power Point slider with a title centered .
Here's the basic code I'm using to create the slide:
library( ReporteRs )
mydoc = pptx( ) # try adding argument: template = 'template.pptx' here
mydoc = addSlide( mydoc, "Title and Content" )
mydoc = addTitle( mydoc, "This is a title" )
writeDoc( mydoc, "pp_simple_example.pptx" )
This creates a slide with the title on the left. Sorry, addTitle
do not expose any arguments to format the text or change its position. I also looked in package options:
options()[grep('ReporteRs',names(options()))]
but without success.
+3
source to share
1 answer
One solution is to use a predefined template (as mentioned below my question) To create a template:
- Presentation creation
- Choose a template where the text is centered. You can add a dummy slide with text and choose one of the predefined themes (Design tab)
- Don't forget to delete the slide. and save your presentation as
basic_template.ppx
Now in R code to use this pattern:
mydoc = pptx( template='basic_template.pptx') ## give the whole path here
+4
source to share