gadenbuie / xaringanthemer

😎 Give your xaringan slides some style

Home Page:https://pkg.garrickadenbuie.com/xaringanthemer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No highlighting of R code input and output

luca-scr opened this issue · comments

I would like to remove any highlighting of R code input and output from slides.
I tried to set code_highlight_color but with no effect.
How can this be obtained using xaringanthemer?

To disable code highlighting you can use the highlightLines configuration parameter of remarkjs.

I think if you set

nature:
  highlightLines: false

in the xaringan output options that would disable syntax highlighting.

Thanks for your reply, but likely I was not clear on my question.

In the YAML preamble I have

output:
  xaringan::moon_reader:
    css: xaringan-themer.css

then I use xaringan-themer as follows

library(xaringanthemer)
style_mono_accent(
  base_color = "#5d81ab",
  inverse_background_color = "#3B4252",
  header_font_google = google_font("Fira Sans"),
  text_font_google   = google_font("Roboto"),
  code_font_google   = google_font("Fira Code"),
  base_font_size = "20px", 
  text_font_size = "1rem", 
  code_font_size = "0.7rem",
  header_h1_font_size = "1.5rem", 
  header_h2_font_size = "1.3rem", 
  header_h3_font_size = "1.15rem",
  code_highlight_color = "#272822",
  code_inline_color = "#000000",
  code_inline_font_size = "0.9rem"
)

The R code & output looks like the following screenshot.
Screenshot 2020-06-17 at 17 24 04

I would like to have all R code & output written in black (also comments is fine), so no syntax highlighting at all.

Sorry, I meant to say to use the highlightStyle remarkjs parameter. Setting highlightStyle: false will turn of syntax highlight entirely.

output:
  xaringan::moon_reader:
    css: xaringan-themer.css
    nature:
      highlightStyle: false