Using otf-fonts in Knitr’s LaTeX-Documents
      As I mentioned earlier I’ve wanted to use otf-fonts in ggplot2-graphics
Rmd-Files The next step is to use them in Knitr‘s RMarkdown-documents. That’s simple: Just use it as I showed earlier.
1 2 3 4 5 6 7 8 9 10 11 title: "demo" output: html_document ```{r} library(ggplot2) ggplot(mtcars, aes(x=wt, y=mpg, color=factor(gear))) + geom_point() + ggtitle("Fuel Efficiency of 32 Cars") + xlab("Weight (x1000 lb)") + ylab("Miles per Gallon") + theme(text=element_text(size=16, family="Source Code Pro")) ``` Rnw-Files But using these fonts in Rnw-files — that’s embedded R-code in LaTeX-files — seems to be a little more complex.