quarto-dev / quarto-dev/quarto-cli
Figure sizing is inconsistent between default and fragment output location in revealjs
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
When output-location is not specified for an R chunk, the resulting figure fills up the available space and is resized automatically.
When output-location: fragment, the figure is not resized, potentially extending beyond the slide.
I would expect the figure sizes to be the same for these two situations since fragment is supposed to just delay the figure display.
An example of this can be found in the embedded slide deck at https://mine-cetinkaya-rundel.github.io/quarto-tip-a-day/posts/05-output-location/.
- Quarto: I'm using dev quarto: 99.9.9
- RStudio: RStudio 2022.07.0-preview+544 "Spotted Wakerobin" Preview (3a56d20250c52c4b1690d909a00f17e4b4627e54, 2022-06-27) for macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 12_4_0) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36
- OS: macOS 12.4
Checklist
- formatted your issue so it is easier for us to read?
- included a minimal, self-contained, and reproducible example?
- documented the quarto version you're running, by providing the output produced by
quarto checkin a terminal in your issue? - documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the embedded slide deck linked in the issue and compare the figure produced by a default R chunk with one using output-location: fragment. Trace the revealjs output behavior responsible for sizing; done means both cases resize the figure consistently so it stays within the slide.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100