How to force the scaling of the slide contents? #11318
-
DescriptionI prepare my presentations on my laptop, and then present them using a 'random' beamer projector. This means that I don't know the aspect ratio in advance. Sometimes it is similar to my laptop, sometimes it is almost a square. For this, I guess two conditions should be met:
It seems none of these are fully working in my case. How can I configure this? I did some tests with the Presentation Size options, but didn't get too far. (Sorry if I'm misusing terms, I am not an expert in CSS, HTML, etc.) Below is the Quarto code to reproduce, and here's a screencast of how I see it on my laptop (I test this by changing the preview window in VSC, but the same happens when changing Firefox or Chrome windows size to make it similar to the beamer projectors). Any suggestions on how to design an 'aspect-ratio safe' layout/code? Thanks in advance ---
title: "test"
subtitle: "I want all the content to be visible at all times"
format:
revealjs:
transition: fade
---
##
I would like the whole slide to be visible in different displays, especially a) my laptop and b) the PC where I give the presentation from. This means I expect the content to be scaled down/up according to the aspect ratio of the display.
However this seems to be not the case.
::::: columns
::: {.column width="50%"}
{fig-align="center" width="50%"}
:::
::: {.column width="50%"}
{fig-align="center" width="50%"}
:::
:::::
This first statement is always visible when I change size. But you can see that the last line of this paragraph gets lost when the display is shorter (vertically). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
This behavior is the one from Revealjs itself: https://revealjs.com/presentation-size/ We don't change it and Quarto Presentation inherit it. The scaling they do is presented as the following
It can be totally disable if needed, but I don't know the side effect. My understanding is that this scaling will adapt to the display keeping aspect ratio, but it won't change font size or else to fit more content in a bigger screen. So the width and height define the size, and it Quarto it defaults to 1050 x 700 Revealjs doc claims in can be made percent... maybe this would help in your case. I did not check if Quarto does have issue if those are passed in %. It shouldn't as this is all Revealjs doing. The other parameter Did you try several combination of those ? Honestly, if you don't manage to do what you want, I check Revealjs repo and ask there regarding which configuration they would recommand for this: https://github.com/hakimel/reveal.js |
Beta Was this translation helpful? Give feedback.
-
After some testing, I finally got it to work. Unsurprisingly, it was a very simple addition. Just added the ---
title: "test"
subtitle: "I want all the content to be visible at all times"
format:
revealjs:
transition: fade
height: 900 # I use 900 here to exaggerate the effect as shown in the video, but 800 already works well for my needs
---
##
I would like the whole slide to be visible in different displays, especially a) my laptop and b) the PC where I give the presentation from. This means I expect the content to be scaled down/up according to the aspect ratio of the display.
However this seems to be not the case.
::::: columns
::: {.column width="50%"}
{fig-align="center" width="50%"}
:::
::: {.column width="50%"}
{fig-align="center" width="50%"}
:::
:::::
This first statement is always visible when I change size. But you can see that the last line of this paragraph gets lost when the display is shorter (vertically). Now I can trust that I won't lose any content in my presentations :) Thanks again for all your hard work! |
Beta Was this translation helpful? Give feedback.
After some testing, I finally got it to work. Unsurprisingly, it was a very simple addition. Just added the
height
parameter into revealjs's format with a value larger than the default. The code below works perfectly, as seen in the new screencast.