Setting Global Options
In quarto documents, books or presentation, to set options like echo
, eval
, warning
, error
, include
, output
globally, we need to specify them under execute
yaml key.
So in quarto book, to set echo to true globally, we set echo: true
under execute
.
_quarto.yml
project:
type: book
execute:
echo: true
book:
title: "Quarto book"
author: "Jane Doe"
date: "8/7/2022"
chapters:
- index.qmd
- intro.qmd
- summary.qmd
- references.qmd
bibliography: references.bib
format:
pdf:
documentclass: scrreprt
Setting local options
And setting these options locally (for some specific chunk in a specific qmd page) is same as r-markdown.
Say in my index.qmd
, I can specify echo=FALSE
for a chunk like this,
index.qmd
# Preface {.unnumbered}
This is a Quarto book.
To learn more about Quarto books visit <https://quarto.org/docs/books>.
```{r echo=FALSE}
1 + 1
```