Skip to content
Discussion options

You must be logged in to vote

There are many many ways to do what you want, below is one on a per code cell basis:

---
format: html
include-in-header: 
  - text: |
      <style>.plot-padding { padding: 3em 0 3em 0; }</style
---

Some text

```{r}
#| label: fig-one
#| fig-cap: Caption
#| echo: false
#| classes: plot-padding
plot(1)
```

Some text

Another for all "figures" (the ones with labels and captions) in a document:

---
format: html
include-in-header: 
  - text: |
      <style>figure { padding: 3em 0 3em 0; }</style
---

Some text

```{r}
#| label: fig-one
#| fig-cap: Caption
#| echo: false
plot(1)
```

Some text

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@mcanouil
Comment options

@ericpgreen
Comment options

@mcanouil
Comment options

@ericpgreen
Comment options

@mcanouil
Comment options

Answer selected by ericpgreen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants