---
title: "Untitled"
mainfont: DejaVu Sans
output:
  html_document: default
  pdf_document:
    latex_engine: xelatex
  word_document: default
font-family: Times New Roman
---

## Getting ready for fonts

Notice that the yaml at the beginning of this file includes a latex_engine which will be used 
when creating a pdf document.

It also includes a mainfont setting called _DejaVu Sans_.  This is not the only font that will 
work to produce the spark graphs. However, it is a free font available through the
`extrafont` package.  If you have not installed extrafont you should do so using the normal
package installation procedures. You should then make sure that the desired font is installed.

The code below will not run automatically when you knit, instead you should run it in the
console. 

```
install.packages(c("extrafont"))
font_install("DejaVu Sans")
```

If there are any difficulties please read the extrafont documentation.

## Experimenting with rendering
 
```{r, message=FALSE}
library(knitr)
library(skimr)
```

Try knitting this document to PDF, HTML, doc or any other format you wish to try. You 
will notice that there are slight differences between them.  To understand the impact
of the engine and font choices you should experiment with different options.

The first example shows what printing the basic skim function looks like. 
You can try knitting to different formats to see how it changes.

```{r }
skim(iris)
```

It is possible that the histograms will not print in all of the formats.

Unfortunately this is outside the control of the skimr team because 
it relates to the operating system you are using, fonts installed, 
and locale. 

