setupHTML: Set up HTML elements

Description Usage Details Value Author(s) See Also Examples

View source: R/setupHTML.R

Description

Set up Javascript and CSS elements for the custom collapsible class.

Usage

1

Details

The custom collapsible class allows us to hide details until requested by the user. This improves readability by reducing the clutter in the compiled chapter.

Value

Prints HTML to set up JS and CSS elements.

Author(s)

Aaron Lun

See Also

chapterPreamble, which calls this function.

extractCached and prettySessionInfo, which use the custom collapsible class.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
tmp <- tempfile(fileext=".Rmd")
write(file=tmp, "```{r, echo=FALSE, results='asis'}
rebook::setupHTML()
```

```{r, results='asis'}
prettySessionInfo()
```")

rmarkdown::render(tmp)

if (interactive()) browseURL(sub(".Rmd$", ".html", tmp))

MarioniLab/simpleSingleCell documentation built on Aug. 27, 2020, 5:04 a.m.