I am preparing a tutorial for a course and I want to change the colour of the error to be red. I am using BookDown and gitbook as my output format. But I found that the option class.output
is not working. I want to add a class to the output for the error message I get. How can I do that? You can use this as an example:
---
title: "Test Book"
author: "therimalaya"
site: bookdown::bookdown_site
output: bookdown::gitbook
---
# Hello World
```{r, error = TRUE, class.output="red"}
rnorm(-10)
```
This works if there is no error.