Is it possible to add a floating toc with the Tufte theme in Rmarkdown?
This yaml works:
---
title: "My Analysis"
subtitle: "Day 7 to day 365 analysis"
date: "`r Sys.Date()`"
author: "My Name"
output:
tufte::tufte_html:
toc: true
toc_collapsed: true
tufte::tufte_handout:
citation_package: natbib
latex_engine: xelatex
bibliography: /home/rstudio-gavin/dh_d7_d365_RPI/radhoc/dh_d7_d365_RPI/skeleton.bib
link-citations: yes
---
This results in a table of contents at the top of the page. Hwoever, when I add toc_float: true
indented under tufte::tufte_html:
I get the error message:
Error in rmarkdown::html_document(..., extra_dependencies = c(extra_dependencies, : You must use a theme when specifying the 'toc_float' option
In searching, I found someone else having the same issue recently: floating TOC in tufte book · Issue #72 · rstudio/tufte · GitHub
If anyone knows how to use toc float with Tufte do share. Alternatively, if anyone knows of a theme that allows for two columns, one for main body and one for running commentary of the analysis, which I'm using Tufte for, also please share.