Reputation: 1687
I love floating TOCs in my Rmarkdown and prettydoc package but trying to use both seems impossible.
I just want to add a floating TOC to my HTML Pretty doc. This is my working yaml header
title: "testing TOCs"
author: "Joe"
output:
prettydoc::html_pretty:
theme: leonids
highlight: github
toc: true
Adding Floating TOC option issues an error message asking for Theme.
title: "Test floating TOC"
author: "joe"
output:
prettydoc::html_pretty:
theme: leonids
highlight: github
toc: true
toc_float: true
Error in rmarkdown::html_document(fig_retina = fig_retina, css = NULL, :
You must use a theme when specifying the 'toc_float' option
Calls: <Anonymous> ... do.call -> <Anonymous> -> <Anonymous> -> <Anonymous>
Upvotes: 9
Views: 3069
Reputation: 187
You should probably try rmdformats
. It offers toc support and great visuals -
https://cran.r-project.org/web/packages/rmdformats/vignettes/introduction.html
Upvotes: 1
Reputation: 85
Per GitHub documentation, toc_float does not work with prettydoc.
Upvotes: 3