Chapter 6 Tufte Handouts

The Tufte handout style is a style that Edward Tufte uses in his books and handouts. Tufte’s style is known for its extensive use of sidenotes, tight integration of graphics with text, and well-set typography. This style has been implemented in LaTeX and HTML/CSS,5 respectively. Both implementations have been ported into the tufte package (Xie and Allaire 2018). If you want LaTeX/PDF output, you may use the tufte_handout format for handouts, and tufte_book for books. For HTML output, use tufte_html, e.g.,

---
title: "An Example Using the Tufte Style"
author: "John Smith"
output:
  tufte::tufte_handout: default
  tufte::tufte_html: default
---

Figure 6.1 shows the basic layout of the Tufte style, in which you can see a main column on the left that contains the body of the document, and a side column on the right to display sidenotes.

The basic layout of the Tufte style.

FIGURE 6.1: The basic layout of the Tufte style.

There are two goals for the tufte package:

  1. To produce both PDF and HTML output with similar styles from the same R Markdown document.

  2. To provide simple syntax to write elements of the Tufte style such as side notes and margin figures. For example, when you want a margin figure, all you need to do is the chunk option fig.margin = TRUE, and tufte will take care of the details for you, so you never need to think about LaTeX environments like \begin{marginfigure} \end{marginfigure} or HTML tags like <span class="marginfigure"> </span>; the LaTeX and HTML code under the hood may be complicated, but you never need to learn or write such code.

You can use the wizard in RStudio IDE from the menu File -> New File -> R Markdown -> From Template to create a new R Markdown document with a default example provided by the tufte package. Note that you need a LaTeX distribution if you want PDF output (see Chapter 1).

References

Xie, Yihui, and JJ Allaire. 2018. Tufte: Tufte’s Styles for R Markdown Documents. https://CRAN.R-project.org/package=tufte.