How can I use LaTeX package 'coffee4' to export an .Rmd to a Tufte Handout style .pdf?

111 Views Asked by At

In this video at around 7:30 into the video, Yihui Xie make a demo of the package coffee4 which adds random coffee stains to a document. However, he is showing them in a regular LateX style pdf. I am wondering if I could also use this package or an adopted version of it when creating a pdf in the style of tufte-handout. Grateful for help on how I should go about in order to achieve such a result. In particular I am wondering how to download and install the coffee4 package in RStudio and what to write in the YAML or in R code in the document itself.

1

There are 1 best solutions below

0
On

If you place coffee4.sty somewhere latex can find it, e.g. the same folder as your .rmd file, then you can use it like this:

---
title: "An Example Using the Tufte Style"
author: "John Smith"
output:
  tufte::tufte_handout: default
header-includes:
  - \usepackage{coffee4}
---

\cofeAm{1}{1.0}{0}{5.5cm}{3cm}
test