You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This concerns the side-effect of functions like grid::convertUnit() which requests information from the graphics device. If a graphics device is not available, R will open one as a side-effect. The issue concerns whether this then gets rendered as an image.
litedown will render an empty canvas in these cases:
In rmarkdown (and quarto), the rendering is suppressed:
I'm not sure how it's implemented in rmarkdown/quarto, but if it's not too much hassle I think this behavior is desirable to implement for litedown. Please LMK what you think!
Reprex:
f <- tempfile(fileext = ".Rmd")
writeLines("
---
title: reprex
---
```{r}
library(grid)
g <- pointsGrob()
x <- convertUnit(g$x, 'mm')
x
```
", f)
rmarkdown_html <- rmarkdown::render(f)
browseURL(rmarkdown_html)
litedown_html <- litedown::fuse(f)
browseURL(litedown_html)
The text was updated successfully, but these errors were encountered:
I'll see if I can suppress this empty plot. In the mean time, you can use the chunk option fig.path = NULL to avoid capturing the plot on litedown's side: https://yihui.org/litedown/#sec:option-fig Thanks for the report!
This concerns the side-effect of functions like
grid::convertUnit()
which requests information from the graphics device. If a graphics device is not available, R will open one as a side-effect. The issue concerns whether this then gets rendered as an image.litedown will render an empty canvas in these cases:
In rmarkdown (and quarto), the rendering is suppressed:
I'm not sure how it's implemented in rmarkdown/quarto, but if it's not too much hassle I think this behavior is desirable to implement for litedown. Please LMK what you think!
Reprex:
The text was updated successfully, but these errors were encountered: