Skip to content

Instantly share code, notes, and snippets.

@remlapmot
Last active February 7, 2024 11:51
Show Gist options
  • Save remlapmot/4df708734d87ab9c736ccc12072841fb to your computer and use it in GitHub Desktop.
Save remlapmot/4df708734d87ab9c736ccc12072841fb to your computer and use it in GitHub Desktop.
Default R Markdown file to use in RStudio (from v1.3). File location: %appdata%\rstudio\templates ; on Mac/Linux: ~/.config/rstudio/templates
---
title: "Title"
author: "My Name"
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
html_document:
toc: true
toc_float:
collapsed: false
smooth_scroll: false
toc_depth: 3
code_download: true
code_folding: show
anchor_sections: true
highlight: arrow
fontsize: 11pt
urlcolor: blue
papersize: a4
monofont: "Fira Code"
---
```{r include=FALSE}
if (knitr::is_html_output()) require("Hmisc")
```
`r if (knitr::is_html_output()) Hmisc::hidingTOC(levels = 3)`
@remlapmot
Copy link
Author

  • Hmisc::hidingTOC() moves the table of contents to the right handside

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment