I'm attempting to adjust the font size of figure captions rendered below a map/chart in PowerPoint (PPT).
The examples below have been produced using chunk options such as r world_map, fig.cap="[A LINK](./PATH/TO/*.html)"
and r car_chart, fig.cap="[ANOTHER LINK](./PATH/TO/*.html)"
respectively.
Slide with map and caption
library(tmap)
data("World")
m <- tm_shape(World, group = "World") +
tm_borders()
m
Slide with chart and caption
library(ggplot2)
data("cars")
p <- ggplot(cars, aes(x = speed, y = dist)) +
geom_point()
p
Solutions have been provided by @MartinSchmelzer for html and Word outputs, namely CSS
syntax and edits to the Word template.
The CSS
approach is not supported for PPT outputs, and editing the PPT template (*.potx
) is not an option either because, unlike Word, PPT does not explicitly support figure captions. The figure caption in PowerPoint is simply a text box placed next to a figure and grouped with it.
Given this, I looked for alternative solutions in the OfficeR
package by @DavidGohel. The example provided in the documentation uses a simple print
command to add text below a chart. In PPT, this would render in the next slide, not below the chart.
This OfficeR tutorial refers to "Picture with Caption" as a two columns slide (alike the PPT template), not as a text rendered below the map/chart.
As yet, neither I found a solution to format fig.cap
in PPT, nor I found another option to render a string of text below an chart/map in PPT. Does anyone know hoe to address this?