Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve linting to show that out-width and out-height are being ignored in revealjs when stretch is activated (globally or per slide) #9512

Open
Tracked by #8698
EmilHvitfeldt opened this issue Apr 28, 2024 · 2 comments
Labels
enhancement New feature or request lint linting-related issues revealjs Issues with the revealjs format
Milestone

Comments

@EmilHvitfeldt
Copy link
Contributor

Bug description

using out-width and out-height in chunks in revealjs documents appears to be ignored.

Steps to reproduce

---
format: revealjs
---

## out-width: 1000px

```{r}
#| out-width: 1000px
library(ggplot2)

ggplot(mpg, aes(displ, hwy, colour = class)) + 
  geom_point()
```

## out-width: 100px

```{r}
#| out-width: 100px
library(ggplot2)

ggplot(mpg, aes(displ, hwy, colour = class)) + 
  geom_point()
```

Expected behavior

I expected the figure would change the output of the figure files

Actual behavior

they appear unchanged

Screenshot 2024-04-27 at 8 43 33 PM Screenshot 2024-04-27 at 8 43 40 PM

Your environment

  • IDE: RStudio 2023.12.0+359
  • OS: Sonoma 14.4.1 (23E224)

Quarto check output

Quarto 1.4.553
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.553
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2021.12
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/emilhvitfeldt/Library/TinyTeX/bin/universal-darwin
      Version: 2021

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.11.7
      Path: /Users/emilhvitfeldt/.pyenv/versions/3.11.7/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.3
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/emilhvitfeldt/Library/R/arm64/4.3/library
        - /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
      knitr: 1.45
      rmarkdown: 2.26

[✓] Checking Knitr engine render......OK
@EmilHvitfeldt EmilHvitfeldt added the bug Something isn't working label Apr 28, 2024
@mcanouil
Copy link
Collaborator

This is because by default images are stretched, see https://quarto.org/docs/presentations/revealjs/advanced.html#stretch.

---
format: revealjs
---

## out-width: 1000px {.nostretch}

```{r}
#| label: code
#| out-width: 1000px
library(ggplot2)

ggplot(mpg, aes(displ, hwy, colour = class)) + 
  geom_point()
```

## out-width: 100px {.nostretch}

```{r}
#| ref-label: code
#| out-width: 100px
```

@mcanouil mcanouil added revealjs Issues with the revealjs format support a request for support and removed bug Something isn't working labels Apr 28, 2024
@cscheid
Copy link
Collaborator

cscheid commented Apr 28, 2024

It would be great for us to be able to detect this and issue a warning in our linter.

@cscheid cscheid added the lint linting-related issues label Apr 28, 2024
@mcanouil mcanouil added enhancement New feature or request and removed support a request for support labels Apr 28, 2024
@cderv cderv added this to the Future milestone May 1, 2024
@cderv cderv changed the title out-width and out-height appears ignored for revealjs Improve linting to show that out-width and out-height are being ignored in revealjs when stretch is activated (globally or per slide) May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lint linting-related issues revealjs Issues with the revealjs format
Projects
None yet
Development

No branches or pull requests

4 participants