Quarto PowerPoint slide with two plots side by side and descriptive text at the bottom of the slide? #12634
-
DescriptionI'm following up on a StackOverflow question about creating a PowerPoint slide with Quarto that has two plots side by side and descriptive text at the bottom (screenshot below): As mentioned in the Quarto docs, this layout seems closest to the "Two Content" layout, which appears to support only two content blocks (e.g., plots), not additional text at the bottom. Is there a workaround for this? here is the code to reproduce the report:
Alternatively, I tried using fig-cap to add captions under each plot, but I'm having trouble controlling the caption font size. Adjusting the text box font size in the PowerPoint master slide didn't seem to affect the captions. Is there a way to style fig-cap text (specifically font size) directly from Quarto? Thanks in advance for any help! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
No. That's a Pandoc limitation.
Look at the theming using reference document from the documentation and ensure you are modifying the right style. Side note: please share simple reproducible example. Your example uses advanced knitr specific code and a very large dependency (tidyverse is not a small thing to request to install). |
Beta Was this translation helpful? Give feedback.
-
You would need to give us an example of this. However, another solution as you want plot + text is to leverage some R package like patchwork + ggtext for a text box, and maybe newest marquee (https://www.tidyverse.org/blog/2024/05/marquee-0-1-0/) This way you can create your desired layout using an image and insert in powerpoint. You won't be able to control the text below the two columns as Powerpoint text though. As mentioned above, producing PPTX from Quarto is limited by Pandoc support, and there is no built-in slide layout for what you are targeting. Only two content layouts, or comparison layout when there is text in the column also. As a R user, you can try to use officer to post process the pptx file and add your text below the plots 🤷 Not ideal, but could be helpful to automate anyway. |
Beta Was this translation helpful? Give feedback.
-
Hi Both, Thanks for the suggestions! I considered using patchwork or similar approaches, but as you mentioned, the text becomes static in PowerPoint and can’t be edited later—so that’s not ideal for my use case. Below is a simplified version of my example code. On the last slide, I’d like to change the font size of the caption. How can I do that? Also, @mcanouil mentioned "theming using a reference document." I tried specifying font sizes in the YAML header, but changing values like:
didn’t seem to affect the caption text. Should the caption font size be defined in the reference .pptx file, and if so, how exactly? I'd really appreciate if you can specify relevant documentation.
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the reference. I can't find how to control the figure caption font size in PowerPoint options (though setting fontsize in the YAML header works for other formats), but I'll keep looking. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much |
Beta Was this translation helpful? Give feedback.
Follow the documentation.