Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nstrayer/tuftesque2
A successor to the tuftesque blogdown theme. This time starting out as a rmarkdown theme.
https://github.com/nstrayer/tuftesque2
Last synced: 11 days ago
JSON representation
A successor to the tuftesque blogdown theme. This time starting out as a rmarkdown theme.
- Host: GitHub
- URL: https://github.com/nstrayer/tuftesque2
- Owner: nstrayer
- Created: 2019-04-24T01:11:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-05T01:02:07.000Z (over 5 years ago)
- Last Synced: 2024-10-11T11:02:31.879Z (about 1 month ago)
- Language: CSS
- Homepage: http://nickstrayer.me/tuftesque2
- Size: 10.5 MB
- Stars: 27
- Watchers: 5
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tuftesque2
## Install
```r
devtools::install_github('nstrayer/tuftesque2')
```## Use
Replace the `output` value in your `.Rmd` header with `tuftesque2::tuftesque`...
__Before:__
```yaml
...
author: "Nick Strayer"
date: "4/25/2019"
output: html_document
---
```__After:__
```yaml
...
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...
```__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)
```
:::::
````## Lightboxes
Thanks to [Félix M.](https://github.com/Felixmil), 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](https://user-images.githubusercontent.com/6764693/56853654-78d25200-68f0-11e9-9838-f2a7de5ceb31.gif)
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)
```
````
## WarningThis is under active development, use at your own peril.