1
votes

The following minimal R Markdown file minimal.Rmd produces different minimal.html output (via "Knit HTML" in RStudio) depending on my system. The first is the result on my Windows 8 machine. The second is the result on my Windows 7 (64-bit) machine. Differences:

  • Red syntax highlighting on in-line code in Win8 version
  • Bold header text in Win8 version

Differences persist even if I use different highlight styles like "tango" or even "null".

Q: What's going on? Shouldn't the output .html files be identical? Is RStudio not finding some important coloring package on one of my systems?

minimal.Rmd

---
title: "Minimal"
author: "Foo"
date: "Tuesday, May 19, 2015"
output: 
  html_document:
    highlight: default
---

Some hypertext: see <http://rmarkdown.rstudio.com>.

Inline code: `echo = FALSE`

Block code: 
```{r}
summary(cars)
x <- 3
y <- 5
x + y
mean(c(x,y))
```

minimal.html (Windows 8)

minimal8

minimal.html (Windows 7)

enter image description here

1
What happens if you copy the .html file from the Windows 8 machine and view it on the Windows 7 machine, and vice versa?Jonathan
@Jonathan, Same results for both. E.g., minimal7.html on the Win8 machine still doesn't have the red syntax highlighting.lowndrul

1 Answers

2
votes

We changed the treatment of code in a recent release of rmarkdown (the red was too strong). My guess is that you have two different versions of the rmarkdown package in play. If you update both systems to the most recent version from CRAN (v0.6.1 as of the time of this writing) then you should get consistent behavior.