wch / webshot

Take screenshots of web pages from R
http://wch.github.io/webshot/
227 stars 40 forks source link

incorrect formatting with rmdshot #121

Closed RKonstantinR closed 1 year ago

RKonstantinR commented 1 year ago

I created a quarto document using callout blocks and grid.

When I render this document in rstudio the formatting is displayed correctly: изображение

But when I use rmdshot formatting is not displayed correctly: изображение

Is there a way to fix this?

Quarto doc:

---
title: "repex"
format:
  html:
    embed-resources: true
    page-layout: full
editor: visual
---

```{r, echo=FALSE, warning=FALSE, message=FALSE}
library(echarts4r)
library(tibble)

::: grid ::: g-col-2 ::: {.callout-note icon="false"}

one

1 ::: :::

::: g-col-2 ::: {.callout-note icon="false"}

two

2 ::: :::

::: g-col-2 ::: {.callout-note icon="false"}

three

3 ::: :::

::: g-col-2 ::: {.callout-note icon="false"}

four

4 ::: :::

::: g-col-2 ::: {.callout-note icon="false"}

five

5 ::: :::

::: g-col-2 ::: {.callout-note icon="false"}

six

6 ::: ::: :::

::: grid ::: g-col-2 ::: border ::: ticker_name TEXT :::

::: board_name SUBTEXT ::: :::

::: {.callout-tip appearance="minimal"} foo: bar

foo: bar

foo: bar ::: :::

::: g-col-10


plot(mtcars$cyl)

::: :::


R script:

library(webshot)

webshot::rmdshot("test.qmd", file = "tst.png")

wch commented 1 year ago

Sorry, this probably is not fixable with webshot, because it uses a very old headless browser which hasn't been developed since 2018. I'll make this clearer in the README. Please use webshot2 instead.