使用Ubuntu家族字体设置Markdown文档



如何在RStudio中为这个.html Markdown文档(包括图形)设置Ubuntu家族字体?

---
title: "Untitled"
author: "Me"
date: "23/10/2014"
output: html_document
---
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r}
summary(cars)
```
You can also embed plots, for example:
```{r, echo=FALSE}
plot(cars)
```

对于整个文档,最简单的方法是使用基于Ubuntu字体的内置united主题。将output: html_document替换为:

output:
  html_document:
    theme: united

R Markdown无法控制图形对象内部使用的字体,因此您需要检查文档中所选的打印库才能做到这一点(以下是基本R的指南)。

最新更新