Skip to content

nstrayer/tuftesque2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tuftesque2

Install

devtools::install_github('nstrayer/tuftesque2')

Use

Replace the output value in your .Rmd header with tuftesque2::tuftesque...

Before:

...
author: "Nick Strayer"
date: "4/25/2019"
output: html_document
---

After:

...
author: "Nick Strayer"
date: "4/25/2019"
output: tuftesque2::tuftesque
---

Side-notes

Text notes:

To do a plain text sidenote just wrap whatever you want in square brackets [...] followed by curly brackets with .side-note inside...

Normal text [an insightful sidenote]{.side-note} and some more text...

Screen Shot 2019-04-25 at 3 17 21 PM

Arbitrary notes:

If you want to put a plot or other more complicated values in your side-note you simply wrap everything in colon buffers:

::::: {.side-note}

You can even do plots in the side notes! 

```{r, echo=FALSE}
library(magrittr)
library(ggplot2)
tibble::tibble( x = rnorm(200) ) %>% 
  ggplot(aes(x = x)) + 
  geom_histogram(bins = 100)
```
::::: 

Screen Shot 2019-04-25 at 3 18 31 PM

Lightboxes

Thanks to Félix M., if you want to allow the reader to view a plot without any distraction you can make it lightbox-able. To do this simply add the class of 'lightbox' to the chunk generating the plot.

```{r, class = 'lightbox'}
ggplot(data, aes(x = x)) + 
  geom_histogram(bins = 100)
```

lightbox demo

You can even stack these with sidenote plots for even more convenience.

```{r, class = 'side-note lightbox'}
ggplot(data, aes(x = x)) + 
  geom_histogram(bins = 100)
```

Warning

This is under active development, use at your own peril.

About

A successor to the tuftesque blogdown theme. This time starting out as a rmarkdown theme.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published