knitr::opts_chunk$set(collapse = TRUE, comment = "#>")

This vignette tests pkgdown output rendering for several use cases.

Footnotes

Yay[^footnote]

[^footnote]: Including footnotes! 😁

Figures

plot(1:10)

External files

x <- readLines("test.txt")
x

Details tag

This should only be shown when required

Multiple paragraphs First paragraph

Second paragraph

Some R code

1 + 2

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

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:

mean(a + 1)

R code in r block:

mean(a + 1)

Yaml

yaml: [a, 1]

Shouldn't be highlighted

Non-R code in \preformatted{}

yaml: [a, b, c]

Crayon

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

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

1 + 1

Should be "cool" heading below

cool

Stuff

Tab 2

blop

Tabset without pills {.tabset}

Tab 1

something nice

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


r-lib/pkgdown documentation built on April 21, 2024, 8:33 a.m.