how do you maintain the default r markdown color when converting to html?

Use highlight: textmate in the YAML header.

For instance,

---
title: "Test"
output: 
  html_document:
    highlight: textmate
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## Test

```{r}
library("tidyverse")
```

knits to

result

Further reading

R Markdown: The Definitive Guide

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top