1 year ago
#359604
Maral Dorri
Change line spacing of multiline text added to powerpoint presentation in R
I am creating a slide using my powerpoint presentation template that has edited master slides. The title and subtitle are following the formatting that I have defined in my slide master, but the body text is not.
my_pres <- read_pptx("my_template4.pptx")
my_pres <- add_slide(my_pres, layout = "Title and Content", master = "Office Theme")
my_pres <- ph_with(my_pres, value = "AVSEA CIO/OOI IT", location = ph_location_type(type = "title"))
my_pres <- ph_with(my_pres, value = "PoCs: Stephen McKnight (Lead) / XX (Follow)", location = ph_location_type(type = "subTitle"))
my_pres <- ph_with(my_pres, value = "this is some example
of my text that has multi lines
it prints correctly on my slides
every sentence on a new line is actually a new line in my presentation too",
location = ph_location(left = 0.6, top = 1.2, width = 4, height = 3))
print(my_pres, target = "first_example.pptx")
As a result, I am using the following to style my text.
fp_normal <- fp_text(color = "black", font.size = 13, font.family = "calibri")
Then i would edit the original line for the body text to:
my_pres <- ph_with(my_pres, value = fpar(ftext("this is some example
of my text that has multi lines
it prints correctly on my slides
every sentence on a new line is actually a new line in my presentation too",fp_normal)),
location = ph_location(left = 0.6, top = 1.2, width = 4, height = 3))
This works out just fine, but I would like to reduce the line spacing of my multiline text. I couldn't find an option in fp_text
to change the line spacing.
Is there a way to do this?
r
powerpoint
officer
0 Answers
Your Answer