Skip to content
Discussion options

You must be logged in to vote

I think you would need to use a knitr only solution (meaning not a Quarto configuration working also for other language).

You can change the default device with knitr using the dev chunk option

On the chunk you need

```{r, dev='cairo_pdf'}
#| label: fig-a
#| fig-cap: This is a figure caption.
library(ggplot2)

ggplot() +
  geom_segment(aes(x = 0, xend = 1, y = 1, yend = 0)) +
  xlab("\u0394")
```

Or globally in a setup chunk

```{r setup, include=FALSE}
knitr::opts_chunk$set(dev = "cairo_pdf")
```

or using Quarto specific syntax in YAML for engine (https://quarto.org/docs/computations/execution-options.html#engine-binding)

knitr:
  opts_chunk: 
    dev: cairo_pdf

This way, knitr should use g…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@arnaudgallou
Comment options

Answer selected by arnaudgallou
Comment options

You must be logged in to vote
2 replies
@baptiste
Comment options

@grantmcdermott
Comment options

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