---
title: "Output Rendering"
subtitle: "Subtitle is skipped from the TOC"
author: "Author is skipped from the TOC"
date: "Date is skipped from the TOC"
---

```{r include = FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
```

This vignette tests pkgdown output rendering for several use cases.

## Footnotes

Yay[^footnote]

[^footnote]: Including **footnotes**! 😁

## Figures

```{r}
plot(1:10)
```

## External files

```{r}
x <- readLines("test.txt")
x
```

![](bacon.jpg)

## Details tag

<details>
This should only be shown when required
</details>

<details>
<summary>Multiple paragraphs</summary>
First paragraph

Second paragraph
</details>

<details>
<summary>Some R code</summary>
  
```{r}
1 + 2
```
</details>

## Tables

| col 1 | col 2 | col 3 | col 4 |
|:---------------|:-----------|:-------:|:---------:|
| Brightness     | Total brightness, total reflectance, spectral intensity | $$y = x^2$$ | test |

## Mathjax

$$f(x) = \dfrac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{(x-\mu^2)}{2\sigma^2}}$$

Inline equations: $y=x^2$

## Code

### Line width

```{r}
pkgdown:::ruler()

cat(rep("x ", 100), sep = "")
cat(rep("xy", 100), sep = "")
```

### Should be highlighted

Valid R code in `\preformatted{}`:

```
mean(a + 1)
```

R code in `R` block:

```R
mean(a + 1)
```

R code in `r` block:

```R
mean(a + 1)
```

Yaml

```yaml
yaml: [a, 1]
```

### Shouldn't be highlighted

Non-R code in `\preformatted{}`

```
yaml: [a, b, c]
```

### Crayon

```{r}
cat(cli::col_red("This is red"), "\n")
cat(cli::col_blue("This is blue\n"), "\n")

message(cli::col_green("This is green"))

warning(cli::style_bold("This is bold"))
```
Some text

```{r, error = TRUE}
stop(cli::style_italic("This is italic"))
```

Some more text

## Quoted text

> Single-line quote about something miscellaneous.

| Flush
|  1 space indent
|   2 space indent
|    3 space indent

## This section is unnumbered {-}

There should however be no bug here!

## Tabsets

### Tabset with pills {.tabset .tabset-pills}

#### Tab 1

blablablabla

```r
1 + 1
```

Should be "cool" heading below

##### cool

Stuff

#### Tab 2

blop

### Tabset without pils {.tabset}

#### Tab 1

something nice

```{r}
plot(1:42)
```

#### Tab 2 {.active}

This tab should be active

### Fading tabset {.tabset .tabset-fade}

#### English

Hello!

#### French

Bonjour!

#### German

Guten tag.

## Deep headings

### Heading 3

#### Heading 4

##### Heading 5
