Appendix C — HTML document extensions

For a scientific report to be completely credible, it must be reproducible. The full computational environment used to derive the results, including the data and code used for statistical analysis should be available for others to reproduce. quarto is a tool that allows you integrate your code, text and figures in a single file in order to make high quality, reproducible reports. A paper published with an included quarto file and data sets can be reproduced by anyone with a computer.

Some common options for HTML include:

C.0.1 Adding Tab sets

A tab set looks like the following:

#### Example tab set {.tabset}

##### Tab 1

> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed eleifend velit. Sed porta pulvinar lorem ut rutrum. Etiam quis cursus libero. Donec nibh nisl, auctor quis sem in, feugiat convallis odio. Ut at euismod ligula. Nullam vitae quam non lacus scelerisque tempus. Sed tincidunt massa non nunc tincidunt feugiat. In hac habitasse platea dictumst.

##### Tab 2

```{r tab-plot}` r''
plot(iris$Sepal.Length, iris$Sepal.Width)
```

To add a tab set, you include {.tabset} after your heading

C.0.2 Floating table of contents

A floating table of contents can be added with the following lines in the YAML header:

---
title: "Your title"
author: "Your name"
output: 
  html_document:
    toc: true
    toc_float: true
---

C.1 Your turn

  1. Add tab sets to your document
  2. Add a floating table of contents